From: Gurusamy Sarathy Date: Sat, 19 Feb 2000 15:54:04 +0000 (+0000) Subject: some rearrangement of the includes for easier "microperl" build; X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9a34ef1dede5fef4f3211de7a12cc37f4645a3bd;p=p5sagit%2Fp5-mst-13.2.git some rearrangement of the includes for easier "microperl" build; add PERL_MICRO guards supplied by Simon Cozens p4raw-id: //depot/perl@5143 --- diff --git a/doio.c b/doio.c index cb5f3e2..a7b6a90 100644 --- a/doio.c +++ b/doio.c @@ -41,12 +41,6 @@ # endif #endif -#ifdef I_FCNTL -#include -#endif -#ifdef I_SYS_FILE -#include -#endif #ifdef O_EXCL # define OPEN_EXCL O_EXCL #else diff --git a/perl.c b/perl.c index 22d272e..6776ac9 100644 --- a/perl.c +++ b/perl.c @@ -27,13 +27,6 @@ char *getenv (char *); /* Usually in */ static I32 read_e_script(pTHXo_ int idx, SV *buf_sv, int maxlen); -#ifdef I_FCNTL -#include -#endif -#ifdef I_SYS_FILE -#include -#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 0d3f0b8..b47745f 100644 --- a/perl.h +++ b/perl.h @@ -489,6 +489,10 @@ register struct op *Perl_op asm(stringify(OP_IN_REGISTER)); # include #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 +#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 +#endif + + #ifdef IAMSUID #ifdef I_SYS_STATVFS diff --git a/pp_hot.c b/pp_hot.c index ddb900f..288bf5c 100644 --- a/pp_hot.c +++ b/pp_hot.c @@ -22,13 +22,6 @@ #ifdef I_UNISTD #include #endif -#ifdef I_FCNTL -#include -#endif -#ifdef I_SYS_FILE -#include -#endif - /* Hot code. */ diff --git a/pp_sys.c b/pp_sys.c index 18edf7a..8cba2ed 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -112,12 +112,6 @@ extern int h_errno; # include # endif #endif -#ifdef I_FCNTL -#include -#endif -#ifdef I_SYS_FILE -#include -#endif /* Put this after #includes because fork and vfork prototypes may conflict. */ #ifndef HAS_VFORK diff --git a/toke.c b/toke.c index d978140..df9d6a1 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 -#endif -#ifdef I_SYS_FILE -#include -#endif - /* XXX If this causes problems, set i_unistd=undef in the hint file. */ #ifdef I_UNISTD # include /* Needed for execv() */ diff --git a/util.c b/util.c index a63dd3f..6359125 100644 --- a/util.c +++ b/util.c @@ -40,13 +40,6 @@ # define vfork fork #endif -#ifdef I_FCNTL -# include -#endif -#ifdef I_SYS_FILE -# include -#endif - #ifdef I_SYS_WAIT # include #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) */