summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doio.c6
-rw-r--r--perl.c9
-rw-r--r--perl.h21
-rw-r--r--pp_hot.c7
-rw-r--r--pp_sys.c6
-rw-r--r--toke.c7
-rw-r--r--util.c9
7 files changed, 24 insertions, 41 deletions
diff --git a/doio.c b/doio.c
index cb5f3e2fc2..a7b6a90718 100644
--- a/doio.c
+++ b/doio.c
@@ -41,12 +41,6 @@
# endif
#endif
-#ifdef I_FCNTL
-#include <fcntl.h>
-#endif
-#ifdef I_SYS_FILE
-#include <sys/file.h>
-#endif
#ifdef O_EXCL
# define OPEN_EXCL O_EXCL
#else
diff --git a/perl.c b/perl.c
index 22d272ec68..6776ac9497 100644
--- a/perl.c
+++ b/perl.c
@@ -27,13 +27,6 @@ char *getenv (char *); /* Usually in <stdlib.h> */
static I32 read_e_script(pTHXo_ int idx, SV *buf_sv, int maxlen);
-#ifdef I_FCNTL
-#include <fcntl.h>
-#endif
-#ifdef I_SYS_FILE
-#include <sys/file.h>
-#endif
-
#ifdef IAMSUID
#ifndef DOSUID
#define DOSUID
@@ -1155,7 +1148,9 @@ print \" \\@INC:\\n @INC\\n\";");
CvPADLIST(PL_compcv) = comppadlist;
boot_core_UNIVERSAL();
+#ifndef PERL_MICRO
boot_core_xsutils();
+#endif
if (xsinit)
(*xsinit)(aTHXo); /* in case linked C routines want magical variables */
diff --git a/perl.h b/perl.h
index 0d3f0b8333..b47745f41e 100644
--- a/perl.h
+++ b/perl.h
@@ -489,6 +489,10 @@ register struct op *Perl_op asm(stringify(OP_IN_REGISTER));
# include <stdlib.h>
#endif
+#ifdef PERL_MICRO /* Last chance to export Perl_my_swap */
+# define MYSWAP
+#endif
+
#if !defined(PERL_FOR_X2P) && !defined(WIN32)
# include "embed.h"
#endif
@@ -3136,6 +3140,23 @@ typedef struct am_table_short AMTS;
# endif
#endif
+#ifdef I_FCNTL
+# include <fcntl.h>
+#else
+# ifndef O_RDONLY
+/* Assume UNIX defaults */
+# define O_RDONLY 0000
+# define O_WRONLY 0001
+# define O_RDWR 0002
+# define O_CREAT 0100
+# endif
+#endif
+
+#ifdef I_SYS_FILE
+# include <sys/file.h>
+#endif
+
+
#ifdef IAMSUID
#ifdef I_SYS_STATVFS
diff --git a/pp_hot.c b/pp_hot.c
index ddb900f261..288bf5c6e6 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -22,13 +22,6 @@
#ifdef I_UNISTD
#include <unistd.h>
#endif
-#ifdef I_FCNTL
-#include <fcntl.h>
-#endif
-#ifdef I_SYS_FILE
-#include <sys/file.h>
-#endif
-
/* Hot code. */
diff --git a/pp_sys.c b/pp_sys.c
index 18edf7ad65..8cba2edd71 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -112,12 +112,6 @@ extern int h_errno;
# include <utime.h>
# endif
#endif
-#ifdef I_FCNTL
-#include <fcntl.h>
-#endif
-#ifdef I_SYS_FILE
-#include <sys/file.h>
-#endif
/* Put this after #includes because fork and vfork prototypes may conflict. */
#ifndef HAS_VFORK
diff --git a/toke.c b/toke.c
index d978140f4a..df9d6a1bcf 100644
--- a/toke.c
+++ b/toke.c
@@ -58,13 +58,6 @@ static void restore_rsfp(pTHXo_ void *f);
#define LEX_FORMLINE 1
#define LEX_KNOWNEXT 0
-#ifdef I_FCNTL
-#include <fcntl.h>
-#endif
-#ifdef I_SYS_FILE
-#include <sys/file.h>
-#endif
-
/* XXX If this causes problems, set i_unistd=undef in the hint file. */
#ifdef I_UNISTD
# include <unistd.h> /* Needed for execv() */
diff --git a/util.c b/util.c
index a63dd3ffe8..6359125ef8 100644
--- a/util.c
+++ b/util.c
@@ -40,13 +40,6 @@
# define vfork fork
#endif
-#ifdef I_FCNTL
-# include <fcntl.h>
-#endif
-#ifdef I_SYS_FILE
-# include <sys/file.h>
-#endif
-
#ifdef I_SYS_WAIT
# include <sys/wait.h>
#endif
@@ -116,7 +109,7 @@ Perl_safesysrealloc(Malloc_t where,MEM_SIZE size)
{
dTHX;
Malloc_t ptr;
-#if !defined(STANDARD_C) && !defined(HAS_REALLOC_PROTOTYPE)
+#if !defined(STANDARD_C) && !defined(HAS_REALLOC_PROTOTYPE) && !defined(PERL_MICRO)
Malloc_t PerlMem_realloc();
#endif /* !defined(STANDARD_C) && !defined(HAS_REALLOC_PROTOTYPE) */