Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv27400/src
Modified Files:
compat.h
Log Message:
move alloca compat code to top of file (for portability to AIX's compiler)
Index: compat.h
===================================================================
RCS file: /cvsroot/srvx/services/src/compat.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** compat.h 3 Aug 2002 02:26:18 -0000 1.10
--- compat.h 5 Aug 2002 02:58:17 -0000 1.11
***************
*** 4,7 ****
--- 4,25 ----
#include "config.h"
+ /* AIX's compiler requires this to be the first thing in the compiled
+ * files. Yay for braindead compilers. */
+ #if defined(__GNUC__) && !defined(HAVE_ALLOCA_H)
+ # define alloca __builtin_alloca
+ #else
+ # if defined(HAVE_ALLOCA_H) && defined(CAN_INCLUDE_ALLOCA_H)
+ # include <alloca.h>
+ # else
+ # ifdef _AIX
+ # pragma alloca
+ # else
+ # ifndef alloca
+ char *alloca();
+ # endif
+ # endif
+ # endif
+ #endif
+
/* These are ANSI C89 headers, so everybody should have them. If
* they're missing, we probably don't care much about the platform.
***************
*** 20,39 ****
#include <stdlib.h>
#include <string.h>
-
- #if defined(__GNUC__) && !defined(HAVE_ALLOCA_H)
- # define alloca __builtin_alloca
- #else
- # if defined(HAVE_ALLOCA_H) && defined(CAN_INCLUDE_ALLOCA_H)
- # include <alloca.h>
- # else
- # ifdef _AIX
- # pragma alloca
- # else
- # ifndef alloca
- char *alloca();
- # endif
- # endif
- # endif
- #endif
#ifdef TIME_WITH_SYS_TIME
--- 38,41 ----
|