#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
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,
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);
END_EXTERN_C
+/* see comment in win32_getenvironmentstrings */
+#define win32_freeenvironmentstrings(x) win32_free(x)
#undef alarm
#define alarm win32_alarm
#undef strerror
#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
#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