1
  
2
  
3
  
4
  
5
  
6
  
7
  
8
  
9
  
10
  
11
  
12
  
13
  
14
  
15
  
16
  
17
  
18
  
19
  
20
  
21
  
22
  
23
  
24
  
25
  
26
  
27
  
28
  
29
  
30
  
31
  
32
  
33
  
34
  
35
  
36
  
37
  
38
  
39
  
40
  
41
  
42
  
43
  
44
  
45
  
46
  
47
  
48
  
49
  
50
  
51
  
52
  
53
  
54
  
55
  
56
  
57
  
58
  
59
  
60
  
61
  
62
  
63
  
64
  
65
  
66
  
67
  
68
  
69
  
70
  
71
  
72
  
73
  
74
  
75
  
76
  
77
  
78
  
79
  
80
  
81
  
82
  
83
  
84
  
85
  
86
  
87
  
88
  
89
  
90
  
91
  
92
  
93
  
94
  
95
  
96
  
97
  
98
  
99
  
100
  
101
  
102
  
103
  
104
  
105
  
106
  
107
  
108
  
109
  
110
  
111
  
112
  
113
  
114
  
115
  
116
  
117
  
118
  
119
  
/*\ 
||| This file a part of uLPC, and is copyright by Fredrik Hubinette 
||| uLPC is distributed as GPL (General Public License) 
||| See the files COPYING and DISCLAIMER for more information. 
\*/ 
#ifndef GLOBAL_H 
#define GLOBAL_H 
 
#define POSIX_SOURCE 
 
/* 
 * 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; 
 
#include "machine.h" 
#include "config.h" 
 
/* 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 
 #pragma alloca 
#  else 
#   ifndef alloca /* predefined by HP cc +Olibcalls */ 
char *alloca (); 
#   endif 
#  endif 
# endif 
#endif 
 
#include <stdio.h> 
 
#ifdef HAVE_STDLIB_H 
#include <stdlib.h> 
#endif 
 
#ifdef HAVE_UNISTD_H 
#include <unistd.h> 
#endif 
 
#ifdef HAVE_STRING_H 
#include <string.h> 
#endif 
 
#ifdef HAVE_MEMORY_H 
#include <memory.h> 
#endif 
 
#ifdef DEBUG 
#include "debug.h" 
#endif 
 
#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