This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Don't #include headers already included by perl.h
authorNicholas Clark <nick@ccl4.org>
Wed, 14 Sep 2011 13:21:28 +0000 (15:21 +0200)
committerNicholas Clark <nick@ccl4.org>
Thu, 15 Sep 2011 09:10:50 +0000 (11:10 +0200)
097ee67dff1c60f2 didn't need to include <locale.h> in locale.c (then
util.c) because it had been included by perl.h since 5.002 beta 1
3f270f98f9305540 missed removing the include of <unistd.h> from perl.c
or perlio.c
de8ca8af19546d49 changed perl.h to also include <sys/wait.h>, but didn't
notice that it code therefore be removed from perl.c, pp_sys.c and util.c

locale.c
perl.c
perlio.c
pp_sys.c
util.c

index 81c09ab..b7a78fb 100644 (file)
--- a/locale.c
+++ b/locale.c
 #define PERL_IN_LOCALE_C
 #include "perl.h"
 
-#ifdef I_LOCALE
-#  include <locale.h>
-#endif
-
 #ifdef I_LANGINFO
 #   include <langinfo.h>
 #endif
diff --git a/perl.c b/perl.c
index fa88566..0b3d9c6 100644 (file)
--- a/perl.c
+++ b/perl.c
 #include "nwutil.h"    
 #endif
 
-/* XXX If this causes problems, set i_unistd=undef in the hint file.  */
-#ifdef I_UNISTD
-#include <unistd.h>
-#endif
-
 #ifdef DEBUG_LEAKING_SCALARS_FORK_DUMP
-#  ifdef I_SYS_WAIT
-#   include <sys/wait.h>
-#  endif
 #  ifdef I_SYSUIO
 #    include <sys/uio.h>
 #  endif
index 7e560de..f0d67ae 100644 (file)
--- a/perlio.c
+++ b/perlio.c
@@ -451,13 +451,6 @@ PerlIO_findFILE(PerlIO *pio)
 
 #include "perliol.h"
 
-/*
- * We _MUST_ have <unistd.h> if we are using lseek() and may have large
- * files
- */
-#ifdef I_UNISTD
-#include <unistd.h>
-#endif
 #ifdef HAS_MMAP
 #include <sys/mman.h>
 #endif
index ca951e8..eb324df 100644 (file)
--- a/pp_sys.c
+++ b/pp_sys.c
 #   include <shadow.h>
 #endif
 
-#ifdef I_SYS_WAIT
-# include <sys/wait.h>
-#endif
-
 #ifdef I_SYS_RESOURCE
 # include <sys/resource.h>
 #endif
diff --git a/util.c b/util.c
index 70a1496..82d7590 100644 (file)
--- a/util.c
+++ b/util.c
 int putenv(char *);
 #endif
 
-#ifdef I_SYS_WAIT
-#  include <sys/wait.h>
-#endif
-
 #ifdef HAS_SELECT
 # ifdef I_SYS_SELECT
 #  include <sys/select.h>