This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Clarify a comment in errno2.h
[perl5.git] / win32 / win32iop.h
index 7507408..207c917 100644 (file)
 #endif
 #endif
 
-#if defined(_MSC_VER) || defined(__MINGW32__)
-#  include <sys/utime.h>
-#else
-#  include <utime.h>
-#endif
+#include <sys/utime.h>
 
 /*
  * defines for flock emulation
@@ -86,6 +82,7 @@ DllExport  int                win32_dup2(int h1, int h2);
 DllExport  int         win32_open(const char *path, int oflag,...);
 DllExport  int         win32_close(int fd);
 DllExport  int         win32_eof(int fd);
+DllExport  int         win32_isatty(int fd);
 DllExport  int         win32_read(int fd, void *buf, unsigned int cnt);
 DllExport  int         win32_write(int fd, const void *buf, unsigned int cnt);
 DllExport  int         win32_spawnvp(int mode, const char *cmdname,
@@ -123,7 +120,10 @@ DllExport  long            win32_telldir(DIR *dirp);
 DllExport  void                win32_seekdir(DIR *dirp, long loc);
 DllExport  void                win32_rewinddir(DIR *dirp);
 DllExport  int         win32_closedir(DIR *dirp);
+DllExport  DIR*                win32_dirp_dup(DIR *const dirp, CLONE_PARAMS *const param);
 
+DllExport  char*        win32_getenvironmentstrings(void);
+/* also see win32_freeenvironmentstrings macro */
 DllExport  char*       win32_getenv(const char *name);
 DllExport  int         win32_putenv(const char *name);
 
@@ -160,6 +160,8 @@ DllExport Sighandler_t      win32_signal(int sig, Sighandler_t subcode);
 
 END_EXTERN_C
 
+/* see comment in win32_getenvironmentstrings */
+#define win32_freeenvironmentstrings(x) win32_free(x)
 #undef alarm
 #define alarm                          win32_alarm
 #undef strerror
@@ -188,15 +190,7 @@ END_EXTERN_C
 #undef uname
 #undef wait
 
-#ifdef __BORLANDC__
-#undef ungetc
-#undef getc
-#undef putc
-#undef getchar
-#undef putchar
-#endif
-
-#if defined(__MINGW32__) || defined(__BORLANDC__)
+#if defined(__MINGW32__)
 #undef fileno
 #endif
 
@@ -252,6 +246,7 @@ END_EXTERN_C
 #define open                   win32_open
 #define close(fd)              win32_close(fd)
 #define eof(fd)                        win32_eof(fd)
+#define isatty(fd)             win32_isatty(fd)
 #define read(fd,b,s)           win32_read(fd,b,s)
 #define write(fd,b,s)          win32_write(fd,b,s)
 #define _open_osfhandle                win32_open_osfhandle