Apache2
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
apr_private.h
Go to the documentation of this file.
1 /* Licensed to the Apache Software Foundation (ASF) under one or more
2  * contributor license agreements. See the NOTICE file distributed with
3  * this work for additional information regarding copyright ownership.
4  * The ASF licenses this file to You under the Apache License, Version 2.0
5  * (the "License"); you may not use this file except in compliance with
6  * the License. You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 /*
18  * Note:
19  * This is the netware-specific autoconf-like config file
20  * which unix creates at ./configure time.
21  */
22 
23 #ifndef APR_PRIVATE_H
24 #define APR_PRIVATE_H
25 
26 /* Pick up publicly advertised headers and symbols before the
27  * APR internal private headers and symbols
28  */
29 #include <apr.h>
30 
31 /* Pick up privately consumed headers */
32 #include <ndkvers.h>
33 
34 /* Include alloca.h to get compiler-dependent defines */
35 #include <alloca.h>
36 
37 /* Use this section to define all of the HAVE_FOO_H
38  * that are required to build properly.
39  */
40 #define HAVE_ALLOCA_H 1
41 #define HAVE_DLFCN_H 1
42 #define HAVE_LIMITS_H 1
43 #define HAVE_SIGNAL_H 1
44 #define HAVE_STDDEF_H 1
45 #define HAVE_STDLIB_H 1
46 #ifndef USE_WINSOCK
47 #define HAVE_SYS_SELECT_H 1
48 #define HAVE_WRITEV 1
49 #endif
50 #define HAVE_SYS_STAT_H 1
51 #define HAVE_SYS_MMAN_H 1
52 #define HAVE_FCNTL_H 1
53 #define HAVE_ICONV_H 1
54 #define HAVE_UTIME_H 1
55 
56 #define HAVE_STRICMP 1
57 #define HAVE_STRNICMP 1
58 #define HAVE_STRDUP 1
59 #define HAVE_STRSTR 1
60 #define HAVE_MEMCHR 1
61 #define HAVE_CALLOC 1
62 #define HAVE_UTIME 1
63 
64 #define HAVE_GETENV 1
65 #define HAVE_SETENV 1
66 #define HAVE_UNSETENV 1
67 
68 #define HAVE_WRITEV 1
69 
70 #define HAVE_GETPASS_R 1
71 /*
72  * Hack around older NDKs which have only the getpassword() function,
73  * a threadsafe, API-equivalent of getpass_r().
74  */
75 #if (CURRENT_NDK_THRESHOLD < 709060000)
76 #define getpass_r getpassword
77 #endif
78 
79 #ifdef NW_BUILD_IPV6
80 #define HAVE_GETADDRINFO 1
81 #define HAVE_GETNAMEINFO 1
82 #endif
83 
84 /* 1 is used for SIGABRT on netware */
85 /* 2 is used for SIGFPE on netware */
86 /* 3 is used for SIGILL on netware */
87 /* 4 is used for SIGINT on netware */
88 /* 5 is used for SIGSEGV on netware */
89 /* 6 is used for SIGTERM on netware */
90 /* 7 is used for SIGPOLL on netware */
91 
92 #if (CURRENT_NDK_THRESHOLD < 306030000)
93 #define SIGKILL 11
94 #define SIGALRM 13
95 #define SIGCHLD 14
96 #define SIGCONT 15
97 #define SIGHUP 16
98 #define SIGPIPE 17
99 #define SIGQUIT 18
100 #define SIGSTOP 19
101 #define SIGTSTP 20
102 #define SIGTTIN 21
103 #define SIGTTOU 22
104 #define SIGUSR1 23
105 #define SIGUSR2 24
106 #endif
107 
108 #define SIGTRAP 25
109 #define SIGIOT 26
110 #define SIGSTKFLT 28
111 #define SIGURG 29
112 #define SIGXCPU 30
113 #define SIGXFSZ 31
114 #define SIGVTALRM 32
115 #define SIGPROF 33
116 #define SIGWINCH 34
117 #define SIGIO 35
118 
119 #if (CURRENT_NDK_THRESHOLD < 406230000)
120 #undef SA_NOCLDSTOP
121 #define SA_NOCLDSTOP 0x00000001
122 #endif
123 #ifndef SIGBUS
124 #define SIGBUS SIGSEGV
125 #endif
126 
127 #define _getch() getcharacter()
128 
129 #define SIZEOF_CHAR 1
130 #define SIZEOF_SHORT 2
131 #define SIZEOF_INT 4
132 #define SIZEOF_LONGLONG 8
133 #define SIZEOF_SSIZE_T SIZEOF_INT
134 
136 
137 /* NLM registration routines for managing which NLMs
138  are using the library. */
139 int register_NLM(void *NLMHandle);
140 int unregister_NLM(void *NLMHandle);
141 
142 /* Application global data management */
143 extern int gLibId;
144 extern void *gLibHandle;
145 
146 typedef struct app_data {
148  void* gPool;
157  rtag_t gs_pcp_rtag;
159 } APP_DATA;
160 
161 int setGlobalPool(void *data);
162 void* getGlobalPool();
163 int setStatCache(void *data);
164 void* getStatCache();
165 
166 /* Redefine malloc to use the library malloc call so
167  that all of the memory resources will be owned
168  and can be shared by the library. */
169 #undef malloc
170 #define malloc(x) library_malloc(gLibHandle,x)
171 #ifndef __MWERKS__
172 #define _alloca alloca
173 #endif
174 
175 /* 64-bit integer conversion function */
176 #define APR_INT64_STRFN strtoll
177 
178 #if APR_HAS_LARGE_FILES
179 #define APR_OFF_T_STRFN strtoll
180 #else
181 #define APR_OFF_T_STRFN strtol
182 #endif
183 
184 /* used to check DWORD overflow for 64bit compiles */
185 #define APR_DWORD_MAX 0xFFFFFFFFUL
186 
187 /* Always compile Netware with DSO support for .nlm builds */
188 #define APU_DSO_BUILD 0
189 
190 /*
191  * NetWare does not have GDBM, and we always use the bundled (new) Expat
192  */
193 
194 /* Define if you have the gdbm library (-lgdbm). */
195 /* #undef HAVE_LIBGDBM */
196 
197 /* define if Expat 1.0 or 1.1 was found */
198 /* #undef APR_HAVE_OLD_EXPAT */
199 
200 /* NetWare uses its own ICONV implementation. */
201 #define HAVE_ICONV_H 1
202 
203 /*
204  * check for newer NDKs which use now correctly 'const char*' with iconv.
205  */
206 #if (CURRENT_NDK_THRESHOLD >= 705110000)
207 #define APU_ICONV_INBUF_CONST
208 #endif
209 
210 #endif /*APR_PRIVATE_H*/
void * gs_phOptionalFunctions
Definition: apr_private.h:151
rtag_t gs_lookup_rtag
Definition: apr_private.h:155
int setStatCache(void *data)
void * getStatCache()
struct app_data APP_DATA
rtag_t gs_event_rtag
Definition: apr_private.h:156
int gLibId
rtag_t gs_pcp_rtag
Definition: apr_private.h:157
int setGlobalPool(void *data)
void * gPool
Definition: apr_private.h:148
Definition: apr_private.h:146
rtag_t gs_startup_rtag
Definition: apr_private.h:153
int unregister_NLM(void *NLMHandle)
void * gs_xref_head
Definition: apr_private.h:158
APR Platform Definitions.
void netware_pool_proc_cleanup()
void * gs_nlmhandle
Definition: apr_private.h:152
void * gs_aHooksToSort
Definition: apr_private.h:149
rtag_t gs_socket_rtag
Definition: apr_private.h:154
void * getGlobalPool()
int register_NLM(void *NLMHandle)
int initialized
Definition: apr_private.h:147
void * gs_phOptionalHooks
Definition: apr_private.h:150
void * gLibHandle