diff options
Diffstat (limited to 'win32/win32iop.h')
-rw-r--r-- | win32/win32iop.h | 37 |
1 files changed, 33 insertions, 4 deletions
diff --git a/win32/win32iop.h b/win32/win32iop.h index 992eec7458..a60194d0f0 100644 --- a/win32/win32iop.h +++ b/win32/win32iop.h @@ -30,6 +30,13 @@ */ START_EXTERN_C +struct tms { + long tms_utime; + long tms_stime; + long tms_cutime; + long tms_cstime; +}; + EXT int * win32_errno(void); EXT char *** win32_environ(void); EXT FILE* win32_stdin(void); @@ -102,12 +109,18 @@ EXT void* win32_calloc(size_t numitems, size_t size); EXT void* win32_realloc(void *block, size_t size); EXT void win32_free(void *block); -/* - * these two are win32 specific but still io related - */ EXT int win32_open_osfhandle(long handle, int flags); EXT long win32_get_osfhandle(int fd); +#ifndef USE_WIN32_RTL_ENV +EXT char* win32_getenv(const char *name); +#endif + +EXT unsigned int win32_sleep(unsigned int); +EXT int win32_times(struct tms *timebuf); +EXT unsigned int win32_alarm(unsigned int sec); +EXT int win32_flock(int fd, int oper); +EXT int win32_stat(const char *path, struct stat *buf); END_EXTERN_C @@ -123,6 +136,11 @@ END_EXTERN_C #undef ferror #undef feof #undef fclose +#undef pipe +#undef pause +#undef sleep +#undef times +#undef alarm #ifdef __BORLANDC__ #undef ungetc @@ -205,6 +223,17 @@ END_EXTERN_C #define calloc win32_calloc #define realloc win32_realloc #define free win32_free -#endif /* WIN32IO_IS_STDIO */ +#define pipe(fd) win32_pipe((fd), 512, O_BINARY) +#define pause() win32_sleep((32767L << 16) + 32767) +#define sleep win32_sleep +#define times win32_times +#define alarm win32_alarm + +#ifndef USE_WIN32_RTL_ENV +#undef getenv +#define getenv win32_getenv +#endif + +#endif /* WIN32IO_IS_STDIO */ #endif /* WIN32IOP_H */ |