#define ABORT() abort();
+#ifndef SH_PATH
#define SH_PATH "/bin/sh"
+#endif
#ifdef DJGPP
-#define BIT_BUCKET "nul"
-#define OP_BINARY O_BINARY
+# define BIT_BUCKET "nul"
+# define OP_BINARY O_BINARY
void Perl_DJGPP_init();
-#define PERL_SYS_INIT(argcp, argvp) STMT_START { \
+# define PERL_SYS_INIT(argcp, argvp) STMT_START { \
Perl_DJGPP_init(); } STMT_END
-#else
-#define PERL_SYS_INIT(c,v)
-#define BIT_BUCKET "\dev\nul"
-#endif
+#else /* DJGPP */
+# ifdef WIN32
+# define PERL_SYS_INIT(c,v) Perl_win32_init(c,v)
+# define BIT_BUCKET "nul"
+# else
+# define PERL_SYS_INIT(c,v)
+# define BIT_BUCKET "\\dev\\nul" /* "wanna be like, umm, Newlined, or somethin?" */
+# endif
+#endif /* DJGPP */
-#define PERL_SYS_TERM()
-#define dXSUB_SYS int dummy
+#define PERL_SYS_TERM() MALLOC_TERM
+#define dXSUB_SYS
#define TMPPATH "plXXXXXX"
+#ifdef WIN32
+#define HAS_UTIME
+#define HAS_KILL
+#endif
+
/*
* 5.003_07 and earlier keyed on #ifdef MSDOS for determining if we were
* running on DOS, *and* if we had to cope with 16 bit memory addressing
*/
#define fwrite1 fwrite
-#define Stat(fname,bufptr) stat((fname),(bufptr))
#define Fstat(fd,bufptr) fstat((fd),(bufptr))
#define Fflush(fp) fflush(fp)
+#define Mkdir(path,mode) mkdir((path),(mode))
+
+#ifndef WIN32
+# define Stat(fname,bufptr) stat((fname),(bufptr))
+#else
+/*
+ * This provides a layer of functions and macros to ensure extensions will
+ * get to use the same RTL functions as the core.
+ */
+#ifndef HASATTRIBUTE
+# include <win32iop.h>
+#endif
+#endif /* WIN32 */