e576bb | 2002-10-11 | Martin Nilsson | |
|
24ddc7 | 1998-03-28 | Henrik Grubbström (Grubba) | |
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | #ifndef GLOBAL_H
#define GLOBAL_H
|
cb2256 | 1995-10-11 | Fredrik Hübinette (Hubbe) | |
|
e37d79 | 2004-05-10 | Marcus Agehall | |
#if (defined(__WINNT__) || defined(__WIN32__)) && !defined(__NT__)
|
7fbe09 | 1999-05-11 | Fredrik Hübinette (Hubbe) | | #define __NT__
#endif
|
a2326e | 1998-03-25 | Per Hedbor | | #ifndef _LARGEFILE_SOURCE
# define _FILE_OFFSET_BITS 64
# define _LARGEFILE_SOURCE
|
44da7e | 2004-05-11 | Henrik Grubbström (Grubba) | |
|
a2326e | 1998-03-25 | Per Hedbor | | #endif
|
90dc92 | 1998-06-12 | Fredrik Noring | |
#ifndef __STDC_EXT__
# define __STDC_EXT__
#endif /* !__STDC_EXT__ */
|
ada73b | 1999-07-15 | Henrik Grubbström (Grubba) | | #ifndef _PROTOTYPES
# define _PROTOTYPES
#endif /* !_PROTOTYPES */
|
90dc92 | 1998-06-12 | Fredrik Noring | |
|
e31ef4 | 2003-03-12 | Henrik Grubbström (Grubba) | |
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif /* !_GNU_SOURCE */
|
b401a5 | 2003-05-02 | Henrik Grubbström (Grubba) | | #ifdef __NT__
|
636e85 | 2003-04-30 | Henrik Grubbström (Grubba) | |
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
|
b401a5 | 2003-05-02 | Henrik Grubbström (Grubba) | |
#ifndef WIN32
#define WIN32 100 /* WinNT 1.0 */
#endif
|
e37d79 | 2004-05-10 | Marcus Agehall | |
|
963008 | 2013-10-03 | Henrik Grubbström (Grubba) | |
#if !defined(_WIN32_WINDOWS) || (_WIN32_WINDOWS < 0x5ff)
|
e37d79 | 2004-05-10 | Marcus Agehall | | #undef _WIN32_WINDOWS
|
963008 | 2013-10-03 | Henrik Grubbström (Grubba) | | #define _WIN32_WINDOWS 0x05ff
|
e37d79 | 2004-05-10 | Marcus Agehall | | #endif
|
963008 | 2013-10-03 | Henrik Grubbström (Grubba) | | #if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x5ff)
|
44da7e | 2004-05-11 | Henrik Grubbström (Grubba) | | #undef _WIN32_WINNT
|
963008 | 2013-10-03 | Henrik Grubbström (Grubba) | | #define _WIN32_WINNT 0x05ff
|
b3f7ab | 2009-05-27 | Henrik Grubbström (Grubba) | | #endif
|
963008 | 2013-10-03 | Henrik Grubbström (Grubba) | | #if !defined(NTDDI_VERSION) || (NTDDI_VERSION < 0x05ffffff)
|
b3f7ab | 2009-05-27 | Henrik Grubbström (Grubba) | | #undef NTDDI_VERSION
|
963008 | 2013-10-03 | Henrik Grubbström (Grubba) | | #define NTDDI_VERSION 0x05ffffff
|
44da7e | 2004-05-11 | Henrik Grubbström (Grubba) | | #endif
|
e37d79 | 2004-05-10 | Marcus Agehall | |
|
b401a5 | 2003-05-02 | Henrik Grubbström (Grubba) | | #endif /* __NT__ */
|
2d8041 | 2004-09-26 | Marcus Comstedt | | #ifdef __amigaos__
#define __USE_NETINET_IN_H
#endif
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | |
#ifdef MALLOC_REPLACED
#define NO_FIX_MALLOC
#endif
|
211d6b | 1996-12-05 | Fredrik Hübinette (Hubbe) | | #ifndef STRUCT_PROGRAM_DECLARED
#define STRUCT_PROGRAM_DECLARED
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | struct program;
|
211d6b | 1996-12-05 | Fredrik Hübinette (Hubbe) | | #endif
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | struct function;
|
211d6b | 1996-12-05 | Fredrik Hübinette (Hubbe) | | #ifndef STRUCT_SVALUE_DECLARED
#define STRUCT_SVALUE_DECLARED
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | struct svalue;
|
211d6b | 1996-12-05 | Fredrik Hübinette (Hubbe) | | #endif
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | struct sockaddr;
struct object;
struct array;
struct svalue;
|
ee8356 | 1998-08-07 | Henrik Grubbström (Grubba) | | #ifndef STRUCT_TIMEVAL_DECLARED
#define STRUCT_TIMEVAL_DECLARED
struct timeval;
#endif
|
e37ef2 | 2009-03-18 | Henrik Grubbström (Grubba) | | #ifndef CONFIGURE_TEST
|
cdb478 | 2010-05-30 | Martin Stjernholm | |
#ifndef PIKE_CORE
#ifdef PACKAGE_NAME
#define ORIG_PACKAGE_NAME PACKAGE_NAME
#undef PACKAGE_NAME
#endif
#ifdef PACKAGE_TARNAME
#define ORIG_PACKAGE_TARNAME PACKAGE_TARNAME
#undef PACKAGE_TARNAME
#endif
#ifdef PACKAGE_VERSION
#define ORIG_PACKAGE_VERSION PACKAGE_VERSION
#undef PACKAGE_VERSION
#endif
#ifdef PACKAGE_STRING
#define ORIG_PACKAGE_STRING PACKAGE_STRING
#undef PACKAGE_STRING
#endif
#ifdef PACKAGE_BUGREPORT
#define ORIG_PACKAGE_BUGREPORT PACKAGE_BUGREPORT
#undef PACKAGE_BUGREPORT
#endif
#ifdef PACKAGE_URL
#define ORIG_PACKAGE_URL PACKAGE_URL
#undef PACKAGE_URL
#endif
#endif
|
e37ef2 | 2009-03-18 | Henrik Grubbström (Grubba) | | #include "machine.h"
|
cdb478 | 2010-05-30 | Martin Stjernholm | |
#ifndef PIKE_CORE
#undef PACKAGE_NAME
#ifdef ORIG_PACKAGE_NAME
#define PACKAGE_NAME ORIG_PACKAGE_NAME
#undef ORIG_PACKAGE_NAME
#endif
#undef PACKAGE_TARNAME
#ifdef ORIG_PACKAGE_TARNAME
#define PACKAGE_TARNAME ORIG_PACKAGE_TARNAME
#undef ORIG_PACKAGE_TARNAME
#endif
#undef PACKAGE_VERSION
#ifdef ORIG_PACKAGE_VERSION
#define PACKAGE_VERSION ORIG_PACKAGE_VERSION
#undef ORIG_PACKAGE_VERSION
#endif
#undef PACKAGE_STRING
#ifdef ORIG_PACKAGE_STRING
#define PACKAGE_STRING ORIG_PACKAGE_STRING
#undef ORIG_PACKAGE_STRING
#endif
#undef PACKAGE_BUGREPORT
#ifdef ORIG_PACKAGE_BUGREPORT
#define PACKAGE_BUGREPORT ORIG_PACKAGE_BUGREPORT
#undef ORIG_PACKAGE_BUGREPORT
#endif
#undef PACKAGE_URL
#ifdef ORIG_PACKAGE_URL
#define PACKAGE_URL ORIG_PACKAGE_URL
#undef ORIG_PACKAGE_URL
#endif
#endif
|
e37ef2 | 2009-03-18 | Henrik Grubbström (Grubba) | | #endif
|
9a70e1 | 2006-08-02 | Martin Stjernholm | |
#define PIKE_YES 1
#define PIKE_NO 2
#define PIKE_UNKNOWN 3
#ifdef _SGI_SPROC_THREADS
#include <errno.h>
#if defined(HAVE_OSERROR) && !defined(errno)
#define errno (oserror())
#endif /* HAVE_OSERROR && !errno */
#endif /* _SGI_SPROC_THREADS */
#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 */
|
3d0aa4 | 2014-02-25 | Per Hedbor | | #ifdef HAS_BUILTIN_EXPECT
# define UNLIKELY(X) __builtin_expect( (X), 0 )
# define LIKELY(X) __builtin_expect( (X), 1 )
#else
# define UNLIKELY(X) X
# define LIKELY(X) X
#endif
|
9a70e1 | 2006-08-02 | Martin Stjernholm | | #ifndef HAVE_WORKING_REALLOC_NULL
#define realloc(PTR, SZ) pike_realloc(PTR,SZ)
#endif
#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)
|
189fd0 | 1997-01-28 | Fredrik Hübinette (Hubbe) | |
#define MAX_LOCAL 256
#ifndef NO_GC
#define GC2
#endif
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | |
|
75920f | 1997-12-28 | Fredrik Hübinette (Hubbe) | | #if defined(i386)
#ifndef HANDLES_UNALIGNED_MEMORY_ACCESS
#define HANDLES_UNALIGNED_MEMORY_ACCESS
#endif
#endif
|
cb2256 | 1995-10-11 | Fredrik Hübinette (Hubbe) | |
|
44e294 | 2000-08-11 | Henrik Grubbström (Grubba) | | #if HAVE_ALLOCA_H
# include <alloca.h>
# ifdef __GNUC__
# ifdef alloca
# undef alloca
# endif
# define alloca __builtin_alloca
|
13670c | 2015-05-25 | Martin Nilsson | | # endif
|
cb2256 | 1995-10-11 | Fredrik Hübinette (Hubbe) | | #else
|
44e294 | 2000-08-11 | Henrik Grubbström (Grubba) | | # ifdef __GNUC__
# ifdef alloca
# undef alloca
# endif
# define alloca __builtin_alloca
|
cb2256 | 1995-10-11 | Fredrik Hübinette (Hubbe) | | # else
# ifdef _AIX
|
b6163c | 2015-05-08 | Martin Nilsson | | #pragma alloca
|
cb2256 | 1995-10-11 | Fredrik Hübinette (Hubbe) | | # else
# ifndef alloca /* predefined by HP cc +Olibcalls */
|
44e294 | 2000-08-11 | Henrik Grubbström (Grubba) | | void *alloca();
|
cb2256 | 1995-10-11 | Fredrik Hübinette (Hubbe) | | # endif
# endif
# endif
|
5401b6 | 1999-08-06 | Fredrik Hübinette (Hubbe) | | #endif
|
a3d609 | 2004-09-26 | Marcus Comstedt | | #ifdef HAVE_DEVICES_TIMER_H
#include <devices/timer.h>
#endif
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | #include <stdio.h>
|
c3df54 | 2008-10-06 | Martin Stjernholm | | #include <stdarg.h>
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | |
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
|
ada73b | 1999-07-15 | Henrik Grubbström (Grubba) | | #ifdef HAVE_STDDEF_H
|
1e577b | 1999-07-15 | Fredrik Hübinette (Hubbe) | | #include <stddef.h>
#endif
|
75920f | 1997-12-28 | Fredrik Hübinette (Hubbe) | | #ifdef HAVE_MALLOC_H
|
31c8ed | 2003-04-17 | Xavier Beaudouin | | #if !defined(__FreeBSD__) && !defined(__OpenBSD__)
|
2139ba | 2003-04-16 | Xavier Beaudouin | |
|
75920f | 1997-12-28 | Fredrik Hübinette (Hubbe) | | #include <malloc.h>
|
31c8ed | 2003-04-17 | Xavier Beaudouin | | #endif /* !__FreeBSD__ && !__OpenBSD */
|
75920f | 1997-12-28 | Fredrik Hübinette (Hubbe) | | #endif
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | #ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
|
9aa6fa | 1997-05-19 | Fredrik Hübinette (Hubbe) | | #ifdef HAVE_LIMITS_H
#include <limits.h>
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | #endif
|
9aa6fa | 1997-05-19 | Fredrik Hübinette (Hubbe) | | #ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
|
419ede | 1996-11-13 | Fredrik Hübinette (Hubbe) | | #endif
|
9aa6fa | 1997-05-19 | Fredrik Hübinette (Hubbe) | | #ifdef HAVE_MEMORY_H
#include <memory.h>
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | #endif
|
b4dd8c | 1999-06-19 | Fredrik Hübinette (Hubbe) | | #ifdef HAVE_WINDOWS_H
#include <windows.h>
#endif
|
8ae049 | 2003-11-07 | Martin Stjernholm | | #include <float.h>
|
4087a1 | 2003-05-01 | Henrik Grubbström (Grubba) | |
#include "pike_int_types.h"
|
2b0d73 | 2000-01-09 | Fredrik Hübinette (Hubbe) | |
|
bed960 | 1997-05-19 | Fredrik Hübinette (Hubbe) | | #define SIZE_T unsigned INT32
|
7e877a | 2003-04-02 | Martin Stjernholm | | #define TYPE_T unsigned int
|
bed960 | 1997-05-19 | Fredrik Hübinette (Hubbe) | | #define TYPE_FIELD unsigned INT16
|
6d2254 | 1998-01-28 | Fredrik Hübinette (Hubbe) | | #define B1_T char
|
bed960 | 1997-05-19 | Fredrik Hübinette (Hubbe) | |
|
6d2254 | 1998-01-28 | Fredrik Hübinette (Hubbe) | | #if SIZEOF_SHORT == 2
#define B2_T short
#elif SIZEOF_INT == 2
#define B2_T int
#endif
#if SIZEOF_SHORT == 4
#define B4_T short
#elif SIZEOF_INT == 4
#define B4_T int
#elif SIZEOF_LONG == 4
#define B4_T long
#endif
#if SIZEOF_INT == 8
#define B8_T int
#elif SIZEOF_LONG == 8
#define B8_T long
|
3f3e4d | 2000-08-03 | Henrik Grubbström (Grubba) | | #elif (SIZEOF_LONG_LONG - 0) == 8
#define B8_T long long
#elif (SIZEOF___INT64 - 0) == 8
#define B8_T __int64
|
6d2254 | 1998-01-28 | Fredrik Hübinette (Hubbe) | | #elif SIZEOF_CHAR_P == 8
#define B8_T char *
#elif defined(B4_T)
struct b8_t_s { B4_T x,y; };
|
52fcc8 | 1998-01-28 | Fredrik Hübinette (Hubbe) | | #define B8_T struct b8_t_s
|
6d2254 | 1998-01-28 | Fredrik Hübinette (Hubbe) | | #endif
|
52fcc8 | 1998-01-28 | Fredrik Hübinette (Hubbe) | | #if defined(B8_T)
|
2de118 | 1998-01-28 | Fredrik Hübinette (Hubbe) | | struct b16_t_s { B8_T x,y; };
|
52fcc8 | 1998-01-28 | Fredrik Hübinette (Hubbe) | | #define B16_T struct b16_t_s
|
6d2254 | 1998-01-28 | Fredrik Hübinette (Hubbe) | | #endif
|
9aa6fa | 1997-05-19 | Fredrik Hübinette (Hubbe) | |
|
4087a1 | 2003-05-01 | Henrik Grubbström (Grubba) | |
#ifndef MAX_INT_TYPE
# if defined (WITH_SHORT_INT)
# define MAX_INT_TYPE SHRT_MAX
# define MIN_INT_TYPE SHRT_MIN
# define PRINTPIKEINT "h"
|
7c1a31 | 2003-11-07 | Martin Stjernholm | | # define INT_ARG_TYPE int
|
4087a1 | 2003-05-01 | Henrik Grubbström (Grubba) | |
# elif defined (WITH_INT_INT)
# define MAX_INT_TYPE INT_MAX
# define MIN_INT_TYPE INT_MIN
# define PRINTPIKEINT ""
# elif defined (WITH_LONG_INT)
# define MAX_INT_TYPE LONG_MAX
# define MIN_INT_TYPE LONG_MIN
# define PRINTPIKEINT "l"
# elif defined (WITH_LONG_LONG_INT)
# ifdef LLONG_MAX
# define MAX_INT_TYPE LLONG_MAX
# define MIN_INT_TYPE LLONG_MIN
# else
# define MAX_INT_TYPE LONG_LONG_MAX
# define MIN_INT_TYPE LONG_LONG_MIN
# endif
# define PRINTPIKEINT "ll"
# endif
#endif
|
7c1a31 | 2003-11-07 | Martin Stjernholm | |
#ifndef INT_ARG_TYPE
#define INT_ARG_TYPE INT_TYPE
#endif
|
4087a1 | 2003-05-01 | Henrik Grubbström (Grubba) | | #if SIZEOF_INT_TYPE - 0 == 0
# error Unsupported type chosen for native pike integers.
#endif
#if SIZEOF_INT_TYPE != 4
# define INT_TYPE_INT32_CONVERSION
#endif
#if defined (WITH_LONG_DOUBLE_PRECISION_SVALUE)
|
8ae049 | 2003-11-07 | Martin Stjernholm | |
# define PIKEFLOAT_MANT_DIG LDBL_MANT_DIG
# define PIKEFLOAT_DIG LDBL_DIG
# define PIKEFLOAT_MIN_EXP LDBL_MIN_EXP
# define PIKEFLOAT_MAX_EXP LDBL_MAX_EXP
# define PIKEFLOAT_MIN_10_EXP LDBL_MIN_10_EXP
# define PIKEFLOAT_MAX_10_EXP LDBL_MAX_10_EXP
# define PIKEFLOAT_MAX LDBL_MAX
# define PIKEFLOAT_MIN LDBL_MIN
# define PIKEFLOAT_EPSILON LDBL_EPSILON
# define PRINTPIKEFLOAT "L"
|
4087a1 | 2003-05-01 | Henrik Grubbström (Grubba) | | #elif defined (WITH_DOUBLE_PRECISION_SVALUE)
|
8ae049 | 2003-11-07 | Martin Stjernholm | |
# define PIKEFLOAT_MANT_DIG DBL_MANT_DIG
# define PIKEFLOAT_DIG DBL_DIG
# define PIKEFLOAT_MIN_EXP DBL_MIN_EXP
# define PIKEFLOAT_MAX_EXP DBL_MAX_EXP
# define PIKEFLOAT_MIN_10_EXP DBL_MIN_10_EXP
# define PIKEFLOAT_MAX_10_EXP DBL_MAX_10_EXP
# define PIKEFLOAT_MAX DBL_MAX
# define PIKEFLOAT_MIN DBL_MIN
# define PIKEFLOAT_EPSILON DBL_EPSILON
# define PRINTPIKEFLOAT ""
|
4087a1 | 2003-05-01 | Henrik Grubbström (Grubba) | | #else
|
8ae049 | 2003-11-07 | Martin Stjernholm | |
# define PIKEFLOAT_MANT_DIG FLT_MANT_DIG
# define PIKEFLOAT_DIG FLT_DIG
# define PIKEFLOAT_MIN_EXP FLT_MIN_EXP
# define PIKEFLOAT_MAX_EXP FLT_MAX_EXP
# define PIKEFLOAT_MIN_10_EXP FLT_MIN_10_EXP
# define PIKEFLOAT_MAX_10_EXP FLT_MAX_10_EXP
# define PIKEFLOAT_MAX FLT_MAX
# define PIKEFLOAT_MIN FLT_MIN
# define PIKEFLOAT_EPSILON FLT_EPSILON
# define PRINTPIKEFLOAT ""
|
7c1a31 | 2003-11-07 | Martin Stjernholm | | # define FLOAT_ARG_TYPE double
#endif
|
8ae049 | 2003-11-07 | Martin Stjernholm | |
|
7c1a31 | 2003-11-07 | Martin Stjernholm | |
#ifndef FLOAT_ARG_TYPE
#define FLOAT_ARG_TYPE FLOAT_TYPE
|
4087a1 | 2003-05-01 | Henrik Grubbström (Grubba) | | #endif
#if SIZEOF_FLOAT_TYPE - 0 == 0
#error Unsupported type chosen for pike floats.
#endif
|
0e4bb8 | 2008-06-29 | Martin Stjernholm | |
|
3e625c | 1998-10-11 | Fredrik Hübinette (Hubbe) | | typedef unsigned char p_wchar0;
typedef unsigned INT16 p_wchar1;
|
0e4bb8 | 2008-06-29 | Martin Stjernholm | | typedef signed INT32 p_wchar2;
|
3e625c | 1998-10-11 | Fredrik Hübinette (Hubbe) | |
|
3ef466 | 1999-02-27 | Henrik Grubbström (Grubba) | | typedef struct p_wchar_p
{
|
dcdb23 | 2014-08-28 | Per Hedbor | | void *ptr;
|
3ef466 | 1999-02-27 | Henrik Grubbström (Grubba) | | int shift;
} PCHARP;
|
9aa6fa | 1997-05-19 | Fredrik Hübinette (Hubbe) | |
|
2e5090 | 2011-03-09 | Martin Nilsson | |
|
0378a2 | 2003-02-11 | Martin Stjernholm | | #define RCSID(X)
|
bed960 | 1997-05-19 | Fredrik Hübinette (Hubbe) | |
|
ae9503 | 1999-04-07 | Fredrik Hübinette (Hubbe) | | #ifdef PIKE_DEBUG
|
74e6b3 | 2009-03-15 | Martin Stjernholm | |
|
ae9503 | 1999-04-07 | Fredrik Hübinette (Hubbe) | | #define DO_IF_DEBUG(X) X
|
74e6b3 | 2009-03-15 | Martin Stjernholm | | #define DO_IF_DEBUG_ELSE(DEBUG, NO_DEBUG) DEBUG
|
8fb3f8 | 2010-04-16 | Martin Stjernholm | | #undef NDEBUG
|
74e6b3 | 2009-03-15 | Martin Stjernholm | |
#define DLOC __FILE__, __LINE__
#define COMMA_DLOC , __FILE__, __LINE__
#define DLOC_DECL const char *dloc_file, int dloc_line
#define COMMA_DLOC_DECL , const char *dloc_file, int dloc_line
#define DLOC_ARGS dloc_file, dloc_line
#define DLOC_PF(PRE, SUF) PRE "%s:%d" SUF
#define DLOC_ARGS_OPT dloc_file, dloc_line
#define COMMA_DLOC_ARGS_OPT , dloc_file, dloc_line
|
9a8ddb | 2014-11-16 | Henrik Grubbström (Grubba) | | #define USE_DLOC_ARGS() ((void)(DLOC_ARGS_OPT))
|
74e6b3 | 2009-03-15 | Martin Stjernholm | | #define DLOC_ENABLED
#else /* !PIKE_DEBUG */
|
ae9503 | 1999-04-07 | Fredrik Hübinette (Hubbe) | | #define DO_IF_DEBUG(X)
|
74e6b3 | 2009-03-15 | Martin Stjernholm | | #define DO_IF_DEBUG_ELSE(DEBUG, NO_DEBUG) NO_DEBUG
|
518963 | 2001-06-04 | Martin Stjernholm | | #define NDEBUG
|
74e6b3 | 2009-03-15 | Martin Stjernholm | |
#define DLOC
#define COMMA_DLOC
#define DLOC_DECL
#define COMMA_DLOC_DECL
#define DLOC_ARGS __FILE__, __LINE__
#define DLOC_PF(PRE, SUF)
#define DLOC_ARGS_OPT
#define COMMA_DLOC_ARGS_OPT
|
9a8ddb | 2014-11-16 | Henrik Grubbström (Grubba) | | #define USE_DLOC_ARGS()
|
74e6b3 | 2009-03-15 | Martin Stjernholm | |
#endif /* !PIKE_DEBUG */
|
ae9503 | 1999-04-07 | Fredrik Hübinette (Hubbe) | |
|
807294 | 2010-10-10 | Martin Stjernholm | | #include <assert.h>
|
cd9dfa | 2008-03-29 | Martin Stjernholm | | #if defined (PIKE_DEBUG) || defined (DO_PIKE_CLEANUP)
#define DO_IF_DEBUG_OR_CLEANUP(X) X
#else
#define DO_IF_DEBUG_OR_CLEANUP(X)
#endif
|
a8a813 | 2002-09-13 | Martin Stjernholm | | #ifdef INTERNAL_PROFILING
#define DO_IF_INTERNAL_PROFILING(X) X
#else
#define DO_IF_INTERNAL_PROFILING(X)
#endif
|
61f1c7 | 2004-09-26 | Marcus Comstedt | | #ifndef INLINE
|
71f3a2 | 1998-11-22 | Fredrik Hübinette (Hubbe) | | #if defined(__GNUC__) && !defined(PIKE_DEBUG) && !defined(lint)
|
9aa6fa | 1997-05-19 | Fredrik Hübinette (Hubbe) | | #define INLINE inline
#else
#define INLINE
#endif
|
61f1c7 | 2004-09-26 | Marcus Comstedt | | #endif
|
bed960 | 1997-05-19 | Fredrik Hübinette (Hubbe) | |
|
74dfe8 | 2012-12-30 | Jonas Walldén | |
|
2a84e9 | 2014-11-16 | Henrik Grubbström (Grubba) | | #ifndef PIKE_UNUSED_ATTRIBUTE
|
74dfe8 | 2012-12-30 | Jonas Walldén | | # ifdef __GNUC__
|
2a84e9 | 2014-11-16 | Henrik Grubbström (Grubba) | | # define PIKE_UNUSED_ATTRIBUTE __attribute__((unused))
|
74dfe8 | 2012-12-30 | Jonas Walldén | | # else
|
2a84e9 | 2014-11-16 | Henrik Grubbström (Grubba) | | # define PIKE_UNUSED_ATTRIBUTE
|
74dfe8 | 2012-12-30 | Jonas Walldén | | # endif
#endif
|
2a84e9 | 2014-11-16 | Henrik Grubbström (Grubba) | | #ifndef PIKE_UNUSED
# define PIKE_UNUSED(x) PIKE_CONCAT(x,_UNUSED) PIKE_UNUSED_ATTRIBUTE
#endif
|
03ce31 | 2014-10-01 | Henrik Grubbström (Grubba) | | #ifndef UNUSED
|
2a84e9 | 2014-11-16 | Henrik Grubbström (Grubba) | | # define UNUSED(x) PIKE_UNUSED(x)
|
03ce31 | 2014-10-01 | Henrik Grubbström (Grubba) | | #endif
|
1d4cf1 | 2014-08-22 | Arne Goedeke | | #ifdef PIKE_DEBUG
# define DEBUGUSED(x) x
#else
|
03ce31 | 2014-10-01 | Henrik Grubbström (Grubba) | | # define DEBUGUSED(x) PIKE_UNUSED(x)
|
74dfe8 | 2012-12-30 | Jonas Walldén | | #endif
|
1d4cf1 | 2014-08-22 | Arne Goedeke | | #ifdef DEBUG_MALLOC
# define DMALLOCUSED(x) x
#else
|
03ce31 | 2014-10-01 | Henrik Grubbström (Grubba) | | # define DMALLOCUSED(x) PIKE_UNUSED(x)
|
1d4cf1 | 2014-08-22 | Arne Goedeke | | #endif
|
74dfe8 | 2012-12-30 | Jonas Walldén | |
|
89b011 | 2006-07-05 | Martin Stjernholm | |
|
2ba1a4 | 2003-03-29 | Henrik Grubbström (Grubba) | | #ifndef PMOD_EXPORT
|
89b011 | 2006-07-05 | Martin Stjernholm | | # if defined (__NT__) && defined (USE_DLL)
# ifdef DYNAMIC_MODULE
# define PMOD_EXPORT __declspec(dllimport)
# else
# define PMOD_EXPORT __declspec(dllexport)
# endif
|
4e69ce | 2012-12-29 | Jonas Walldén | | # elif defined(__clang__) && defined(MAC_OS_X_VERSION_MIN_REQUIRED)
# define PMOD_EXPORT __attribute__ ((visibility("default")))
|
bde77e | 2011-05-01 | Per Hedbor | | # elif __GNUC__ >= 4
|
871b01 | 2011-05-02 | Per Hedbor | | # ifdef DYNAMIC_MODULE
# define PMOD_EXPORT __attribute__ ((visibility("default")))
# else
# define PMOD_EXPORT __attribute__ ((visibility("protected")))
# endif
|
13670c | 2015-05-25 | Martin Nilsson | | # else
|
89b011 | 2006-07-05 | Martin Stjernholm | | # define PMOD_EXPORT
# endif
#endif
|
1f2133 | 2000-07-28 | Fredrik Hübinette (Hubbe) | |
#ifndef PMOD_PROTO
#define PMOD_PROTO
#endif
|
343c59 | 2004-03-16 | Martin Stjernholm | | #ifndef DO_PIKE_CLEANUP
|
9fb79c | 2004-09-27 | Martin Stjernholm | | #if defined(PURIFY) || defined(__CHECKER__) || defined(DEBUG_MALLOC)
|
ae9503 | 1999-04-07 | Fredrik Hübinette (Hubbe) | | #define DO_PIKE_CLEANUP
#endif
|
343c59 | 2004-03-16 | Martin Stjernholm | | #endif
|
ae9503 | 1999-04-07 | Fredrik Hübinette (Hubbe) | |
|
9b8163 | 2000-08-07 | Henrik Grubbström (Grubba) | |
#define DO_NOT_WARN(X) (X)
|
ec2bab | 2000-06-24 | Fredrik Hübinette (Hubbe) | |
|
eef59f | 2000-08-17 | Henrik Grubbström (Grubba) | |
#ifdef __ECL
|
54a130 | 2004-06-02 | Martin Nilsson | | static INLINE long PTRDIFF_T_TO_LONG(ptrdiff_t x)
|
eef59f | 2000-08-17 | Henrik Grubbström (Grubba) | | {
return DO_NOT_WARN((long)x);
}
#else /* !__ECL */
#define PTRDIFF_T_TO_LONG(x) ((long)(x))
#endif /* __ECL */
|
5ce64f | 2009-03-19 | Henrik Grubbström (Grubba) | | #ifndef HAVE_STRUCT_IOVEC
#define HAVE_STRUCT_IOVEC
struct iovec {
void *iov_base;
size_t iov_len;
};
#endif /* !HAVE_STRUCT_IOVEC */
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | #include "port.h"
|
61e9a0 | 1998-01-25 | Fredrik Hübinette (Hubbe) | | #include "dmalloc.h"
|
88696e | 2007-06-18 | Martin Stjernholm | |
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | |
#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
|
0a2d76 | 2014-04-27 | Martin Nilsson | | void *malloc PROT((int));
void *realloc PROT((void *,int));
void free PROT((void *));
void *calloc PROT((int,int));
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | #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
|
8301e4 | 2000-08-20 | Henrik Grubbström (Grubba) | | #ifdef USE_CRYPT_C
|
74b3d3 | 2003-12-07 | Marcus Comstedt | | char *crypt(const char *, const char *);
|
8301e4 | 2000-08-20 | Henrik Grubbström (Grubba) | | #endif /* USE_CRYPT_C */
|
21aa9b | 2000-12-13 | Fredrik Hübinette (Hubbe) | |
#define Pike_error_present
|
391350 | 2002-06-25 | Henrik Grubbström (Grubba) | |
#define USE_PIKE_TYPE 2
|
d68a07 | 2001-02-20 | Henrik Grubbström (Grubba) | |
|
3a2a73 | 2002-04-09 | Mikael Brandström | |
|
b2630d | 2004-05-20 | Henrik Grubbström (Grubba) | | #if defined(PROFILING)
|
3a2a73 | 2002-04-09 | Mikael Brandström | | #define DO_IF_PROFILING(X) X
#else
#define DO_IF_PROFILING(X)
#endif
|
b2630d | 2004-05-20 | Henrik Grubbström (Grubba) | |
#ifdef PROFILING_DEBUG
#define DO_IF_PROFILING_DEBUG(X) X
#else /* !PROFILING_DEBUG */
#define DO_IF_PROFILING_DEBUG(X)
#endif /* PROFILING_DEBUG */
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | #endif
|