X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/1cc59d374be28e0f2a27720d003271216676c12e..6bf342e1eb87c656de34d668d7303a7d0138e89a:/src/src/pcre/pcre_globals.c diff --git a/src/src/pcre/pcre_globals.c b/src/src/pcre/pcre_globals.c index 90ff487da..2c3a80b67 100644 --- a/src/src/pcre/pcre_globals.c +++ b/src/src/pcre/pcre_globals.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/pcre/pcre_globals.c,v 1.3 2006/11/07 16:50:36 ph10 Exp $ */ +/* $Cambridge: exim/src/src/pcre/pcre_globals.c,v 1.4 2007/01/23 15:08:45 ph10 Exp $ */ /************************************************* * Perl-Compatible Regular Expressions * @@ -53,6 +53,18 @@ differently, and global variables are not used (see pcre.in). */ #ifndef VPCOMPAT + +/************************************************************************** +This code used to be here for use when compiling as a C++ library. However, +according to Dair Grant it is not needed: " + + Including 'extern "C"' in the declaration generates an "initialized and + declared `extern'" warning from gcc 4.0.1. Since we include pcre_internal.h, + which includes pcre.h, which declares these prototypes within an extern "C" {} + block, we shouldn't need the prefix here. + +So, from Release 7.0 I have cut this out. + #ifdef __cplusplus extern "C" void *(*pcre_malloc)(size_t) = malloc; extern "C" void (*pcre_free)(void *) = free; @@ -60,12 +72,13 @@ extern "C" void *(*pcre_stack_malloc)(size_t) = malloc; extern "C" void (*pcre_stack_free)(void *) = free; extern "C" int (*pcre_callout)(pcre_callout_block *) = NULL; #else +**************************************************************************/ + void *(*pcre_malloc)(size_t) = malloc; void (*pcre_free)(void *) = free; void *(*pcre_stack_malloc)(size_t) = malloc; void (*pcre_stack_free)(void *) = free; int (*pcre_callout)(pcre_callout_block *) = NULL; #endif -#endif /* End of pcre_globals.c */