~ubuntu-branches/debian/lenny/fpc/lenny

« back to all changes in this revision

Viewing changes to fpcsrc/packages/base/httpd/httpd-2.0/ap_config.inc

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-05-17 17:12:11 UTC
  • mfrom: (3.1.9 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080517171211-9qi33xhd9evfa0kg
Tags: 2.2.0-dfsg1-9
[ Torsten Werner ]
* Add Mazen Neifer to Uploaders field.

[ Mazen Neifer ]
* Moved FPC sources into a version dependent directory from /usr/share/fpcsrc
  to /usr/share/fpcsrc/${FPCVERSION}. This allow installing more than on FPC
  release.
* Fixed far call issue in compiler preventing building huge binearies.
  (closes: #477743)
* Updated building dependencies, recomennded and suggested packages.
* Moved fppkg to fp-utils as it is just a helper tool and is not required by
  compiler.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
{ Copyright 1999-2005 The Apache Software Foundation or its licensors, as
 
2
 * applicable.
 
3
 *
 
4
 * Licensed under the Apache License, Version 2.0 (the "License");
 
5
 * you may not use this file except in compliance with the License.
 
6
 * 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
{#include "apr.h"
 
18
#include "apr_hooks.h"
 
19
#include "apr_optional_hooks.h"}
 
20
 
 
21
{
 
22
 * @file ap_config.h
 
23
 * @brief Symbol export macros and hook functions
 
24
 }
 
25
 
 
26
{ Although this file doesn't declare any hooks, declare the hook group here }
 
27
{ @defgroup hooks Apache Hooks }
 
28
 
 
29
{$ifdef DOXYGEN}
 
30
{ define these just so doxygen documents them }
 
31
 
 
32
{
 
33
 * AP_DECLARE_STATIC is defined when including Apache's Core headers,
 
34
 * to provide static linkage when the dynamic library may be unavailable.
 
35
 *
 
36
 * @see AP_DECLARE_EXPORT
 
37
 *
 
38
 * AP_DECLARE_STATIC and AP_DECLARE_EXPORT are left undefined when
 
39
 * including Apache's Core headers, to import and link the symbols from the
 
40
 * dynamic Apache Core library and assure appropriate indirection and calling
 
41
 * conventions at compile time.
 
42
 }
 
43
{$define AP_DECLARE_STATIC}
 
44
{
 
45
 * AP_DECLARE_EXPORT is defined when building the Apache Core dynamic
 
46
 * library, so that all public symbols are exported.
 
47
 *
 
48
 * @see AP_DECLARE_STATIC
 
49
 }
 
50
{$define AP_DECLARE_EXPORT}
 
51
 
 
52
{$endif} { def DOXYGEN }
 
53
 
 
54
//#if !defined(WIN32)
 
55
{
 
56
 * Apache Core dso functions are declared with AP_DECLARE(), so they may
 
57
 * use the most appropriate calling convention.  Hook functions and other
 
58
 * Core functions with variable arguments must use AP_DECLARE_NONSTD().
 
59
 * @code
 
60
 * AP_DECLARE(rettype) ap_func(args)
 
61
 * @endcode
 
62
 }
 
63
//#define AP_DECLARE(type)            type
 
64
 
 
65
{
 
66
 * Apache Core dso variable argument and hook functions are declared with
 
67
 * AP_DECLARE_NONSTD(), as they must use the C language calling convention.
 
68
 * @see AP_DECLARE
 
69
 * @code
 
70
 * AP_DECLARE_NONSTD(rettype) ap_func(args [...])
 
71
 * @endcode
 
72
 }
 
73
//#define AP_DECLARE_NONSTD(type)     type
 
74
 
 
75
{
 
76
 * Apache Core dso variables are declared with AP_MODULE_DECLARE_DATA.
 
77
 * This assures the appropriate indirection is invoked at compile time.
 
78
 *
 
79
 * @note AP_DECLARE_DATA extern type apr_variable; syntax is required for
 
80
 * declarations within headers to properly import the variable.
 
81
 * @code
 
82
 * AP_DECLARE_DATA type apr_variable
 
83
 * @endcode
 
84
 }
 
85
{#define AP_DECLARE_DATA
 
86
 
 
87
#elif defined(AP_DECLARE_STATIC)
 
88
#define AP_DECLARE(type)            type __stdcall
 
89
#define AP_DECLARE_NONSTD(type)     type
 
90
#define AP_DECLARE_DATA
 
91
#elif defined(AP_DECLARE_EXPORT)
 
92
#define AP_DECLARE(type)            __declspec(dllexport) type __stdcall
 
93
#define AP_DECLARE_NONSTD(type)     __declspec(dllexport) type
 
94
#define AP_DECLARE_DATA             __declspec(dllexport)
 
95
#else
 
96
#define AP_DECLARE(type)            __declspec(dllimport) type __stdcall
 
97
#define AP_DECLARE_NONSTD(type)     __declspec(dllimport) type
 
98
#define AP_DECLARE_DATA             __declspec(dllimport)
 
99
#endif
 
100
 
 
101
#if !defined(WIN32) || defined(AP_MODULE_DECLARE_STATIC)}
 
102
{
 
103
 * Declare a dso module's exported module structure as AP_MODULE_DECLARE_DATA.
 
104
 *
 
105
 * Unless AP_MODULE_DECLARE_STATIC is defined at compile time, symbols
 
106
 * declared with AP_MODULE_DECLARE_DATA are always exported.
 
107
 * @code
 
108
 * module AP_MODULE_DECLARE_DATA mod_tag
 
109
 * @endcode
 
110
 }
 
111
{#if defined(WIN32)
 
112
#define AP_MODULE_DECLARE(type)            type __stdcall
 
113
#else
 
114
#define AP_MODULE_DECLARE(type)            type
 
115
#endif
 
116
#define AP_MODULE_DECLARE_NONSTD(type)     type
 
117
#define AP_MODULE_DECLARE_DATA
 
118
#else}
 
119
{
 
120
 * AP_MODULE_DECLARE_EXPORT is a no-op.  Unless contradicted by the
 
121
 * AP_MODULE_DECLARE_STATIC compile-time symbol, it is assumed and defined.
 
122
 *
 
123
 * The old SHARED_MODULE compile-time symbol is now the default behavior,
 
124
 * so it is no longer referenced anywhere with Apache 2.0.
 
125
 }
 
126
{#define AP_MODULE_DECLARE_EXPORT
 
127
#define AP_MODULE_DECLARE(type)          __declspec(dllexport) type __stdcall
 
128
#define AP_MODULE_DECLARE_NONSTD(type)   __declspec(dllexport) type
 
129
#define AP_MODULE_DECLARE_DATA           __declspec(dllexport)
 
130
#endif}
 
131
 
 
132
{
 
133
 * Declare a hook function
 
134
 * @param ret The return type of the hook
 
135
 * @param name The hook's name (as a literal)
 
136
 * @param args The arguments the hook function takes, in brackets.
 
137
 }
 
138
{#define AP_DECLARE_HOOK(ret,name,args) \
 
139
        APR_DECLARE_EXTERNAL_HOOK(ap,AP,ret,name,args)
 
140
}
 
141
{ @internal }
 
142
{#define AP_IMPLEMENT_HOOK_BASE(name) \
 
143
        APR_IMPLEMENT_EXTERNAL_HOOK_BASE(ap,AP,name)
 
144
}
 
145
{
 
146
 * Implement an Apache core hook that has no return code, and
 
147
 * therefore runs all of the registered functions. The implementation
 
148
 * is called ap_run_<i>name</i>.
 
149
 *
 
150
 * @param name The name of the hook
 
151
 * @param args_decl The declaration of the arguments for the hook, for example
 
152
 * "(int x,void *y)"
 
153
 * @param args_use The arguments for the hook as used in a call, for example
 
154
 * "(x,y)"
 
155
 * @note If IMPLEMENTing a hook that is not linked into the Apache core,
 
156
 * (e.g. within a dso) see APR_IMPLEMENT_EXTERNAL_HOOK_VOID.
 
157
 }
 
158
{#define AP_IMPLEMENT_HOOK_VOID(name,args_decl,args_use) \
 
159
        APR_IMPLEMENT_EXTERNAL_HOOK_VOID(ap,AP,name,args_decl,args_use)
 
160
}
 
161
{
 
162
 * Implement an Apache core hook that runs until one of the functions
 
163
 * returns something other than ok or decline. That return value is
 
164
 * then returned from the hook runner. If the hooks run to completion,
 
165
 * then ok is returned. Note that if no hook runs it would probably be
 
166
 * more correct to return decline, but this currently does not do
 
167
 * so. The implementation is called ap_run_<i>name</i>.
 
168
 *
 
169
 * @param ret The return type of the hook (and the hook runner)
 
170
 * @param name The name of the hook
 
171
 * @param args_decl The declaration of the arguments for the hook, for example
 
172
 * "(int x,void *y)"
 
173
 * @param args_use The arguments for the hook as used in a call, for example
 
174
 * "(x,y)"
 
175
 * @param ok The "ok" return value
 
176
 * @param decline The "decline" return value
 
177
 * @return ok, decline or an error.
 
178
 * @note If IMPLEMENTing a hook that is not linked into the Apache core,
 
179
 * (e.g. within a dso) see APR_IMPLEMENT_EXTERNAL_HOOK_RUN_ALL.
 
180
 }
 
181
{#define AP_IMPLEMENT_HOOK_RUN_ALL(ret,name,args_decl,args_use,ok,decline) \
 
182
        APR_IMPLEMENT_EXTERNAL_HOOK_RUN_ALL(ap,AP,ret,name,args_decl, \
 
183
                                            args_use,ok,decline)
 
184
}
 
185
{
 
186
 * Implement a hook that runs until a function returns something other than
 
187
 * decline. If all functions return decline, the hook runner returns decline.
 
188
 * The implementation is called ap_run_<i>name</i>.
 
189
 *
 
190
 * @param ret The return type of the hook (and the hook runner)
 
191
 * @param name The name of the hook
 
192
 * @param args_decl The declaration of the arguments for the hook, for example
 
193
 * "(int x,void *y)"
 
194
 * @param args_use The arguments for the hook as used in a call, for example
 
195
 * "(x,y)"
 
196
 * @param decline The "decline" return value
 
197
 * @return decline or an error.
 
198
 * @note If IMPLEMENTing a hook that is not linked into the Apache core
 
199
 * (e.g. within a dso) see APR_IMPLEMENT_EXTERNAL_HOOK_RUN_FIRST.
 
200
 }
 
201
{#define AP_IMPLEMENT_HOOK_RUN_FIRST(ret,name,args_decl,args_use,decline) \
 
202
        APR_IMPLEMENT_EXTERNAL_HOOK_RUN_FIRST(ap,AP,ret,name,args_decl, \
 
203
                                              args_use,decline)
 
204
}
 
205
{ Note that the other optional hook implementations are straightforward but
 
206
 * have not yet been needed
 
207
 }
 
208
 
 
209
{
 
210
 * Implement an optional hook. This is exactly the same as a standard hook
 
211
 * implementation, except the hook is optional.
 
212
 * @see AP_IMPLEMENT_HOOK_RUN_ALL
 
213
 }
 
214
{#define AP_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(ret,name,args_decl,args_use,ok, \
 
215
                                           decline) \
 
216
        APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(ap,AP,ret,name,args_decl, \
 
217
                                            args_use,ok,decline)
 
218
}
 
219
{
 
220
 * Hook an optional hook. Unlike static hooks, this uses a macro instead of a
 
221
 * function.
 
222
 }
 
223
{#define AP_OPTIONAL_HOOK(name,fn,pre,succ,order) \
 
224
        APR_OPTIONAL_HOOK(ap,name,fn,pre,succ,order)
 
225
 
 
226
#include "os.h"
 
227
#if !defined(WIN32) && !defined(NETWARE)
 
228
#include "ap_config_auto.h"
 
229
#include "ap_config_layout.h"
 
230
#endif
 
231
#if defined(NETWARE)
 
232
#define AP_NONBLOCK_WHEN_MULTI_LISTEN 1
 
233
#endif}
 
234
 
 
235
{ TODO - We need to put OS detection back to make all the following work }
 
236
 
 
237
{$if defined(SUNOS) or defined(IRIX) or defined(NEXT) or defined(AUX)
 
238
 or defined (UW) or defined(LYNXOS) or defined(TPF)}
 
239
{ These systems don't do well with any lingering close code; I don't know
 
240
 * why -- manoj }
 
241
{$define NO_LINGCLOSE}
 
242
{$endif}
 
243
 
 
244
{ If APR has OTHER_CHILD logic, use reliable piped logs. }
 
245
{$ifdef APR_HAS_OTHER_CHILD}
 
246
{$define AP_HAVE_RELIABLE_PIPED_LOGS}
 
247
{$endif}
 
248