~matttbe/ubuntu/quantal/apache2/lp1013171

« back to all changes in this revision

Viewing changes to debian/patches/021-pcre_mangle_symbols.patch

  • Committer: Bazaar Package Importer
  • Author(s): Thom May
  • Date: 2004-10-13 19:46:10 UTC
  • Revision ID: james.westby@ubuntu.com-20041013194610-ccvqcz8vflh5zqrm
Tags: 2.0.50-12ubuntu4
Security Release. Patch from upstream for the following:
CAN-2004-0885SSLCypherSuite can be bypassed during renegotiation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Revision: apache2--dilinger--2.0--patch-10
 
2
Archive: dilinger@voxel.net--2004
 
3
Creator: Andres Salomon <dilinger@voxel.net>
 
4
Date: Tue Mar  9 01:34:52 EST 2004
 
5
Standard-date: 2004-03-09 06:34:52 GMT
 
6
Modified-files: server/util.c srclib/pcre/RunTest.in
 
7
    srclib/pcre/dftables.c srclib/pcre/get.c
 
8
    srclib/pcre/internal.h srclib/pcre/maketables.c
 
9
    srclib/pcre/pcre.c srclib/pcre/pcre.def
 
10
    srclib/pcre/pcre.hw srclib/pcre/pcre.in
 
11
    srclib/pcre/pcredemo.c srclib/pcre/pcregrep.c
 
12
    srclib/pcre/pcreposix.c srclib/pcre/pcreposix.h
 
13
    srclib/pcre/pcretest.c srclib/pcre/pgrep.c
 
14
    srclib/pcre/study.c
 
15
New-patches: dilinger@voxel.net--2004/apache2--dilinger--2.0--patch-10
 
16
Summary: rename internal pcre symbols
 
17
Keywords: 
 
18
 
 
19
* added files
 
20
 
 
21
    {arch}/apache2/apache2--dilinger/apache2--dilinger--2.0/dilinger@voxel.net--2004/patch-log/patch-10
 
22
 
 
23
* file metadata changed
 
24
 
 
25
    ./srclib/pcre/RunTest.in
 
26
        --permissions 755
 
27
        => --permissions 644
 
28
 
 
29
* modified files
 
30
 
 
31
--- orig/apache2/server/util.c
 
32
+++ mod/apache2/server/util.c
 
33
@@ -289,16 +289,16 @@
 
34
 }
 
35
 
 
36
 /*
 
37
- * Here's a pool-based interface to POSIX regex's regcomp().
 
38
+ * Here's a pool-based interface to POSIX regex's ap_pcreposix_regcomp().
 
39
  * Note that we return regex_t instead of being passed one.
 
40
  * The reason is that if you use an already-used regex_t structure,
 
41
  * the memory that you've already allocated gets forgotten, and
 
42
- * regfree() doesn't clear it. So we don't allow it.
 
43
+ * ap_pcreposix_regfree() doesn't clear it. So we don't allow it.
 
44
  */
 
45
 
 
46
 static apr_status_t regex_cleanup(void *preg)
 
47
 {
 
48
-    regfree((regex_t *) preg);
 
49
+    ap_pcreposix_regfree((regex_t *) preg);
 
50
     return APR_SUCCESS;
 
51
 }
 
52
 
 
53
@@ -307,7 +307,7 @@
 
54
 {
 
55
     regex_t *preg = apr_palloc(p, sizeof(regex_t));
 
56
 
 
57
-    if (regcomp(preg, pattern, cflags)) {
 
58
+    if (ap_pcreposix_regcomp(preg, pattern, cflags)) {
 
59
         return NULL;
 
60
     }
 
61
 
 
62
@@ -319,7 +319,7 @@
 
63
 
 
64
 AP_DECLARE(void) ap_pregfree(apr_pool_t *p, regex_t * reg)
 
65
 {
 
66
-    regfree(reg);
 
67
+    ap_pcreposix_regfree(reg);
 
68
     apr_pool_cleanup_kill(p, (void *) reg, regex_cleanup);
 
69
 }
 
70
 
 
71
@@ -387,7 +387,7 @@
 
72
 }
 
73
 
 
74
 /* 
 
75
- * Apache stub function for the regex libraries regexec() to make sure the
 
76
+ * Apache stub function for the regex libraries ap_pcreposix_regexec() to make sure the
 
77
  * whole regex(3) API is available through the Apache (exported) namespace.
 
78
  * This is especially important for the DSO situations of modules.
 
79
  * DO NOT MAKE A MACRO OUT OF THIS FUNCTION!
 
80
@@ -395,13 +395,13 @@
 
81
 AP_DECLARE(int) ap_regexec(regex_t *preg, const char *string,
 
82
                            size_t nmatch, regmatch_t pmatch[], int eflags)
 
83
 {
 
84
-    return regexec(preg, string, nmatch, pmatch, eflags);
 
85
+    return ap_pcreposix_regexec(preg, string, nmatch, pmatch, eflags);
 
86
 }
 
87
 
 
88
 AP_DECLARE(size_t) ap_regerror(int errcode, const regex_t *preg, char *errbuf,
 
89
                                size_t errbuf_size)
 
90
 {
 
91
-    return regerror(errcode, preg, errbuf, errbuf_size);
 
92
+    return ap_pcreposix_regerror(errcode, preg, errbuf, errbuf_size);
 
93
 }
 
94
 
 
95
 
 
96
 
 
97
 
 
98
--- orig/apache2/srclib/pcre/dftables.c
 
99
+++ mod/apache2/srclib/pcre/dftables.c
 
100
@@ -36,7 +36,7 @@
 
101
 
 
102
 /* This is a support program to generate the file chartables.c, containing
 
103
 character tables of various kinds. They are built according to the default C
 
104
-locale and used as the default tables by PCRE. Now that pcre_maketables is
 
105
+locale and used as the default tables by PCRE. Now that ap_pcre_maketables is
 
106
 a function visible to the outside world, we make use of its code from here in
 
107
 order to be consistent. */
 
108
 
 
109
@@ -53,7 +53,7 @@
 
110
 int main(void)
 
111
 {
 
112
 int i;
 
113
-const unsigned char *tables = pcre_maketables();
 
114
+const unsigned char *tables = ap_pcre_maketables();
 
115
 
 
116
 printf(
 
117
   "/*************************************************\n"
 
118
 
 
119
 
 
120
--- orig/apache2/srclib/pcre/get.c
 
121
+++ mod/apache2/srclib/pcre/get.c
 
122
@@ -56,7 +56,7 @@
 
123
   subject        the subject string that was matched
 
124
   ovector        pointer to the offsets table
 
125
   stringcount    the number of substrings that were captured
 
126
-                   (i.e. the yield of the pcre_exec call, unless
 
127
+                   (i.e. the yield of the ap_pcre_exec call, unless
 
128
                    that was zero, in which case it should be 1/3
 
129
                    of the offset table size)
 
130
   stringnumber   the number of the required substring
 
131
@@ -72,7 +72,7 @@
 
132
 */
 
133
 
 
134
 int
 
135
-pcre_copy_substring(const char *subject, int *ovector, int stringcount,
 
136
+ap_pcre_copy_substring(const char *subject, int *ovector, int stringcount,
 
137
   int stringnumber, char *buffer, int size)
 
138
 {
 
139
 int yield;
 
140
@@ -99,7 +99,7 @@
 
141
   subject        the subject string that was matched
 
142
   ovector        pointer to the offsets table
 
143
   stringcount    the number of substrings that were captured
 
144
-                   (i.e. the yield of the pcre_exec call, unless
 
145
+                   (i.e. the yield of the ap_pcre_exec call, unless
 
146
                    that was zero, in which case it should be 1/3
 
147
                    of the offset table size)
 
148
   listptr        set to point to the list of pointers
 
149
@@ -110,7 +110,7 @@
 
150
 */
 
151
 
 
152
 int
 
153
-pcre_get_substring_list(const char *subject, int *ovector, int stringcount,
 
154
+ap_pcre_get_substring_list(const char *subject, int *ovector, int stringcount,
 
155
   const char ***listptr)
 
156
 {
 
157
 int i;
 
158
@@ -122,7 +122,7 @@
 
159
 for (i = 0; i < double_count; i += 2)
 
160
   size += sizeof(char *) + ovector[i+1] - ovector[i] + 1;
 
161
 
 
162
-stringlist = (char **)(pcre_malloc)(size);
 
163
+stringlist = (char **)(ap_pcre_malloc)(size);
 
164
 if (stringlist == NULL) return PCRE_ERROR_NOMEMORY;
 
165
 
 
166
 *listptr = (const char **)stringlist;
 
167
@@ -144,20 +144,20 @@
 
168
 
 
169
 
 
170
 /*************************************************
 
171
-*   Free store obtained by get_substring_list    *
 
172
+*   Free store obtained by ap_get_substring_list  *
 
173
 *************************************************/
 
174
 
 
175
 /* This function exists for the benefit of people calling PCRE from non-C
 
176
-programs that can call its functions, but not free() or (pcre_free)() directly.
 
177
+programs that can call its functions, but not free() or (ap_pcre_free)() directly.
 
178
 
 
179
-Argument:   the result of a previous pcre_get_substring_list()
 
180
+Argument:   the result of a previous ap_pcre_get_substring_list()
 
181
 Returns:    nothing
 
182
 */
 
183
 
 
184
 void
 
185
-pcre_free_substring_list(const char **pointer)
 
186
+ap_pcre_free_substring_list(const char **pointer)
 
187
 {
 
188
-(pcre_free)((void *)pointer);
 
189
+(ap_pcre_free)((void *)pointer);
 
190
 }
 
191
 
 
192
 
 
193
@@ -173,7 +173,7 @@
 
194
   subject        the subject string that was matched
 
195
   ovector        pointer to the offsets table
 
196
   stringcount    the number of substrings that were captured
 
197
-                   (i.e. the yield of the pcre_exec call, unless
 
198
+                   (i.e. the yield of the ap_pcre_exec call, unless
 
199
                    that was zero, in which case it should be 1/3
 
200
                    of the offset table size)
 
201
   stringnumber   the number of the required substring
 
202
@@ -188,7 +188,7 @@
 
203
 */
 
204
 
 
205
 int
 
206
-pcre_get_substring(const char *subject, int *ovector, int stringcount,
 
207
+ap_pcre_get_substring(const char *subject, int *ovector, int stringcount,
 
208
   int stringnumber, const char **stringptr)
 
209
 {
 
210
 int yield;
 
211
@@ -197,7 +197,7 @@
 
212
   return PCRE_ERROR_NOSUBSTRING;
 
213
 stringnumber *= 2;
 
214
 yield = ovector[stringnumber+1] - ovector[stringnumber];
 
215
-substring = (char *)(pcre_malloc)(yield + 1);
 
216
+substring = (char *)(ap_pcre_malloc)(yield + 1);
 
217
 if (substring == NULL) return PCRE_ERROR_NOMEMORY;
 
218
 memcpy(substring, subject + ovector[stringnumber], yield);
 
219
 substring[yield] = 0;
 
220
@@ -208,20 +208,20 @@
 
221
 
 
222
 
 
223
 /*************************************************
 
224
-*       Free store obtained by get_substring     *
 
225
+*       Free store obtained by ap_get_substring   *
 
226
 *************************************************/
 
227
 
 
228
 /* This function exists for the benefit of people calling PCRE from non-C
 
229
-programs that can call its functions, but not free() or (pcre_free)() directly.
 
230
+programs that can call its functions, but not free() or (ap_pcre_free)() directly.
 
231
 
 
232
 Argument:   the result of a previous pcre_get_substring()
 
233
 Returns:    nothing
 
234
 */
 
235
 
 
236
 void
 
237
-pcre_free_substring(const char *pointer)
 
238
+ap_pcre_free_substring(const char *pointer)
 
239
 {
 
240
-(pcre_free)((void *)pointer);
 
241
+(ap_pcre_free)((void *)pointer);
 
242
 }
 
243
 
 
244
 /* End of get.c */
 
245
 
 
246
 
 
247
--- orig/apache2/srclib/pcre/internal.h
 
248
+++ mod/apache2/srclib/pcre/internal.h
 
249
@@ -96,7 +96,7 @@
 
250
 #define PCRE_INGROUP       0x08000000  /* compiling inside a group */
 
251
 #define PCRE_ICHANGED      0x04000000  /* i option changes within regex */
 
252
 
 
253
-/* Options for the "extra" block produced by pcre_study(). */
 
254
+/* Options for the "extra" block produced by ap_pcre_study(). */
 
255
 
 
256
 #define PCRE_STUDY_MAPPED   0x01     /* a map of starting chars exists */
 
257
 
 
258
@@ -334,7 +334,7 @@
 
259
   uschar code[1];
 
260
 } real_pcre;
 
261
 
 
262
-/* The real format of the extra block returned by pcre_study(). */
 
263
+/* The real format of the extra block returned by ap_pcre_study(). */
 
264
 
 
265
 typedef struct real_pcre_extra {
 
266
   uschar options;
 
267
 
 
268
 
 
269
--- orig/apache2/srclib/pcre/maketables.c
 
270
+++ mod/apache2/srclib/pcre/maketables.c
 
271
@@ -51,7 +51,7 @@
 
272
 /* This function builds a set of character tables for use by PCRE and returns
 
273
 a pointer to them. They are build using the ctype functions, and consequently
 
274
 their contents will depend upon the current locale setting. When compiled as
 
275
-part of the library, the store is obtained via pcre_malloc(), but when compiled
 
276
+part of the library, the store is obtained via ap_pcre_malloc(), but when compiled
 
277
 inside dftables, use malloc().
 
278
 
 
279
 Arguments:   none
 
280
@@ -59,13 +59,13 @@
 
281
 */
 
282
 
 
283
 const unsigned char *
 
284
-pcre_maketables(void)
 
285
+ap_pcre_maketables(void)
 
286
 {
 
287
 unsigned char *yield, *p;
 
288
 int i;
 
289
 
 
290
 #ifndef DFTABLES
 
291
-yield = (unsigned char*)(pcre_malloc)(tables_length);
 
292
+yield = (unsigned char*)(ap_pcre_malloc)(tables_length);
 
293
 #else
 
294
 yield = (unsigned char*)malloc(tables_length);
 
295
 #endif
 
296
 
 
297
 
 
298
--- orig/apache2/srclib/pcre/pcre.c
 
299
+++ mod/apache2/srclib/pcre/pcre.c
 
300
@@ -184,8 +184,8 @@
 
301
 indirections below, which are can be changed by the caller, but are shared
 
302
 between all threads. */
 
303
 
 
304
-void *(*pcre_malloc)(size_t) = malloc;
 
305
-void  (*pcre_free)(void *) = free;
 
306
+void *(*ap_pcre_malloc)(size_t) = malloc;
 
307
+void  (*ap_pcre_free)(void *) = free;
 
308
 
 
309
 
 
310
 
 
311
@@ -255,7 +255,7 @@
 
312
 /* A default set of character tables is included in the PCRE binary. Its source
 
313
 is built by the maketables auxiliary program, which uses the default C ctypes
 
314
 functions, and put in the file chartables.c. These tables are used by PCRE
 
315
-whenever the caller of pcre_compile() does not provide an alternate set of
 
316
+whenever the caller of ap_pcre_compile() does not provide an alternate set of
 
317
 tables. */
 
318
 
 
319
 #include "chartables.c"
 
320
@@ -330,7 +330,7 @@
 
321
 #define XSTRING(s) STRING(s)
 
322
 
 
323
 const char *
 
324
-pcre_version(void)
 
325
+ap_pcre_version(void)
 
326
 {
 
327
 return XSTRING(PCRE_MAJOR) "." XSTRING(PCRE_MINOR) " " XSTRING(PCRE_DATE);
 
328
 }
 
329
@@ -347,7 +347,7 @@
 
330
 backwards compatibility. The public options are passed back in an int - though
 
331
 the re->options field has been expanded to a long int, all the public options
 
332
 at the low end of it, and so even on 16-bit systems this will still be OK.
 
333
-Therefore, I haven't changed the API for pcre_info().
 
334
+Therefore, I haven't changed the API for ap_pcre_info().
 
335
 
 
336
 Arguments:
 
337
   external_re   points to compiled code
 
338
@@ -361,7 +361,7 @@
 
339
 */
 
340
 
 
341
 int
 
342
-pcre_info(const pcre *external_re, int *optptr, int *first_char)
 
343
+ap_pcre_info(const pcre *external_re, int *optptr, int *first_char)
 
344
 {
 
345
 const real_pcre *re = (const real_pcre *)external_re;
 
346
 if (re == NULL) return PCRE_ERROR_NULL;
 
347
@@ -392,7 +392,7 @@
 
348
 */
 
349
 
 
350
 int
 
351
-pcre_fullinfo(const pcre *external_re, const pcre_extra *study_data, int what,
 
352
+ap_pcre_fullinfo(const pcre *external_re, const pcre_extra *study_data, int what,
 
353
   void *where)
 
354
 {
 
355
 const real_pcre *re = (const real_pcre *)external_re;
 
356
@@ -2475,7 +2475,7 @@
 
357
 */
 
358
 
 
359
 pcre *
 
360
-pcre_compile(const char *pattern, int options, const char **errorptr,
 
361
+ap_pcre_compile(const char *pattern, int options, const char **errorptr,
 
362
   int *erroroffset, const unsigned char *tables)
 
363
 {
 
364
 real_pcre *re;
 
365
@@ -3052,7 +3052,7 @@
 
366
 difference to the value of the offsetof(). */
 
367
 
 
368
 size = length + offsetof(real_pcre, code[0]);
 
369
-re = (real_pcre *)(pcre_malloc)(size);
 
370
+re = (real_pcre *)(ap_pcre_malloc)(size);
 
371
 
 
372
 if (re == NULL)
 
373
   {
 
374
@@ -3102,7 +3102,7 @@
 
375
 
 
376
 if (*errorptr != NULL)
 
377
   {
 
378
-  (pcre_free)(re);
 
379
+  (ap_pcre_free)(re);
 
380
   PCRE_ERROR_RETURN:
 
381
   *erroroffset = ptr - (const uschar *)pattern;
 
382
   return NULL;
 
383
@@ -3373,7 +3373,7 @@
 
384
 if (code - re->code > length)
 
385
   {
 
386
   *errorptr = ERR23;
 
387
-  (pcre_free)(re);
 
388
+  (ap_pcre_free)(re);
 
389
   *erroroffset = ptr - (uschar *)pattern;
 
390
   return NULL;
 
391
   }
 
392
@@ -3715,7 +3715,7 @@
 
393
 
 
394
       if (c < 16) save = stacksave; else
 
395
         {
 
396
-        save = (int *)(pcre_malloc)((c+1) * sizeof(int));
 
397
+        save = (int *)(ap_pcre_malloc)((c+1) * sizeof(int));
 
398
         if (save == NULL)
 
399
           {
 
400
           save = stacksave;
 
401
@@ -3729,7 +3729,7 @@
 
402
         match_isgroup);
 
403
       for (i = 1; i <= c; i++)
 
404
         md->offset_vector[md->offset_end - i] = save[i];
 
405
-      if (save != stacksave) (pcre_free)(save);
 
406
+      if (save != stacksave) (ap_pcre_free)(save);
 
407
       if (!rc) return FALSE;
 
408
 
 
409
       /* In case the recursion has set more capturing values, save the final
 
410
@@ -4867,7 +4867,7 @@
 
411
 
 
412
 Arguments:
 
413
   external_re     points to the compiled expression
 
414
-  external_extra  points to "hints" from pcre_study() or is NULL
 
415
+  external_extra  points to "hints" from ap_pcre_study() or is NULL
 
416
   subject         points to the subject string
 
417
   length          length of subject string (may contain binary zeros)
 
418
   start_offset    where to start in the subject string
 
419
@@ -4882,7 +4882,7 @@
 
420
 */
 
421
 
 
422
 int
 
423
-pcre_exec(const pcre *external_re, const pcre_extra *external_extra,
 
424
+ap_pcre_exec(const pcre *external_re, const pcre_extra *external_extra,
 
425
   const char *subject, int length, int start_offset, int options, int *offsets,
 
426
   int offsetcount)
 
427
 {
 
428
@@ -4944,7 +4944,7 @@
 
429
 if (re->top_backref > 0 && re->top_backref >= ocount/3)
 
430
   {
 
431
   ocount = re->top_backref * 3 + 3;
 
432
-  match_block.offset_vector = (int *)(pcre_malloc)(ocount * sizeof(int));
 
433
+  match_block.offset_vector = (int *)(ap_pcre_malloc)(ocount * sizeof(int));
 
434
   if (match_block.offset_vector == NULL) return PCRE_ERROR_NOMEMORY;
 
435
   using_temporary_offsets = TRUE;
 
436
   DPRINTF(("Got memory to hold back references\n"));
 
437
@@ -5139,7 +5139,7 @@
 
438
       match_block.offset_overflow = TRUE;
 
439
 
 
440
     DPRINTF(("Freeing temporary memory\n"));
 
441
-    (pcre_free)(match_block.offset_vector);
 
442
+    (ap_pcre_free)(match_block.offset_vector);
 
443
     }
 
444
 
 
445
   rc = match_block.offset_overflow? 0 : match_block.end_offset_top/2;
 
446
@@ -5163,7 +5163,7 @@
 
447
 if (using_temporary_offsets)
 
448
   {
 
449
   DPRINTF(("Freeing temporary memory\n"));
 
450
-  (pcre_free)(match_block.offset_vector);
 
451
+  (ap_pcre_free)(match_block.offset_vector);
 
452
   }
 
453
 
 
454
 DPRINTF((">>>> returning %d\n", match_block.errorcode));
 
455
 
 
456
 
 
457
--- orig/apache2/srclib/pcre/pcre.def
 
458
+++ mod/apache2/srclib/pcre/pcre.def
 
459
@@ -1,19 +1,19 @@
 
460
 EXPORTS
 
461
 
 
462
-pcre_malloc DATA
 
463
-pcre_free DATA
 
464
+ap_pcre_malloc DATA
 
465
+ap_pcre_free DATA
 
466
 
 
467
-pcre_compile
 
468
-pcre_copy_substring
 
469
-pcre_exec
 
470
-pcre_get_substring
 
471
-pcre_get_substring_list
 
472
-pcre_info
 
473
-pcre_maketables
 
474
-pcre_study
 
475
-pcre_version
 
476
+ap_pcre_compile
 
477
+ap_pcre_copy_substring
 
478
+ap_pcre_exec
 
479
+ap_pcre_get_substring
 
480
+ap_pcre_get_substring_list
 
481
+ap_pcre_info
 
482
+ap_pcre_maketables
 
483
+ap_pcre_study
 
484
+ap_pcre_version
 
485
 
 
486
-regcomp
 
487
-regexec
 
488
-regerror
 
489
-regfree
 
490
+ap_pcreposix_regcomp
 
491
+ap_pcreposix_regexec
 
492
+ap_pcreposix_regerror
 
493
+ap_pcreposix_regfree
 
494
 
 
495
 
 
496
--- orig/apache2/srclib/pcre/pcre.hw
 
497
+++ mod/apache2/srclib/pcre/pcre.hw
 
498
@@ -62,7 +62,7 @@
 
499
 #define PCRE_ERROR_NOMEMORY       (-6)
 
500
 #define PCRE_ERROR_NOSUBSTRING    (-7)
 
501
 
 
502
-/* Request types for pcre_fullinfo() */
 
503
+/* Request types for ap_pcre_fullinfo() */
 
504
 
 
505
 #define PCRE_INFO_OPTIONS         0
 
506
 #define PCRE_INFO_SIZE            1
 
507
@@ -84,27 +84,27 @@
 
508
 functions if required. Some magic is required for Win32 DLL; it is null on
 
509
 other OS. */
 
510
 
 
511
-PCRE_DL_IMPORT extern void *(*pcre_malloc)(size_t);
 
512
-PCRE_DL_IMPORT extern void  (*pcre_free)(void *);
 
513
+PCRE_DL_IMPORT extern void *(*ap_pcre_malloc)(size_t);
 
514
+PCRE_DL_IMPORT extern void  (*ap_pcre_free)(void *);
 
515
 
 
516
 #undef PCRE_DL_IMPORT
 
517
 
 
518
 /* Functions */
 
519
 
 
520
-extern pcre *pcre_compile(const char *, int, const char **, int *,
 
521
+extern pcre *ap_pcre_compile(const char *, int, const char **, int *,
 
522
   const unsigned char *);
 
523
-extern int pcre_copy_substring(const char *, int *, int, int, char *, int);
 
524
-extern int pcre_exec(const pcre *, const pcre_extra *, const char *,
 
525
+extern int ap_pcre_copy_substring(const char *, int *, int, int, char *, int);
 
526
+extern int ap_pcre_exec(const pcre *, const pcre_extra *, const char *,
 
527
   int, int, int, int *, int);
 
528
-extern void pcre_free_substring(const char *);
 
529
-extern void pcre_free_substring_list(const char **);
 
530
-extern int pcre_get_substring(const char *, int *, int, int, const char **);
 
531
-extern int pcre_get_substring_list(const char *, int *, int, const char ***);
 
532
-extern int pcre_info(const pcre *, int *, int *);
 
533
-extern int pcre_fullinfo(const pcre *, const pcre_extra *, int, void *);
 
534
-extern const unsigned char *pcre_maketables(void);
 
535
-extern pcre_extra *pcre_study(const pcre *, int, const char **);
 
536
-extern const char *pcre_version(void);
 
537
+extern void ap_pcre_free_substring(const char *);
 
538
+extern void ap_pcre_free_substring_list(const char **);
 
539
+extern int ap_pcre_get_substring(const char *, int *, int, int, const char **);
 
540
+extern int ap_pcre_get_substring_list(const char *, int *, int, const char ***);
 
541
+extern int ap_pcre_info(const pcre *, int *, int *);
 
542
+extern int ap_pcre_fullinfo(const pcre *, const pcre_extra *, int, void *);
 
543
+extern const unsigned char *ap_pcre_maketables(void);
 
544
+extern pcre_extra *ap_pcre_study(const pcre *, int, const char **);
 
545
+extern const char *ap_pcre_version(void);
 
546
 
 
547
 #ifdef __cplusplus
 
548
 }  /* extern "C" */
 
549
 
 
550
 
 
551
--- orig/apache2/srclib/pcre/pcre.in
 
552
+++ mod/apache2/srclib/pcre/pcre.in
 
553
@@ -62,7 +62,7 @@
 
554
 #define PCRE_ERROR_NOMEMORY       (-6)
 
555
 #define PCRE_ERROR_NOSUBSTRING    (-7)
 
556
 
 
557
-/* Request types for pcre_fullinfo() */
 
558
+/* Request types for ap_pcre_fullinfo() */
 
559
 
 
560
 #define PCRE_INFO_OPTIONS         0
 
561
 #define PCRE_INFO_SIZE            1
 
562
@@ -84,27 +84,27 @@
 
563
 functions if required. Some magic is required for Win32 DLL; it is null on
 
564
 other OS. */
 
565
 
 
566
-PCRE_DL_IMPORT extern void *(*pcre_malloc)(size_t);
 
567
-PCRE_DL_IMPORT extern void  (*pcre_free)(void *);
 
568
+PCRE_DL_IMPORT extern void *(*ap_pcre_malloc)(size_t);
 
569
+PCRE_DL_IMPORT extern void  (*ap_pcre_free)(void *);
 
570
 
 
571
 #undef PCRE_DL_IMPORT
 
572
 
 
573
 /* Functions */
 
574
 
 
575
-extern pcre *pcre_compile(const char *, int, const char **, int *,
 
576
+extern pcre *ap_pcre_compile(const char *, int, const char **, int *,
 
577
               const unsigned char *);
 
578
-extern int  pcre_copy_substring(const char *, int *, int, int, char *, int);
 
579
-extern int  pcre_exec(const pcre *, const pcre_extra *, const char *,
 
580
+extern int  ap_pcre_copy_substring(const char *, int *, int, int, char *, int);
 
581
+extern int  ap_pcre_exec(const pcre *, const pcre_extra *, const char *,
 
582
               int, int, int, int *, int);
 
583
-extern void pcre_free_substring(const char *);
 
584
-extern void pcre_free_substring_list(const char **);
 
585
-extern int  pcre_get_substring(const char *, int *, int, int, const char **);
 
586
-extern int  pcre_get_substring_list(const char *, int *, int, const char ***);
 
587
-extern int  pcre_info(const pcre *, int *, int *);
 
588
-extern int  pcre_fullinfo(const pcre *, const pcre_extra *, int, void *);
 
589
-extern const unsigned char *pcre_maketables(void);
 
590
-extern pcre_extra *pcre_study(const pcre *, int, const char **);
 
591
-extern const char *pcre_version(void);
 
592
+extern void ap_pcre_free_substring(const char *);
 
593
+extern void ap_pcre_free_substring_list(const char **);
 
594
+extern int  ap_pcre_get_substring(const char *, int *, int, int, const char **);
 
595
+extern int  ap_pcre_get_substring_list(const char *, int *, int, const char ***);
 
596
+extern int  ap_pcre_info(const pcre *, int *, int *);
 
597
+extern int  ap_pcre_fullinfo(const pcre *, const pcre_extra *, int, void *);
 
598
+extern const unsigned char *ap_pcre_maketables(void);
 
599
+extern pcre_extra *ap_pcre_study(const pcre *, int, const char **);
 
600
+extern const char *ap_pcre_version(void);
 
601
 
 
602
 #ifdef __cplusplus
 
603
 }  /* extern "C" */
 
604
 
 
605
 
 
606
--- orig/apache2/srclib/pcre/pcredemo.c
 
607
+++ mod/apache2/srclib/pcre/pcredemo.c
 
608
@@ -25,7 +25,7 @@
 
609
 
 
610
 /* Compile the regular expression in the first argument */
 
611
 
 
612
-re = pcre_compile(
 
613
+re = ap_pcre_compile(
 
614
   argv[1],              /* the pattern */
 
615
   0,                    /* default options */
 
616
   &error,               /* for error message */
 
617
@@ -42,7 +42,7 @@
 
618
 
 
619
 /* Compilation succeeded: match the subject in the second argument */
 
620
 
 
621
-rc = pcre_exec(
 
622
+rc = ap_pcre_exec(
 
623
   re,                   /* the compiled pattern */
 
624
   NULL,                 /* no extra data - we didn't study the pattern */
 
625
   argv[2],              /* the subject string */
 
626
 
 
627
 
 
628
--- orig/apache2/srclib/pcre/pcregrep.c
 
629
+++ mod/apache2/srclib/pcre/pcregrep.c
 
630
@@ -181,7 +181,7 @@
 
631
 
 
632
   for (i = 0; !match && i < pattern_count; i++)
 
633
     {
 
634
-    match = pcre_exec(pattern_list[i], hints_list[i], buffer, length, 0, 0,
 
635
+    match = ap_pcre_exec(pattern_list[i], hints_list[i], buffer, length, 0, 0,
 
636
       offsets, 99) >= 0;
 
637
     if (match && whole_lines && offsets[1] != length) match = FALSE;
 
638
     }
 
639
@@ -355,7 +355,7 @@
 
640
 
 
641
   case 'V':
 
642
   fprintf(stderr, "pcregrep version %s using ", VERSION);
 
643
-  fprintf(stderr, "PCRE version %s\n", pcre_version());
 
644
+  fprintf(stderr, "PCRE version %s\n", ap_pcre_version());
 
645
   exit(0);
 
646
   break;
 
647
 
 
648
@@ -476,7 +476,7 @@
 
649
     while (s > buffer && isspace((unsigned char)(s[-1]))) s--;
 
650
     if (s == buffer) continue;
 
651
     *s = 0;
 
652
-    pattern_list[pattern_count] = pcre_compile(buffer, options, &error,
 
653
+    pattern_list[pattern_count] = ap_pcre_compile(buffer, options, &error,
 
654
       &errptr, NULL);
 
655
     if (pattern_list[pattern_count++] == NULL)
 
656
       {
 
657
@@ -493,7 +493,7 @@
 
658
 else
 
659
   {
 
660
   if (i >= argc) return usage(0);
 
661
-  pattern_list[0] = pcre_compile(argv[i++], options, &error, &errptr, NULL);
 
662
+  pattern_list[0] = ap_pcre_compile(argv[i++], options, &error, &errptr, NULL);
 
663
   if (pattern_list[0] == NULL)
 
664
     {
 
665
     fprintf(stderr, "pcregrep: Error in regex at offset %d: %s\n", errptr,
 
666
@@ -507,7 +507,7 @@
 
667
 
 
668
 for (j = 0; j < pattern_count; j++)
 
669
   {
 
670
-  hints_list[j] = pcre_study(pattern_list[j], 0, &error);
 
671
+  hints_list[j] = ap_pcre_study(pattern_list[j], 0, &error);
 
672
   if (error != NULL)
 
673
     {
 
674
     char s[16];
 
675
 
 
676
 
 
677
--- orig/apache2/srclib/pcre/pcreposix.c
 
678
+++ mod/apache2/srclib/pcre/pcreposix.c
 
679
@@ -136,7 +136,7 @@
 
680
 *************************************************/
 
681
 
 
682
 size_t
 
683
-regerror(int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size)
 
684
+ap_pcreposix_regerror(int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size)
 
685
 {
 
686
 const char *message, *addmessage;
 
687
 size_t length, addlength;
 
688
@@ -171,9 +171,9 @@
 
689
 *************************************************/
 
690
 
 
691
 void
 
692
-regfree(regex_t *preg)
 
693
+ap_pcreposix_regfree(regex_t *preg)
 
694
 {
 
695
-(pcre_free)(preg->re_pcre);
 
696
+(ap_pcre_free)(preg->re_pcre);
 
697
 }
 
698
 
 
699
 
 
700
@@ -194,7 +194,7 @@
 
701
 */
 
702
 
 
703
 int
 
704
-regcomp(regex_t *preg, const char *pattern, int cflags)
 
705
+ap_pcreposix_regcomp(regex_t *preg, const char *pattern, int cflags)
 
706
 {
 
707
 const char *errorptr;
 
708
 int erroffset;
 
709
@@ -203,12 +203,12 @@
 
710
 if ((cflags & REG_ICASE) != 0) options |= PCRE_CASELESS;
 
711
 if ((cflags & REG_NEWLINE) != 0) options |= PCRE_MULTILINE;
 
712
 
 
713
-preg->re_pcre = pcre_compile(pattern, options, &errorptr, &erroffset, NULL);
 
714
+preg->re_pcre = ap_pcre_compile(pattern, options, &errorptr, &erroffset, NULL);
 
715
 preg->re_erroffset = erroffset;
 
716
 
 
717
 if (preg->re_pcre == NULL) return pcre_posix_error_code(errorptr);
 
718
 
 
719
-preg->re_nsub = pcre_info(preg->re_pcre, NULL, NULL);
 
720
+preg->re_nsub = ap_pcre_info(preg->re_pcre, NULL, NULL);
 
721
 return 0;
 
722
 }
 
723
 
 
724
@@ -226,7 +226,7 @@
 
725
 
 
726
 #define SMALL_NMATCH 5
 
727
 int
 
728
-regexec(regex_t *preg, const char *string, size_t nmatch,
 
729
+ap_pcreposix_regexec(regex_t *preg, const char *string, size_t nmatch,
 
730
   regmatch_t pmatch[], int eflags)
 
731
 {
 
732
 int rc;
 
733
@@ -266,7 +266,7 @@
 
734
       }
 
735
   }
 
736
 
 
737
-rc = pcre_exec(preg->re_pcre, NULL, string, (int)strlen(string), 0, options,
 
738
+rc = ap_pcre_exec(preg->re_pcre, NULL, string, (int)strlen(string), 0, options,
 
739
   ovector, nmatch * 3);
 
740
 
 
741
 if (rc == 0) rc = nmatch;    /* All captured slots were filled in */
 
742
 
 
743
 
 
744
--- orig/apache2/srclib/pcre/pcreposix.h
 
745
+++ mod/apache2/srclib/pcre/pcreposix.h
 
746
@@ -76,10 +76,10 @@
 
747
 
 
748
 /* The functions */
 
749
 
 
750
-extern int regcomp(regex_t *, const char *, int);
 
751
-extern int regexec(regex_t *, const char *, size_t, regmatch_t *, int);
 
752
-extern size_t regerror(int, const regex_t *, char *, size_t);
 
753
-extern void regfree(regex_t *);
 
754
+extern int ap_pcreposix_regcomp(regex_t *, const char *, int);
 
755
+extern int ap_pcreposix_regexec(regex_t *, const char *, size_t, regmatch_t *, int);
 
756
+extern size_t ap_pcreposix_regerror(int, const regex_t *, char *, size_t);
 
757
+extern void ap_pcreposix_regfree(regex_t *);
 
758
 
 
759
 #ifdef __cplusplus
 
760
 }   /* extern "C" */
 
761
 
 
762
 
 
763
--- orig/apache2/srclib/pcre/pcretest.c
 
764
+++ mod/apache2/srclib/pcre/pcretest.c
 
765
@@ -9,7 +9,7 @@
 
766
 #include <time.h>
 
767
 #include <locale.h>
 
768
 
 
769
-/* Use the internal info for displaying the results of pcre_study(). */
 
770
+/* Use the internal info for displaying the results of ap_pcre_study(). */
 
771
 
 
772
 #include "internal.h"
 
773
 
 
774
@@ -409,13 +409,13 @@
 
775
 
 
776
 
 
777
 
 
778
-/* Get one piece of information from the pcre_fullinfo() function */
 
779
+/* Get one piece of information from the ap_pcre_fullinfo() function */
 
780
 
 
781
 static void new_info(pcre *re, pcre_extra *study, int option, void *ptr)
 
782
 {
 
783
 int rc;
 
784
-if ((rc = pcre_fullinfo(re, study, option, ptr)) < 0)
 
785
-  fprintf(outfile, "Error %d from pcre_fullinfo(%d)\n", rc, option);
 
786
+if ((rc = ap_pcre_fullinfo(re, study, option, ptr)) < 0)
 
787
+  fprintf(outfile, "Error %d from ap_pcre_fullinfo(%d)\n", rc, option);
 
788
 }
 
789
 
 
790
 
 
791
@@ -522,11 +522,11 @@
 
792
 
 
793
 /* Set alternative malloc function */
 
794
 
 
795
-pcre_malloc = new_malloc;
 
796
+ap_pcre_malloc = new_malloc;
 
797
 
 
798
 /* Heading line, then prompt for first regex if stdin */
 
799
 
 
800
-fprintf(outfile, "PCRE version %s\n\n", pcre_version());
 
801
+fprintf(outfile, "PCRE version %s\n\n", ap_pcre_version());
 
802
 
 
803
 /* Main loop */
 
804
 
 
805
@@ -652,7 +652,7 @@
 
806
         fprintf(outfile, "** Failed to set locale \"%s\"\n", pp);
 
807
         goto SKIP_DATA;
 
808
         }
 
809
-      tables = pcre_maketables();
 
810
+      tables = ap_pcre_maketables();
 
811
       pp = ppp;
 
812
       break;
 
813
 
 
814
@@ -674,14 +674,14 @@
 
815
     int cflags = 0;
 
816
     if ((options & PCRE_CASELESS) != 0) cflags |= REG_ICASE;
 
817
     if ((options & PCRE_MULTILINE) != 0) cflags |= REG_NEWLINE;
 
818
-    rc = regcomp(&preg, (char *)p, cflags);
 
819
+    rc = ap_pcreposix_regcomp(&preg, (char *)p, cflags);
 
820
 
 
821
     /* Compilation failed; go back for another re, skipping to blank line
 
822
     if non-interactive. */
 
823
 
 
824
     if (rc != 0)
 
825
       {
 
826
-      (void)regerror(rc, &preg, (char *)buffer, sizeof(buffer));
 
827
+      (void)ap_pcreposix_regerror(rc, &preg, (char *)buffer, sizeof(buffer));
 
828
       fprintf(outfile, "Failed: POSIX code %d: %s\n", rc, buffer);
 
829
       goto SKIP_DATA;
 
830
       }
 
831
@@ -700,7 +700,7 @@
 
832
       clock_t start_time = clock();
 
833
       for (i = 0; i < LOOPREPEAT; i++)
 
834
         {
 
835
-        re = pcre_compile((char *)p, options, &error, &erroroffset, tables);
 
836
+        re = ap_pcre_compile((char *)p, options, &error, &erroroffset, tables);
 
837
         if (re != NULL) free(re);
 
838
         }
 
839
       time_taken = clock() - start_time;
 
840
@@ -709,7 +709,7 @@
 
841
         ((double)LOOPREPEAT * (double)CLOCKS_PER_SEC));
 
842
       }
 
843
 
 
844
-    re = pcre_compile((char *)p, options, &error, &erroroffset, tables);
 
845
+    re = ap_pcre_compile((char *)p, options, &error, &erroroffset, tables);
 
846
 
 
847
     /* Compilation failed; go back for another re, skipping to blank line
 
848
     if non-interactive. */
 
849
@@ -756,26 +756,26 @@
 
850
       new_info(re, NULL, PCRE_INFO_FIRSTCHAR, &first_char);
 
851
       new_info(re, NULL, PCRE_INFO_LASTLITERAL, &need_char);
 
852
 
 
853
-      old_count = pcre_info(re, &old_options, &old_first_char);
 
854
+      old_count = ap_pcre_info(re, &old_options, &old_first_char);
 
855
       if (count < 0) fprintf(outfile,
 
856
-        "Error %d from pcre_info()\n", count);
 
857
+        "Error %d from ap_pcre_info()\n", count);
 
858
       else
 
859
         {
 
860
         if (old_count != count) fprintf(outfile,
 
861
-          "Count disagreement: pcre_fullinfo=%d pcre_info=%d\n", count,
 
862
+          "Count disagreement: ap_pcre_fullinfo=%d ap_pcre_info=%d\n", count,
 
863
             old_count);
 
864
 
 
865
         if (old_first_char != first_char) fprintf(outfile,
 
866
-          "First char disagreement: pcre_fullinfo=%d pcre_info=%d\n",
 
867
+          "First char disagreement: ap_pcre_fullinfo=%d ap_pcre_info=%d\n",
 
868
             first_char, old_first_char);
 
869
 
 
870
         if (old_options != (int)get_options) fprintf(outfile,
 
871
-          "Options disagreement: pcre_fullinfo=%ld pcre_info=%d\n",
 
872
+          "Options disagreement: ap_pcre_fullinfo=%ld ap_pcre_info=%d\n",
 
873
             get_options, old_options);
 
874
         }
 
875
 
 
876
       if (size != gotten_store) fprintf(outfile,
 
877
-        "Size disagreement: pcre_fullinfo=%d call to malloc for %d\n",
 
878
+        "Size disagreement: ap_pcre_fullinfo=%d call to malloc for %d\n",
 
879
         size, gotten_store);
 
880
 
 
881
       fprintf(outfile, "Capturing subpattern count = %d\n", count);
 
882
@@ -836,7 +836,7 @@
 
883
         clock_t time_taken;
 
884
         clock_t start_time = clock();
 
885
         for (i = 0; i < LOOPREPEAT; i++)
 
886
-          extra = pcre_study(re, study_options, &error);
 
887
+          extra = ap_pcre_study(re, study_options, &error);
 
888
         time_taken = clock() - start_time;
 
889
         if (extra != NULL) free(extra);
 
890
         fprintf(outfile, "  Study time %.3f milliseconds\n",
 
891
@@ -844,7 +844,7 @@
 
892
           ((double)LOOPREPEAT * (double)CLOCKS_PER_SEC));
 
893
         }
 
894
 
 
895
-      extra = pcre_study(re, study_options, &error);
 
896
+      extra = ap_pcre_study(re, study_options, &error);
 
897
       if (error != NULL)
 
898
         fprintf(outfile, "Failed to study: %s\n", error);
 
899
       else if (extra == NULL)
 
900
@@ -1047,11 +1047,11 @@
 
901
       if ((options & PCRE_NOTBOL) != 0) eflags |= REG_NOTBOL;
 
902
       if ((options & PCRE_NOTEOL) != 0) eflags |= REG_NOTEOL;
 
903
 
 
904
-      rc = regexec(&preg, (const char *)bptr, use_size_offsets, pmatch, eflags);
 
905
+      rc = ap_pcreposix_regexec(&preg, (const char *)bptr, use_size_offsets, pmatch, eflags);
 
906
 
 
907
       if (rc != 0)
 
908
         {
 
909
-        (void)regerror(rc, &preg, (char *)buffer, sizeof(buffer));
 
910
+        (void)ap_pcreposix_regerror(rc, &preg, (char *)buffer, sizeof(buffer));
 
911
         fprintf(outfile, "No match: POSIX code %d: %s\n", rc, buffer);
 
912
         }
 
913
       else
 
914
@@ -1090,7 +1090,7 @@
 
915
         clock_t time_taken;
 
916
         clock_t start_time = clock();
 
917
         for (i = 0; i < LOOPREPEAT; i++)
 
918
-          count = pcre_exec(re, extra, (char *)bptr, len,
 
919
+          count = ap_pcre_exec(re, extra, (char *)bptr, len,
 
920
             start_offset, options | g_notempty, use_offsets, use_size_offsets);
 
921
         time_taken = clock() - start_time;
 
922
         fprintf(outfile, "Execute time %.3f milliseconds\n",
 
923
@@ -1098,7 +1098,7 @@
 
924
           ((double)LOOPREPEAT * (double)CLOCKS_PER_SEC));
 
925
         }
 
926
 
 
927
-      count = pcre_exec(re, extra, (char *)bptr, len,
 
928
+      count = ap_pcre_exec(re, extra, (char *)bptr, len,
 
929
         start_offset, options | g_notempty, use_offsets, use_size_offsets);
 
930
 
 
931
       if (count == 0)
 
932
@@ -1138,7 +1138,7 @@
 
933
           if ((copystrings & (1 << i)) != 0)
 
934
             {
 
935
             char copybuffer[16];
 
936
-            int rc = pcre_copy_substring((char *)bptr, use_offsets, count,
 
937
+            int rc = ap_pcre_copy_substring((char *)bptr, use_offsets, count,
 
938
               i, copybuffer, sizeof(copybuffer));
 
939
             if (rc < 0)
 
940
               fprintf(outfile, "copy substring %d failed %d\n", i, rc);
 
941
@@ -1152,7 +1152,7 @@
 
942
           if ((getstrings & (1 << i)) != 0)
 
943
             {
 
944
             const char *substring;
 
945
-            int rc = pcre_get_substring((char *)bptr, use_offsets, count,
 
946
+            int rc = ap_pcre_get_substring((char *)bptr, use_offsets, count,
 
947
               i, &substring);
 
948
             if (rc < 0)
 
949
               fprintf(outfile, "get substring %d failed %d\n", i, rc);
 
950
@@ -1160,7 +1160,7 @@
 
951
               {
 
952
               fprintf(outfile, "%2dG %s (%d)\n", i, substring, rc);
 
953
               /* free((void *)substring); */
 
954
-              pcre_free_substring(substring);
 
955
+              ap_pcre_free_substring(substring);
 
956
               }
 
957
             }
 
958
           }
 
959
@@ -1168,7 +1168,7 @@
 
960
         if (getlist)
 
961
           {
 
962
           const char **stringlist;
 
963
-          int rc = pcre_get_substring_list((char *)bptr, use_offsets, count,
 
964
+          int rc = ap_pcre_get_substring_list((char *)bptr, use_offsets, count,
 
965
             &stringlist);
 
966
           if (rc < 0)
 
967
             fprintf(outfile, "get substring list failed %d\n", rc);
 
968
@@ -1179,7 +1179,7 @@
 
969
             if (stringlist[i] != NULL)
 
970
               fprintf(outfile, "string list not terminated by NULL\n");
 
971
             /* free((void *)stringlist); */
 
972
-            pcre_free_substring_list(stringlist);
 
973
+            ap_pcre_free_substring_list(stringlist);
 
974
             }
 
975
           }
 
976
         }
 
977
@@ -1243,7 +1243,7 @@
 
978
   CONTINUE:
 
979
 
 
980
 #if !defined NOPOSIX
 
981
-  if (posix || do_posix) regfree(&preg);
 
982
+  if (posix || do_posix) ap_pcreposix_regfree(&preg);
 
983
 #endif
 
984
 
 
985
   if (re != NULL) free(re);
 
986
 
 
987
 
 
988
--- orig/apache2/srclib/pcre/pgrep.c
 
989
+++ mod/apache2/srclib/pcre/pgrep.c
 
990
@@ -74,7 +74,7 @@
 
991
   if (length > 0 && buffer[length-1] == '\n') buffer[--length] = 0;
 
992
   linenumber++;
 
993
 
 
994
-  match = pcre_exec(pattern, hints, buffer, length, 0, 0, offsets, 99) >= 0;
 
995
+  match = ap_pcre_exec(pattern, hints, buffer, length, 0, 0, offsets, 99) >= 0;
 
996
   if (match && whole_lines && offsets[1] != length) match = FALSE;
 
997
 
 
998
   if (match != invert)
 
999
@@ -161,7 +161,7 @@
 
1000
       case 'x': whole_lines = TRUE; options |= PCRE_ANCHORED; break;
 
1001
 
 
1002
       case 'V':
 
1003
-      fprintf(stderr, "PCRE version %s\n", pcre_version());
 
1004
+      fprintf(stderr, "PCRE version %s\n", ap_pcre_version());
 
1005
       break;
 
1006
 
 
1007
       default:
 
1008
@@ -177,7 +177,7 @@
 
1009
 
 
1010
 /* Compile the regular expression. */
 
1011
 
 
1012
-pattern = pcre_compile(argv[i++], options, &error, &errptr, NULL);
 
1013
+pattern = ap_pcre_compile(argv[i++], options, &error, &errptr, NULL);
 
1014
 if (pattern == NULL)
 
1015
   {
 
1016
   fprintf(stderr, "pgrep: error in regex at offset %d: %s\n", errptr, error);
 
1017
@@ -186,7 +186,7 @@
 
1018
 
 
1019
 /* Study the regular expression, as we will be running it may times */
 
1020
 
 
1021
-hints = pcre_study(pattern, 0, &error);
 
1022
+hints = ap_pcre_study(pattern, 0, &error);
 
1023
 if (error != NULL)
 
1024
   {
 
1025
   fprintf(stderr, "pgrep: error while studing regex: %s\n", error);
 
1026
 
 
1027
 
 
1028
--- orig/apache2/srclib/pcre/study.c
 
1029
+++ mod/apache2/srclib/pcre/study.c
 
1030
@@ -328,7 +328,7 @@
 
1031
 
 
1032
 /* This function is handed a compiled expression that it must study to produce
 
1033
 information that will speed up the matching. It returns a pcre_extra block
 
1034
-which then gets handed back to pcre_exec().
 
1035
+which then gets handed back to ap_pcre_exec().
 
1036
 
 
1037
 Arguments:
 
1038
   re        points to the compiled expression
 
1039
@@ -341,7 +341,7 @@
 
1040
 */
 
1041
 
 
1042
 pcre_extra *
 
1043
-pcre_study(const pcre *external_re, int options, const char **errorptr)
 
1044
+ap_pcre_study(const pcre *external_re, int options, const char **errorptr)
 
1045
 {
 
1046
 uschar start_bits[32];
 
1047
 real_pcre_extra *extra;
 
1048
@@ -384,7 +384,7 @@
 
1049
 
 
1050
 /* Get an "extra" block and put the information therein. */
 
1051
 
 
1052
-extra = (real_pcre_extra *)(pcre_malloc)(sizeof(real_pcre_extra));
 
1053
+extra = (real_pcre_extra *)(ap_pcre_malloc)(sizeof(real_pcre_extra));
 
1054
 
 
1055
 if (extra == NULL)
 
1056
   {
 
1057
 
 
1058
 
 
1059