Mercurial > hg > xemacs-beta
changeset 615:4f50f8a33f96
[xemacs-hg @ 2001-06-11 04:44:52 by martinb]
alloca vs. _XOPEN_SOURCE
author | martinb |
---|---|
date | Mon, 11 Jun 2001 04:44:52 +0000 |
parents | 42bfaea76395 |
children | 4f1c7a4ac1e6 |
files | src/ChangeLog src/config.h.in |
diffstat | 2 files changed, 27 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Mon Jun 11 01:55:28 2001 +0000 +++ b/src/ChangeLog Mon Jun 11 04:44:52 2001 +0000 @@ -1,3 +1,10 @@ +2001-06-12 Martin Buchholz <martin@xemacs.org> + + * config.h.in (alloca): All feature test macros must be defined + before the first system header file inclusion. So move alloca + twiddling after the feature test definitions, but before the first + "real" code. + 2001-06-11 Martin Buchholz <martin@xemacs.org> * lisp.h (DECIMAL_PRINT_SIZE): Don't use floating point.
--- a/src/config.h.in Mon Jun 11 01:55:28 2001 +0000 +++ b/src/config.h.in Mon Jun 11 04:44:52 2001 +0000 @@ -26,26 +26,6 @@ #ifndef _SRC_CONFIG_H_ #define _SRC_CONFIG_H_ - -/* alloca twiddling belongs in one place, not the s&m headers - AIX requires this to be the first thing in the file. */ -#undef HAVE_ALLOCA_H - -#ifndef NOT_C_CODE -#ifdef __GNUC__ -#define alloca __builtin_alloca -#elif defined __DECC -#include <alloca.h> -#pragma intrinsic(alloca) -#elif defined HAVE_ALLOCA_H -#include <alloca.h> -#elif defined(_AIX) -#pragma alloca -#elif ! defined (alloca) -void *alloca (); -#endif -#endif /* C code */ - /* Use this to add code in a structured way to FSF-maintained source files so as to make it obvious where XEmacs changes are. */ #define XEMACS 1 @@ -603,6 +583,26 @@ definitions isn't right with 64-bit systems. */ #undef USE_UNION_TYPE +/* alloca twiddling. + Because we might be #including alloca.h here, feature test macros + such as _XOPEN_SOURCE must be defined above. */ +#undef HAVE_ALLOCA_H +#ifndef NOT_C_CODE +#ifdef __GNUC__ +#define alloca __builtin_alloca +#elif defined __DECC +#include <alloca.h> +#pragma intrinsic(alloca) +#elif defined HAVE_ALLOCA_H +#include <alloca.h> +#elif defined(_AIX) +/* AIX requires this before any "real" code in the translation unit. */ +#pragma alloca +#elif ! defined (alloca) +void *alloca (); +#endif +#endif /* C code */ + /* The configuration script may define `opsysfile' to be the name of the s/...h file that describes your operating system. The file name is chosen based on the configuration name. */