cb2256 | 1995-10-11 | Fredrik Hübinette (Hubbe) | | |
06983f | 1996-09-22 | Fredrik Hübinette (Hubbe) | | ||| This file a part of Pike, and is copyright by Fredrik Hubinette
||| Pike is distributed as GPL (General Public License)
|
cb2256 | 1995-10-11 | Fredrik Hübinette (Hubbe) | | ||| See the files COPYING and DISCLAIMER for more information.
\*/
|
24ddc7 | 1998-03-28 | Henrik Grubbström (Grubba) | |
|
b4dd8c | 1999-06-19 | Fredrik Hübinette (Hubbe) | | * $Id: global.h,v 1.35 1999/06/19 20:00:09 hubbe Exp $
|
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) | |
|
7fbe09 | 1999-05-11 | Fredrik Hübinette (Hubbe) | | #if defined(__WINNT__) && !defined(__NT__)
#define __NT__
#endif
|
6e04e6 | 1999-04-25 | Henrik Grubbström (Grubba) | |
#ifdef __TenDRA__
#pragma TenDRA longlong type allow
#pragma TenDRA set longlong type : long long
|
32ef4c | 1999-04-25 | Henrik Grubbström (Grubba) | |
|
a29837 | 1999-04-25 | Henrik Grubbström (Grubba) | | #ifdef _NO_LONGLONG
#undef _NO_LONGLONG
#endif /* _NO_LONGLONG */
|
6e04e6 | 1999-04-25 | Henrik Grubbström (Grubba) | | #endif /* __TenDRA__ */
|
a2326e | 1998-03-25 | Per Hedbor | | #ifndef _LARGEFILE_SOURCE
# define _FILE_OFFSET_BITS 64
# define _LARGEFILE_SOURCE
|
fedf13 | 1998-03-25 | Fredrik Hübinette (Hubbe) | | # define _LARGEFILE64_SOURCE 1
|
a2326e | 1998-03-25 | Per Hedbor | | #endif
|
90dc92 | 1998-06-12 | Fredrik Noring | |
#ifndef __STDC_EXT__
# define __STDC_EXT__
#endif /* !__STDC_EXT__ */
|
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
|
cb2256 | 1995-10-11 | Fredrik Hübinette (Hubbe) | | #include "machine.h"
|
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) | |
#ifdef __GNUC__
# ifdef alloca
# undef alloca
# endif
# define alloca __builtin_alloca
#else
# if HAVE_ALLOCA_H
# include <alloca.h>
# else
# ifdef _AIX
|
5c8e89 | 1995-10-29 | Fredrik Hübinette (Hubbe) | | #pragma alloca
|
cb2256 | 1995-10-11 | Fredrik Hübinette (Hubbe) | | # else
# ifndef alloca /* predefined by HP cc +Olibcalls */
char *alloca ();
# endif
# endif
# endif
#endif
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | #include <stdio.h>
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
|
a4e1c4 | 1996-08-06 | Fredrik Hübinette (Hubbe) | | #undef HAVE_STDLIB_H
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | #endif
|
75920f | 1997-12-28 | Fredrik Hübinette (Hubbe) | | #ifdef HAVE_MALLOC_H
#include <malloc.h>
#undef HAVE_MALLOC_H
#endif
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | #ifdef HAVE_UNISTD_H
#include <unistd.h>
|
a4e1c4 | 1996-08-06 | Fredrik Hübinette (Hubbe) | | #undef HAVE_UNISTD_H
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | #endif
#ifdef HAVE_STRING_H
#include <string.h>
|
a4e1c4 | 1996-08-06 | Fredrik Hübinette (Hubbe) | | #undef HAVE_STRING_H
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | #endif
|
9aa6fa | 1997-05-19 | Fredrik Hübinette (Hubbe) | | #ifdef HAVE_LIMITS_H
#include <limits.h>
#undef HAVE_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>
#undef HAVE_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>
#undef HAVE_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>
#undef HAVE_WINDOWS_H
#endif
|
bed960 | 1997-05-19 | Fredrik Hübinette (Hubbe) | |
|
9aa6fa | 1997-05-19 | Fredrik Hübinette (Hubbe) | |
|
bed960 | 1997-05-19 | Fredrik Hübinette (Hubbe) | |
#define INT64 long long
#if SIZEOF_SHORT >= 4
#define INT32 short
#else
#if SIZEOF_INT >= 4
#define INT32 int
#else
#define INT32 long
#endif
#endif
|
b660c8 | 1999-03-01 | Fredrik Hübinette (Hubbe) | | #define MAX_INT32 2147483647
#define MIN_INT32 -2147483648
|
bed960 | 1997-05-19 | Fredrik Hübinette (Hubbe) | | #define INT16 short
#define INT8 char
#define SIZE_T unsigned INT32
#define TYPE_T unsigned INT8
#define TYPE_FIELD unsigned INT16
|
673b2c | 1997-08-12 | Per Hedbor | | #define FLOAT_TYPE float
|
f19735 | 1998-02-27 | Fredrik Hübinette (Hubbe) | | #define INT_TYPE INT32
|
bed960 | 1997-05-19 | Fredrik Hübinette (Hubbe) | |
|
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
#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) | |
|
3e625c | 1998-10-11 | Fredrik Hübinette (Hubbe) | | typedef unsigned char p_wchar0;
typedef unsigned INT16 p_wchar1;
typedef unsigned INT32 p_wchar2;
|
3ef466 | 1999-02-27 | Henrik Grubbström (Grubba) | | typedef struct p_wchar_p
{
p_wchar0 *ptr;
int shift;
} PCHARP;
|
9aa6fa | 1997-05-19 | Fredrik Hübinette (Hubbe) | |
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
#define RCSID(X) \
static char *rcsid __attribute__ ((unused)) =X
#elif __GNUC__ == 2
#define RCSID(X) \
static char *rcsid = X; \
static void *use_rcsid=(&use_rcsid, (void *)&rcsid)
#else
#define RCSID(X) \
static char *rcsid = X
|
bed960 | 1997-05-19 | Fredrik Hübinette (Hubbe) | | #endif
|
ae9503 | 1999-04-07 | Fredrik Hübinette (Hubbe) | | #ifdef PIKE_DEBUG
#define DO_IF_DEBUG(X) X
#else
#define DO_IF_DEBUG(X)
#endif
|
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
|
bed960 | 1997-05-19 | Fredrik Hübinette (Hubbe) | |
|
ae9503 | 1999-04-07 | Fredrik Hübinette (Hubbe) | | #if defined(PURIFY) || defined(__CHECKER__) || defined(DEBUG_MALLOC)
#define DO_PIKE_CLEANUP
#endif
|
5267b7 | 1995-08-09 | Fredrik Hübinette (Hubbe) | | #include "port.h"
|
61e9a0 | 1998-01-25 | Fredrik Hübinette (Hubbe) | | #include "dmalloc.h"
|
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
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
|