X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=config_h.SH;h=cfae03ad99004c89c5656cae7f907bf304234e2a;hb=ed37317ba9f84f5ce2ec814d0eb235142308be59;hp=d2ff19c18a30a2b61780729011d4aef88e2450c2;hpb=36477c247f3c188fb8cc7e276c87b739d3e6ab7c;p=p5sagit%2Fp5-mst-13.2.git diff --git a/config_h.SH b/config_h.SH index d2ff19c..cfae03a 100755 --- a/config_h.SH +++ b/config_h.SH @@ -39,14 +39,44 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- /* MEM_ALIGNBYTES: * This symbol contains the number of bytes required to align a * double. Usual values are 2, 4 and 8. + * On NeXT starting with 3.2, you can build "Fat" Multiple Architecture + * Binaries (MAB) for targets with varying alignment. This only matters + * for perl, where the config.h can be generated and installed on one + * system, and used by a different architecture to build an extension. + * The default is eight, for safety. */ +#ifndef NeXT #define MEM_ALIGNBYTES $alignbytes /**/ +#else /* NeXT */ +#ifdef __m68k__ +#define MEM_ALIGNBYTES 2 +#else +#ifdef __i386__ +#define MEM_ALIGNBYTES 4 +#else /* __hppa__, __sparc__ and default for unknown architectures */ +#define MEM_ALIGNBYTES 8 +#endif /* __i386__ */ +#endif /* __m68k__ */ +#endif /* NeXT */ + +/* ARCHNAME: + * This symbol holds a string representing the architecture name. + * It may be used to construct an architecture-dependant pathname + * where library files may be held under a private library, for + * instance. + */ +#define ARCHNAME "$archname" /**/ /* BIN: * This symbol holds the path of the bin directory where the package will * be installed. Program must be prepared to deal with ~name substitution. */ +/* BIN_EXP: + * This symbol is the filename expanded version of the BIN symbol, for + * programs that do not want to deal with that at run-time. + */ #define BIN "$bin" /**/ +#define BIN_EXP "$binexp" /**/ /* CAT2: * This macro catenates 2 tokens together. @@ -269,12 +299,29 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- */ #$d_fsetpos HAS_FSETPOS /**/ +/* HAS_GETTIMEOFDAY: + * This symbol, if defined, indicates that the gettimeofday() system + * call is available for a sub-second accuracy clock. Usually, the file + * needs to be included (see I_SYS_RESOURCE). + * The type "Timeval" should be used to refer to "struct timeval". + */ +#$d_gettimeod HAS_GETTIMEOFDAY /**/ +#ifdef HAS_GETTIMEOFDAY +#define Timeval struct timeval /* Structure used by gettimeofday() */ +#endif + /* HAS_GETGROUPS: * This symbol, if defined, indicates that the getgroups() routine is * available to get the list of process groups. If unavailable, multiple * groups are probably not supported. */ +/* HAS_SETGROUPS: + * This symbol, if defined, indicates that the setgroups() routine is + * available to set the list of process groups. If unavailable, multiple + * groups are probably not supported. + */ #$d_getgrps HAS_GETGROUPS /**/ +#$d_setgrps HAS_SETGROUPS /**/ /* HAS_GETHOSTENT: * This symbol, if defined, indicates that the gethostent routine is @@ -551,10 +598,9 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- #$d_safemcpy HAS_SAFE_MEMCPY /**/ /* HAS_SANE_MEMCMP: - * This symbol, if defined, indicates that the memcmp() routine is - * available to compare memory blocks for relative magnitude. If this - * symbol is not defined, and if HAS_MEMCMP is defined, then memcmp() - * may be used only to compare memory blocks for equality. + * This symbol, if defined, indicates that the memcmp routine is available + * and can be used to compare relative magnitudes of chars with their high + * bits set. If it is not defined, roll your own version. */ #$d_sanemcmp HAS_SANE_MEMCMP /**/ @@ -720,22 +766,12 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- * This symbol is defined if the FILE_cnt macro can be used as an * lvalue. */ -/* FILE_filbuf: - * This macro is used to access the internal stdio _filbuf function - * (or equivalent), if STDIO_CNT_LVALUE and STDIO_PTR_LVALUE - * are defined. It is typically either _filbuf or __filbuf. - * This macro will only be defined if both STDIO_CNT_LVALUE and - * STDIO_PTR_LVALUE are defined. - */ #$d_stdstdio USE_STDIO_PTR /**/ #ifdef USE_STDIO_PTR #define FILE_ptr(fp) $stdio_ptr #$d_stdio_ptr_lval STDIO_PTR_LVALUE /**/ #define FILE_cnt(fp) $stdio_cnt #$d_stdio_cnt_lval STDIO_CNT_LVALUE /**/ -#if defined(STDIO_PTR_LVALUE) && defined(STDIO_CNT_LVALUE) -#define FILE_filbuf(fp) $stdio_filbuf /**/ -#endif #endif /* USE_STDIO_BASE: @@ -810,19 +846,19 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- /* HAS_STRTOD: * This symbol, if defined, indicates that the strtod routine is - * available to translate strings to doubles. + * available to provide better numeric string conversion than atof(). */ #$d_strtod HAS_STRTOD /**/ /* HAS_STRTOL: - * This symbol, if defined, indicates that the strtol routine is - * available to translate strings to integers. + * This symbol, if defined, indicates that the strtol routine is available + * to provide better numeric string conversion than atoi() and friends. */ #$d_strtol HAS_STRTOL /**/ /* HAS_STRTOUL: * This symbol, if defined, indicates that the strtoul routine is - * available to translate strings to integers. + * available to provide conversion of strings to unsigned long. */ #$d_strtoul HAS_STRTOUL /**/ @@ -977,14 +1013,14 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- /* Groups_t: * This symbol holds the type used for the second argument to - * getgroups(). Usually, this is the same of gidtype, but + * [gs]etgroups(). Usually, this is the same of gidtype, but * sometimes it isn't. It can be int, ushort, uid_t, etc... * It may be necessary to include to get any * typedef'ed information. This is only required if you have - * getgroups(). + * getgroups() or setgroups(). */ -#ifdef HAS_GETGROUPS -#define Groups_t $groupstype /* Type for 2nd arg to getgroups() */ +#if defined(HAS_GETGROUPS) || defined(HAS_SETGROUPS) +#define Groups_t $groupstype /* Type for 2nd arg to [gs]etgroups() */ #endif /* DB_Prefix_t: @@ -1267,10 +1303,20 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- #$i_vfork I_VFORK /**/ /* INTSIZE: - * This symbol contains the size of an int, so that the C preprocessor - * can make decisions based on it. + * This symbol contains the value of sizeof(int) so that the C + * preprocessor can make decisions based on it. + */ +/* LONGSIZE: + * This symbol contains the value of sizeof(long) so that the C + * preprocessor can make decisions based on it. + */ +/* SHORTSIZE: + * This symbol contains the value of sizeof(short) so that the C + * preprocessor can make decisions based on it. */ #define INTSIZE $intsize /**/ +#define LONGSIZE $longsize /**/ +#define SHORTSIZE $shortsize /**/ /* Off_t: * This symbol holds the type used to declare offsets in the kernel. @@ -1287,6 +1333,33 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- */ #define Mode_t $modetype /* file mode parameter for system calls */ +/* VAL_O_NONBLOCK: + * This symbol is to be used during open() or fcntl(F_SETFL) to turn on + * non-blocking I/O for the file descriptor. Note that there is no way + * back, i.e. you cannot turn it blocking again this way. If you wish to + * alternatively switch between blocking and non-blocking, use the + * ioctl(FIOSNBIO) call instead, but that is not supported by all devices. + */ +/* VAL_EAGAIN: + * This symbol holds the errno error code set by read() when no data was + * present on the non-blocking file descriptor. + */ +/* RD_NODATA: + * This symbol holds the return code from read() when no data is present + * on the non-blocking file descriptor. Be careful! If EOF_NONBLOCK is + * not defined, then you can't distinguish between no data and EOF by + * issuing a read(). You'll have to find another way to tell for sure! + */ +/* EOF_NONBLOCK: + * This symbol, if defined, indicates to the C program that a read() on + * a non-blocking file descriptor will return 0 on EOF, and not the value + * held in RD_NODATA (-1 usually, in that case!). + */ +#define VAL_O_NONBLOCK $o_nonblock +#define VAL_EAGAIN $eagain +#define RD_NODATA $rd_nodata +#$d_eofnblk EOF_NONBLOCK + /* CAN_PROTOTYPE: * If defined, this macro indicates that the C compiler can handle * function prototypes. @@ -1311,14 +1384,6 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- */ #define RANDBITS $randbits /**/ -/* SCRIPTDIR: - * This symbol holds the name of the directory in which the user wants - * to put publicly executable scripts for the package in question. It - * is often a directory that is mounted across diverse architectures. - * Programs must be prepared to deal with ~name expansion. - */ -#define SCRIPTDIR "$scriptdir" /**/ - /* Select_fd_set_t: * This symbol holds the type used for the 2nd, 3rd, and 4th * arguments to select. Usually, this is 'fd_set *', if HAS_FD_SET @@ -1335,6 +1400,16 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- */ #define Size_t $sizetype /* length paramater for string functions */ +/* SSize_t: + * This symbol holds the type used by functions that return + * a count of bytes or an error condition. It must be a signed type. + * It is usually ssize_t, but may be long or int, etc. + * It may be necessary to include or + * to get any typedef'ed information. + * We will pick a type such that sizeof(SSize_t) == sizeof(Size_t). + */ +#define SSize_t $ssizetype /* signed count of bytes */ + /* STDCHAR: * This symbol is defined to be the type of char used in stdio.h. * It has the values "unsigned char" or "char". @@ -1376,10 +1451,16 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- #$d_archlib ARCHLIB "$archlib" /**/ #$d_archlib ARCHLIB_EXP "$archlibexp" /**/ +/* BINCOMPAT3: + * This symbol, if defined, indicates that Perl 5.004 should be + * binary-compatible with Perl 5.003. + */ +#$d_bincompat3 BINCOMPAT3 /**/ + /* BYTEORDER: * This symbol holds the hexadecimal constant defined in byteorder, * i.e. 0x1234 or 0x4321, etc... - * On NeXT 4 (and greater), you can build "Fat" Multiple Architecture + * On NeXT 3.2 (and greater), you can build "Fat" Multiple Architecture * Binaries (MAB) on either big endian or little endian machines. * The endian-ness is available at compile-time. This only matters * for perl, where the config.h can be generated and installed on @@ -1468,6 +1549,13 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- #$d_getpgrp HAS_GETPGRP /**/ #$d_bsdgetpgrp USE_BSD_GETPGRP /**/ +/* HAS_INET_ATON: + * This symbol, if defined, indicates to the C program that the + * inet_aton() function is available to parse IP address "dotted-quad" + * strings. + */ +#$d_inetaton HAS_INET_ATON /**/ + /* HAS_SETPGID: * This symbol, if defined, indicates to the C program that * the setpgid(pid, gpid) function is available to set the @@ -1582,33 +1670,6 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- */ #$d_mymalloc MYMALLOC /**/ -/* VAL_O_NONBLOCK: - * This symbol is to be used during open() or fcntl(F_SETFL) to turn on - * non-blocking I/O for the file descriptor. Note that there is no way - * back, i.e. you cannot turn it blocking again this way. If you wish to - * alternatively switch between blocking and non-blocking, use the - * ioctl(FIOSNBIO) call instead, but that is not supported by all devices. - */ -/* VAL_EAGAIN: - * This symbol holds the errno error code set by read() when no data was - * present on the non-blocking file descriptor. - */ -/* RD_NODATA: - * This symbol holds the return code from read() when no data is present - * on the non-blocking file descriptor. Be careful! If EOF_NONBLOCK is - * not defined, then you can't distinguish between no data and EOF by - * issuing a read(). You'll have to find another way to tell for sure! - */ -/* EOF_NONBLOCK: - * This symbol, if defined, indicates to the C program that a read() on - * a non-blocking file descriptor will return 0 on EOF, and not the value - * held in RD_NODATA (-1 usually, in that case!). - */ -#define VAL_O_NONBLOCK $o_nonblock -#define VAL_EAGAIN $eagain -#define RD_NODATA $rd_nodata -#$d_eofnblk EOF_NONBLOCK - /* OLDARCHLIB: * This variable, if defined, holds the name of the directory in * which the user has perl5.000 or perl5.001 architecture-dependent @@ -1709,16 +1770,6 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- #define SITELIB "$sitelib" /**/ #define SITELIB_EXP "$sitelibexp" /**/ -/* SSize_t: - * This symbol holds the type used by functions that return - * a count of bytes or an error condition. It must be a signed type. - * It is usually ssize_t, but may be long or int, etc. - * It may be necessary to include or - * to get any typedef'ed information. - * We will pick a type such that sizeof(SSize_t) == sizeof(Size_t). - */ -#define SSize_t $ssizetype /* signed count of bytes */ - /* STARTPERL: * This variable contains the string to put in front of a perl * script to make sure (one hopes) that it runs with perl and not