4 #define _XOPEN_SOURCE 1 // necessary on alpha 5 #undef _XOPEN_SOURCE_EXTENDED 6 #define _XOPEN_SOURCE_EXTENDED 1 // usleep is not declared 11 #include <sys/types.h> 14 #include <vxl_config.h> 19 return getcwd( buf, buf_size );
25 return mkdir( dir, (mode_t)mode );
43 return unlink( file );
56 if (t > 1000000) sleep( t/1000000 ); t %= 1000000;
57 #if VXL_UNISTD_HAS_USLEEP 58 #if VXL_UNISTD_USLEEP_IS_VOID 59 usleep( t );
return 0;
71 #if VXL_UNISTD_HAS_GETPID 81 char * storage_space = strdup(envvar);
88 return putenv(storage_space);
94 #if VXL_UNISTD_HAS_GETHOSTNAME 95 return gethostname(name, len);
unsigned int vpl_sleep(unsigned int t)
Sleep for t seconds.
int vpl_usleep(unsigned int t)
Sleep for t microseconds.
char * vpl_getcwd(char *buf, std::size_t buf_size)
Get the pathname of the current working directory.
unsigned vpl_getpid()
Get the process identifier.
int vpl_putenv(const char *envvar)
Set environment variable.
int vpl_rmdir(const char *dir)
Remove the directory dir.
int vpl_mkdir(const char *dir, unsigned short mode)
Create a new directory dir with permissions mode.
int vpl_chdir(const char *dir)
Change the working directory to dir.
int vpl_gethostname(char *name, size_t len)
int vpl_unlink(const char *file)
Remove the file file.