summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15>2012-01-23 19:26:03 +0000
committerzherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15>2012-01-23 19:26:03 +0000
commitc9ab244aa51003432756a96db6051ac5d99e09a4 (patch)
treefa3bc626e76e5d65c5751e2cd654a3b4cd289af0
parent6d006dba3ccf59347e2eec0b2d60f6d4a1254a33 (diff)
downloadpcre-c9ab244aa51003432756a96db6051ac5d99e09a4.tar.gz
fix local symbol issues in pcre_printint.c
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@905 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r--pcre_compile.c4
-rw-r--r--pcre_internal.h10
-rw-r--r--pcre_printint.c7
-rw-r--r--pcre_study.c2
-rw-r--r--pcretest.c3
5 files changed, 18 insertions, 8 deletions
diff --git a/pcre_compile.c b/pcre_compile.c
index 4c3d73b..8070f51 100644
--- a/pcre_compile.c
+++ b/pcre_compile.c
@@ -8134,9 +8134,9 @@ if ((re->flags & PCRE_REQCHSET) != 0)
}
#ifdef COMPILE_PCRE8
-pcre_printint(re, stdout, TRUE);
+pcre_printint((pcre *)re, stdout, TRUE);
#else
-pcre16_printint(re, stdout, TRUE);
+pcre16_printint((pcre *)re, stdout, TRUE);
#endif
/* This check is done here in the debugging case so that the code that
diff --git a/pcre_internal.h b/pcre_internal.h
index 94d33e0..e5a4b6a 100644
--- a/pcre_internal.h
+++ b/pcre_internal.h
@@ -2182,12 +2182,20 @@ total length. */
/* Internal function prefix */
#ifdef COMPILE_PCRE8
+#ifndef PUBL
#define PUBL(name) pcre_##name
+#endif
+#ifndef PRIV
#define PRIV(name) _pcre_##name
-#else
+#endif
+#else /* COMPILE_PCRE8 */
#ifdef COMPILE_PCRE16
+#ifndef PUBL
#define PUBL(name) pcre16_##name
+#endif
+#ifndef PRIV
#define PRIV(name) _pcre16_##name
+#endif
#else
#error Unsupported compiling mode
#endif /* COMPILE_PCRE16 */
diff --git a/pcre_printint.c b/pcre_printint.c
index 6e98286..f16c31e 100644
--- a/pcre_printint.c
+++ b/pcre_printint.c
@@ -55,6 +55,9 @@ asked to print out a compiled regex for debugging purposes. */
#include "config.h"
#endif
+/* For pcretest program. */
+#define PRIV(name) name
+
/* We have to include pcre_internal.h because we need the internal info for
displaying the results of pcre_study() and we also need to know about the
internal macros, structures, and other internal data values; pcretest has
@@ -100,7 +103,7 @@ static const char *OP_names[] = { OP_NAME_LIST };
but its size is needed for a check that ensures it is the correct size for the
number of opcodes (thus catching update omissions). */
-static const pcre_uint8 OP_lengths[] = { OP_LENGTHS };
+static const pcre_uint8 OP_lengths_size[] = { OP_LENGTHS };
@@ -298,7 +301,7 @@ for(;;)
case OP_TABLE_LENGTH:
case OP_TABLE_LENGTH +
((sizeof(OP_names)/sizeof(const char *) == OP_TABLE_LENGTH) &&
- (sizeof(OP_lengths) == OP_TABLE_LENGTH)):
+ (sizeof(OP_lengths_size) == OP_TABLE_LENGTH)):
break;
/* ========================================================================== */
diff --git a/pcre_study.c b/pcre_study.c
index d544826..61deb56 100644
--- a/pcre_study.c
+++ b/pcre_study.c
@@ -1451,7 +1451,7 @@ if (bits_set || min > 0
#ifdef PCRE_DEBUG
if (bits_set)
{
- pcre_uint8 *ptr = (pcre_uint32 *)start_bits;
+ pcre_uint8 *ptr = start_bits;
int i;
printf("Start bits:\n");
diff --git a/pcretest.c b/pcretest.c
index d41f3f9..c6e1e4f 100644
--- a/pcretest.c
+++ b/pcretest.c
@@ -105,6 +105,7 @@ input mode under Windows. */
#define OUTPUT_MODE "wb"
#endif
+#define PRIV(name) name
/* We have to include pcre_internal.h because we need the internal info for
displaying the results of pcre_study() and we also need to know about the
@@ -141,8 +142,6 @@ to keep two copies, we include the source file here, changing the names of the
external symbols to prevent clashes. */
#define PCRE_INCLUDED
-#undef PRIV
-#define PRIV(name) name
#include "pcre_tables.c"