cb22561995-10-11Fredrik Hübinette (Hubbe) /*\
06983f1996-09-22Fredrik Hübinette (Hubbe) ||| This file a part of Pike, and is copyright by Fredrik Hubinette ||| Pike is distributed as GPL (General Public License)
cb22561995-10-11Fredrik Hübinette (Hubbe) ||| See the files COPYING and DISCLAIMER for more information. \*/
5267b71995-08-09Fredrik Hübinette (Hubbe) #ifndef GLOBAL_H #define GLOBAL_H
cb22561995-10-11Fredrik Hübinette (Hubbe)  #define POSIX_SOURCE
5267b71995-08-09Fredrik Hübinette (Hubbe) /* * Some structure forward declarations are needed. */ /* This is needed for linux */ #ifdef MALLOC_REPLACED #define NO_FIX_MALLOC #endif struct program; struct function; struct svalue; struct sockaddr; struct object; struct array; struct svalue;
cb22561995-10-11Fredrik Hübinette (Hubbe) #include "machine.h"
5267b71995-08-09Fredrik Hübinette (Hubbe) #include "config.h"
cb22561995-10-11Fredrik Hübinette (Hubbe) /* AIX requires this to be the first thing in the file. */ #ifdef __GNUC__ # ifdef alloca # undef alloca # endif # define alloca __builtin_alloca #else # if HAVE_ALLOCA_H # include <alloca.h> # else # ifdef _AIX
5c8e891995-10-29Fredrik Hübinette (Hubbe)  #pragma alloca
cb22561995-10-11Fredrik Hübinette (Hubbe) # else # ifndef alloca /* predefined by HP cc +Olibcalls */ char *alloca (); # endif # endif # endif #endif
5267b71995-08-09Fredrik Hübinette (Hubbe) #include <stdio.h> #ifdef HAVE_STDLIB_H #include <stdlib.h>
a4e1c41996-08-06Fredrik Hübinette (Hubbe) #undef HAVE_STDLIB_H
5267b71995-08-09Fredrik Hübinette (Hubbe) #endif #ifdef HAVE_UNISTD_H #include <unistd.h>
a4e1c41996-08-06Fredrik Hübinette (Hubbe) #undef HAVE_UNISTD_H
5267b71995-08-09Fredrik Hübinette (Hubbe) #endif #ifdef HAVE_STRING_H #include <string.h>
a4e1c41996-08-06Fredrik Hübinette (Hubbe) #undef HAVE_STRING_H
5267b71995-08-09Fredrik Hübinette (Hubbe) #endif #ifdef HAVE_MEMORY_H #include <memory.h>
a4e1c41996-08-06Fredrik Hübinette (Hubbe) #undef HAVE_MEMORY_H
5267b71995-08-09Fredrik Hübinette (Hubbe) #endif
419ede1996-11-13Fredrik Hübinette (Hubbe) #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) #define RCSID(X) \ static char *rcsid __attribute__ ((unused)) =X; #elif #define RCSID(X) \ static char *rcsid = X; #endif
5267b71995-08-09Fredrik Hübinette (Hubbe) #if defined(__GNUC__) && !defined(DEBUG) && !defined(lint) #define INLINE inline #else #define INLINE #endif #include "port.h" #ifdef BUFSIZ #define PROT_STDIO(x) PROT(x) #else #define PROT_STDIO(x) () #endif #ifdef __STDC__ #define PROT(x) x #else #define PROT(x) () #endif #ifdef MALLOC_DECL_MISSING char *malloc PROT((int)); char *realloc PROT((char *,int)); void free PROT((char *)); char *calloc PROT((int,int)); #endif #ifdef GETPEERNAME_DECL_MISSING int getpeername PROT((int, struct sockaddr *, int *)); #endif #ifdef GETHOSTNAME_DECL_MISSING void gethostname PROT((char *,int)); #endif #ifdef POPEN_DECL_MISSING FILE *popen PROT((char *,char *)); #endif #ifdef GETENV_DECL_MISSING char *getenv PROT((char *)); #endif #endif