This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[differences between cumulative patch application and perl5.004_01]
[perl5.git] / win32 / win32.h
index ec9eb7c..344ddab 100644 (file)
 
 /* For UNIX compatibility. */
 
+#ifdef __BORLANDC__
+
+#define _access access
+#define _chdir chdir
+#include <sys/types.h>
+
+#pragma warn -ccc
+#pragma warn -rch
+#pragma warn -sig
+#pragma warn -pia
+#pragma warn -par
+#pragma warn -aus
+#pragma warn -use
+#pragma warn -csu
+#pragma warn -pro
+
+#else
+
 typedef long           uid_t;
 typedef long           gid_t;
 
-extern  char   *staticlinkmodules[];
+#endif
 
 extern  uid_t  getuid(void);
 extern  gid_t  getgid(void);
 extern  uid_t  geteuid(void);
 extern  gid_t  getegid(void);
-
 extern  int    setuid(uid_t uid);
 extern  int    setgid(gid_t gid);
+
 extern  int    kill(int pid, int sig);
 
+extern  char   *staticlinkmodules[];
+
+/* if USE_WIN32_RTL_ENV is not defined, Perl uses direct Win32 calls
+ * to read the environment, bypassing the runtime's (usually broken)
+ * facilities for accessing the same.  See note in util.c/my_setenv().
+ */
+/*#define USE_WIN32_RTL_ENV */
 #define USE_SOCKETS_AS_HANDLES
 #ifndef USE_SOCKETS_AS_HANDLES
 extern FILE *myfdopen(int, char *);
@@ -50,10 +75,10 @@ extern FILE *myfdopen(int, char *);
 #define  STANDARD_C    1               /* Perl5 likes standard C. */
 #define  DOSISH                1               /* Take advantage of DOSish code in Perl5. */
 
-#define  OP_BINARY     _O_BINARY       /* Mistake in in pp_sys.c. */
+#define  OP_BINARY     O_BINARY        /* Mistake in in pp_sys.c. */
 
 #undef  pipe
-#define  pipe(fd)      win32_pipe((fd), 512, _O_BINARY) /* the pipe call is a bit different */
+#define  pipe(fd)      win32_pipe((fd), 512, O_BINARY) /* the pipe call is a bit different */
 
 #undef  pause
 #define  pause()       sleep((32767L << 16) + 32767)
@@ -73,7 +98,7 @@ struct tms {
 };
 
 unsigned int sleep(unsigned int);
-char *win32PerlLibPath();
+char *win32PerlLibPath(void);
 int mytimes(struct tms *timebuf);
 unsigned int myalarm(unsigned int sec);
 int do_aspawn(void* really, void** mark, void** arglast);
@@ -86,6 +111,7 @@ typedef  char *              caddr_t;        /* In malloc.c (core address). */
  */
 
 #define DllExport      __declspec(dllexport)
+#define DllImport      __declspec(dllimport)
 
 /*
  * handle socket stuff, assuming socket is always available
@@ -94,7 +120,9 @@ typedef  char *              caddr_t;        /* In malloc.c (core address). */
 #include <sys/socket.h>
 #include <netdb.h>
 
+#ifdef _MSC_VER
 #pragma  warning(disable: 4018 4035 4101 4102 4244 4245 4761)
+#endif
 
 int IsWin95(void);
 int IsWinNT(void);