diff --git a/src/acconfig.h b/src/acconfig.h index 55ddc264e9df0bd9fe3e95b01753d8d4ade34554..578b83c2c02fe9737b630156368e0e641ff5f4b0 100644 --- a/src/acconfig.h +++ b/src/acconfig.h @@ -2,7 +2,7 @@ || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. -|| $Id: acconfig.h,v 1.151 2006/07/05 19:04:21 mast Exp $ +|| $Id: acconfig.h,v 1.152 2006/08/02 15:00:28 mast Exp $ */ #ifndef MACHINE_H @@ -609,61 +609,4 @@ */ #define PIKE_OOB_WORKS -1 -/* We want to use errno later */ -#ifdef _SGI_SPROC_THREADS -/* Magic define of _SGI_MP_SOURCE above might redefine errno below */ -#include <errno.h> -#if defined(HAVE_OSERROR) && !defined(errno) -#define errno (oserror()) -#endif /* HAVE_OSERROR && !errno */ -#endif /* _SGI_SPROC_THREADS */ - -/* This macro is only provided for compatibility with - * Windows PreRelease. Use ALIGNOF() instead! - * (Needed for va_arg().) - */ -#ifndef __alignof -#define __alignof(X) ((size_t)&(((struct { char ignored_ ; X fooo_; } *)0)->fooo_)) -#endif /* __alignof */ - -#ifdef HAVE_FUNCTION_ATTRIBUTES -#define ATTRIBUTE(X) __attribute__ (X) -#else -#define ATTRIBUTE(X) -#endif - -#ifdef HAVE_DECLSPEC -#define DECLSPEC(X) __declspec(X) -#else /* !HAVE_DECLSPEC */ -#define DECLSPEC(X) -#endif /* HAVE_DECLSPEC */ - -#ifndef HAVE_WORKING_REALLOC_NULL -#define realloc(PTR, SZ) pike_realloc(PTR,SZ) -#endif - -/* NOTE: - * PIKE_CONCAT doesn't get defined if there isn't any way to - * concatenate symbols - */ -#ifdef HAVE_ANSI_CONCAT -#define PIKE_CONCAT(X,Y) X##Y -#define PIKE_CONCAT3(X,Y,Z) X##Y##Z -#define PIKE_CONCAT4(X,Y,Z,Q) X##Y##Z##Q -#else -#ifdef HAVE_KR_CONCAT -#define PIKE_CONCAT(X,Y) X/**/Y -#define PIKE_CONCAT3(X,Y,Z) X/**/Y/**/Z -#define PIKE_CONCAT4(X,Y,Z,Q) X/**/Y/**/Z/**/Q -#endif /* HAVE_KR_CONCAT */ -#endif /* HAVE_ANSI_CONCAT */ - -#define TOSTR(X) #X -#define DEFINETOSTR(X) TOSTR(X) - -/* Some identifiers used as flags in the defines above. */ -#define PIKE_YES 1 -#define PIKE_NO 2 -#define PIKE_UNKNOWN 3 - #endif /* MACHINE_H */ diff --git a/src/global.h b/src/global.h index 3b36638abf6e7521902c84859a22bc6be0572135..980cf91259d15dab72bbcf8c79a2b6b5c3317ef4 100644 --- a/src/global.h +++ b/src/global.h @@ -2,7 +2,7 @@ || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. -|| $Id: global.h,v 1.107 2006/07/05 00:12:44 mast Exp $ +|| $Id: global.h,v 1.108 2006/08/02 15:00:28 mast Exp $ */ #ifndef GLOBAL_H @@ -98,6 +98,63 @@ struct timeval; #include "machine.h" #endif +/* Some identifiers used as flags in the machine.h defines. */ +#define PIKE_YES 1 +#define PIKE_NO 2 +#define PIKE_UNKNOWN 3 + +/* We want to use errno later */ +#ifdef _SGI_SPROC_THREADS +/* Magic define of _SGI_MP_SOURCE above might redefine errno below */ +#include <errno.h> +#if defined(HAVE_OSERROR) && !defined(errno) +#define errno (oserror()) +#endif /* HAVE_OSERROR && !errno */ +#endif /* _SGI_SPROC_THREADS */ + +/* This macro is only provided for compatibility with + * Windows PreRelease. Use ALIGNOF() instead! + * (Needed for va_arg().) + */ +#ifndef __alignof +#define __alignof(X) ((size_t)&(((struct { char ignored_ ; X fooo_; } *)0)->fooo_)) +#endif /* __alignof */ + +#ifdef HAVE_FUNCTION_ATTRIBUTES +#define ATTRIBUTE(X) __attribute__ (X) +#else +#define ATTRIBUTE(X) +#endif + +#ifdef HAVE_DECLSPEC +#define DECLSPEC(X) __declspec(X) +#else /* !HAVE_DECLSPEC */ +#define DECLSPEC(X) +#endif /* HAVE_DECLSPEC */ + +#ifndef HAVE_WORKING_REALLOC_NULL +#define realloc(PTR, SZ) pike_realloc(PTR,SZ) +#endif + +/* NOTE: + * PIKE_CONCAT doesn't get defined if there isn't any way to + * concatenate symbols + */ +#ifdef HAVE_ANSI_CONCAT +#define PIKE_CONCAT(X,Y) X##Y +#define PIKE_CONCAT3(X,Y,Z) X##Y##Z +#define PIKE_CONCAT4(X,Y,Z,Q) X##Y##Z##Q +#else +#ifdef HAVE_KR_CONCAT +#define PIKE_CONCAT(X,Y) X/**/Y +#define PIKE_CONCAT3(X,Y,Z) X/**/Y/**/Z +#define PIKE_CONCAT4(X,Y,Z,Q) X/**/Y/**/Z/**/Q +#endif /* HAVE_KR_CONCAT */ +#endif /* HAVE_ANSI_CONCAT */ + +#define TOSTR(X) #X +#define DEFINETOSTR(X) TOSTR(X) + /* * Max number of local variables in a function. * Currently there is no support for more than 256 @@ -520,6 +577,4 @@ char *crypt(const char *, const char *); #define DO_IF_PROFILING_DEBUG(X) #endif /* PROFILING_DEBUG */ - - #endif