summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-11-22 21:38:25 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-11-22 21:38:25 +0000
commit3f270f98f93055407790f4fc65bd60980f2723b2 (patch)
tree0a98c9011d0fe8f97d32cd6644069fd7cd145ed2
parente1901655935137420b3a46ad23c873753fcbbbc7 (diff)
downloadperl-3f270f98f93055407790f4fc65bd60980f2723b2.tar.gz
Go ahead and #include <unistd.h> in perl.h.
p4raw-id: //depot/perl@7816
-rw-r--r--doio.c5
-rw-r--r--malloc.c12
-rw-r--r--mg.c5
-rw-r--r--perl.h6
-rw-r--r--pp.c4
-rw-r--r--pp_hot.c4
-rw-r--r--pp_sys.c5
-rw-r--r--toke.c6
-rw-r--r--util.c5
9 files changed, 8 insertions, 44 deletions
diff --git a/doio.c b/doio.c
index 1fdedc2f07..bd4d353f00 100644
--- a/doio.c
+++ b/doio.c
@@ -51,11 +51,6 @@
#include <signal.h>
#endif
-/* XXX If this causes problems, set i_unistd=undef in the hint file. */
-#ifdef I_UNISTD
-# include <unistd.h>
-#endif
-
#ifdef SOCKS_64BIT_BUG
typedef struct __s64_iobuffer {
struct __s64_iobuffer *next, *last; /* Queue pointer */
diff --git a/malloc.c b/malloc.c
index 42c2d651c6..0f668cdfcb 100644
--- a/malloc.c
+++ b/malloc.c
@@ -886,18 +886,12 @@ static union overhead *nextf[NBUCKETS];
#endif
#ifdef USE_PERL_SBRK
-#define sbrk(a) Perl_sbrk(a)
+# define sbrk(a) Perl_sbrk(a)
Malloc_t Perl_sbrk (int size);
-#else
-#ifdef DONT_DECLARE_STD
-#ifdef I_UNISTD
-#include <unistd.h>
-#endif
#else
-#ifndef HAS_SBRK_PROTO
+# ifndef HAS_SBRK_PROTO /* <unistd.h> usually takes care of this */
extern Malloc_t sbrk(int);
-#endif
-#endif
+# endif
#endif
#ifdef DEBUGGING_MSTATS
diff --git a/mg.c b/mg.c
index 867cf38488..660fa54140 100644
--- a/mg.c
+++ b/mg.c
@@ -16,11 +16,6 @@
#define PERL_IN_MG_C
#include "perl.h"
-/* XXX If this causes problems, set i_unistd=undef in the hint file. */
-#ifdef I_UNISTD
-# include <unistd.h>
-#endif
-
#if defined(HAS_GETGROUPS) || defined(HAS_SETGROUPS)
# ifndef NGROUPS
# define NGROUPS 32
diff --git a/perl.h b/perl.h
index 9418b52cc0..de6185b401 100644
--- a/perl.h
+++ b/perl.h
@@ -496,12 +496,16 @@ register struct op *Perl_op asm(stringify(OP_IN_REGISTER));
# include <sys/param.h>
#endif
-
/* Use all the "standard" definitions? */
#if defined(STANDARD_C) && defined(I_STDLIB)
# include <stdlib.h>
#endif
+/* If this causes problems, set i_unistd=undef in the hint file. */
+#ifdef I_UNISTD
+# include <unistd.h>
+#endif
+
#ifdef PERL_MICRO /* Last chance to export Perl_my_swap */
# define MYSWAP
#endif
diff --git a/pp.c b/pp.c
index 59c67e9957..17beb6c8a1 100644
--- a/pp.c
+++ b/pp.c
@@ -82,10 +82,6 @@ static double UV_MAX_cxux = ((double)UV_MAX);
/* variations on pp_null */
-#ifdef I_UNISTD
-#include <unistd.h>
-#endif
-
/* XXX I can't imagine anyone who doesn't have this actually _needs_
it, since pid_t is an integral type.
--AD 2/20/1998
diff --git a/pp_hot.c b/pp_hot.c
index b0d53bcc20..7b5f8320e8 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -19,10 +19,6 @@
#define PERL_IN_PP_HOT_C
#include "perl.h"
-#ifdef I_UNISTD
-#include <unistd.h>
-#endif
-
/* Hot code. */
#ifdef USE_THREADS
diff --git a/pp_sys.c b/pp_sys.c
index 9e6d065248..12c368dea3 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -35,11 +35,6 @@
# include <shadow.h>
#endif
-/* XXX If this causes problems, set i_unistd=undef in the hint file. */
-#ifdef I_UNISTD
-# include <unistd.h>
-#endif
-
#ifdef HAS_SYSCALL
#ifdef __cplusplus
extern "C" int syscall(unsigned long,...);
diff --git a/toke.c b/toke.c
index b48577e9e2..6cb8e16889 100644
--- a/toke.c
+++ b/toke.c
@@ -69,12 +69,6 @@ static I32 utf16rev_textfilter(pTHXo_ int idx, SV *sv, int maxlen);
#define LEX_FORMLINE 1
#define LEX_KNOWNEXT 0
-/* XXX If this causes problems, set i_unistd=undef in the hint file. */
-#ifdef I_UNISTD
-# include <unistd.h> /* Needed for execv() */
-#endif
-
-
#ifdef ff_next
#undef ff_next
#endif
diff --git a/util.c b/util.c
index 02d0ed52f5..d9ea421afb 100644
--- a/util.c
+++ b/util.c
@@ -26,11 +26,6 @@
#endif
#endif
-/* XXX If this causes problems, set i_unistd=undef in the hint file. */
-#ifdef I_UNISTD
-# include <unistd.h>
-#endif
-
#ifdef I_VFORK
# include <vfork.h>
#endif