summaryrefslogtreecommitdiff
path: root/win32/win32iop.h
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1997-11-12 22:26:39 +0000
committerGurusamy Sarathy <gsar@cpan.org>1997-11-12 22:26:39 +0000
commitf3986ebb5fa156b34b51584d78a10d0d906dbcd6 (patch)
tree978bf967fd1dc1c93b3c666bb8056233359c2b03 /win32/win32iop.h
parente5fcb9beecf02e9b386345e7195a35452a87bc68 (diff)
downloadperl-f3986ebb5fa156b34b51584d78a10d0d906dbcd6.tar.gz
More cleanups of win32/win32*.[ch] files. win32/win32iop.h now
contains the all the declarations and macros for the win32io layer. New std-ish functions are exported now. All win32-specific exported functions begin with "win32_" consistently. win32 version of init_os_extras() is now exported, so embedders can get the in-core xsubs. p4raw-id: //depot/win32/perl@244
Diffstat (limited to 'win32/win32iop.h')
-rw-r--r--win32/win32iop.h37
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 */