summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2007-08-01 09:10:40 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2007-08-01 09:10:40 +0000
commit01eeb658525bc9a5b840253f8b415af6abe282e0 (patch)
treeb69d63abc2337c71dffc18988d2969cecbe24271
parente188596ef3e912f62e3ae85c8da905a54fc41d8b (diff)
downloadpcre-01eeb658525bc9a5b840253f8b415af6abe282e0.tar.gz
Correct errors in previous patch; tidy for test release.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@200 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r--CMakeLists.txt8
-rw-r--r--ChangeLog5
-rw-r--r--NON-UNIX-USE15
-rw-r--r--dftables.c10
-rw-r--r--pcre_chartables.c.dist4
-rw-r--r--pcre_compile.c4
-rw-r--r--pcre_config.c4
-rw-r--r--pcre_dfa_exec.c4
-rw-r--r--pcre_exec.c4
-rw-r--r--pcre_fullinfo.c4
-rw-r--r--pcre_get.c4
-rw-r--r--pcre_globals.c4
-rw-r--r--pcre_info.c4
-rw-r--r--pcre_maketables.c8
-rw-r--r--pcre_newline.c4
-rw-r--r--pcre_ord2utf8.c6
-rw-r--r--pcre_refcount.c4
-rw-r--r--pcre_scanner.cc4
-rw-r--r--pcre_scanner_unittest.cc4
-rw-r--r--pcre_stringpiece.cc4
-rw-r--r--pcre_stringpiece_unittest.cc4
-rw-r--r--pcre_study.c4
-rw-r--r--pcre_tables.c4
-rw-r--r--pcre_try_flipped.c4
-rw-r--r--pcre_ucp_searchfuncs.c4
-rw-r--r--pcre_valid_utf8.c4
-rw-r--r--pcre_version.c4
-rw-r--r--pcre_xclass.c4
-rw-r--r--pcrecpp.cc2
-rw-r--r--pcrecpp.h4
-rw-r--r--pcrecpp_internal.h60
-rw-r--r--pcrecpp_unittest.cc4
-rw-r--r--pcredemo.c2
-rw-r--r--pcreposix.c7
-rw-r--r--pcreposix.h2
-rw-r--r--pcretest.c4
36 files changed, 127 insertions, 98 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 29c7578..7a732fb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -316,10 +316,10 @@ FILE(GLOB man1 ${CMAKE_SOURCE_DIR}/doc/*.1)
FILE(GLOB man3 ${CMAKE_SOURCE_DIR}/doc/*.3)
IF(PCRE_BUILD_PCRECPP)
- INSTALL(TARGETS pcrecpp
- RUNTIME DESTINATION bin
- LIBRARY DESTINATION lib
- ARCHIVE DESTINATION lib)
+ INSTALL(TARGETS pcrecpp
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib)
INSTALL(FILES ${PCRECPP_HEADERS} DESTINATION include)
ELSE(PCRE_BUILD_PCRECPP)
# Remove pcrecpp.3
diff --git a/ChangeLog b/ChangeLog
index dc2c89f..402a9af 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -48,6 +48,11 @@ Version 7.3 05-Jul-07
from the 1000-entry workspace that had been reserved. So now there is no
explicit limit, but more stack is used.
+ 8. Applied Daniel's patches to solve problems with the import/export magic
+ syntax that is required for Windows, and which was going wrong for the
+ pcreposix and pcrecpp parts of the library. These were overlooked when this
+ problem was solved for the main library.
+
Version 7.2 19-Jun-07
---------------------
diff --git a/NON-UNIX-USE b/NON-UNIX-USE
index ea66993..f1047ba 100644
--- a/NON-UNIX-USE
+++ b/NON-UNIX-USE
@@ -15,7 +15,7 @@ This document contains the following sections:
GENERAL
-I (Philip Hazel) have no knowledge of Windows or VMS sytems and how their
+I (Philip Hazel) have no experience of Windows or VMS sytems and how their
libraries work. The items in the PCRE distribution and Makefile that relate to
anything other than Unix-like systems are untested by me.
@@ -105,6 +105,11 @@ The following are generic comments about building the PCRE C library "by hand".
pcre_version.c
pcre_xclass.c
+ Make sure that you include -I. in the compiler command (or equivalent for
+ an unusual compiler) so that all included PCRE header files are first
+ sought in the current directory. Otherwise you run the risk of picking up
+ a previously-installed file from somewhere else.
+
(7) Now link all the compiled code into an object library in whichever form
your system keeps such libraries. This is the basic PCRE C library. If
your system has static and shared libraries, you may have to do this once
@@ -151,9 +156,9 @@ The default processor stack size of 1Mb in some Windows environments is too
small for matching patterns that need much recursion. In particular, test 2 may
fail because of this. Normally, running out of stack causes a crash, but there
have been cases where the test program has just died silently. See your linker
-documentation for how to increase stack size if you experience problems. The
-Linux default of 8Mb is a reasonable choice for the stack, though even that can
-be too small for some pattern/subject combinations. There is more about stack
+documentation for how to increase stack size if you experience problems. The
+Linux default of 8Mb is a reasonable choice for the stack, though even that can
+be too small for some pattern/subject combinations. There is more about stack
usage in the "pcrestack" documentation.
@@ -310,5 +315,5 @@ $! Locale could not be set to fr
$!
=========================
-Last Updated: 05 July 2007
+Last Updated: 01 August 2007
****
diff --git a/dftables.c b/dftables.c
index 39e525e..eb9a1a4 100644
--- a/dftables.c
+++ b/dftables.c
@@ -43,9 +43,9 @@ character tables for PCRE. The tables are built according to the current
locale. Now that pcre_maketables is a function visible to the outside world, we
make use of its code from here in order to be consistent. */
-#ifdef HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
+#endif
#include <ctype.h>
#include <stdio.h>
@@ -109,9 +109,9 @@ fprintf(f,
"Pulling in the header ensures that the array gets flagged as \"someone\n"
"outside this compilation unit might reference this\" and so it will always\n"
"be supplied to the linker. */\n\n"
- "#ifdef HAVE_CONFIG_H"
- "#include <config.h>"
- "#endif"
+ "#ifdef HAVE_CONFIG_H\n"
+ "#include <config.h>\n"
+ "#endif\n\n"
"#include \"pcre_internal.h\"\n\n");
fprintf(f,
"const unsigned char _pcre_default_tables[] = {\n\n"
diff --git a/pcre_chartables.c.dist b/pcre_chartables.c.dist
index 7769bd6..3d6a4ff 100644
--- a/pcre_chartables.c.dist
+++ b/pcre_chartables.c.dist
@@ -20,9 +20,9 @@ and dead code stripping is activated. This leads to link errors. Pulling in the
header ensures that the array gets flagged as "someone outside this compilation
unit might reference this" and so it will always be supplied to the linker. */
-#ifdef HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
+#endif
#include "pcre_internal.h"
diff --git a/pcre_compile.c b/pcre_compile.c
index f066714..2e14220 100644
--- a/pcre_compile.c
+++ b/pcre_compile.c
@@ -42,9 +42,9 @@ POSSIBILITY OF SUCH DAMAGE.
supporting internal functions that are not used by other modules. */
-#ifdef HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
+#endif
#define NLBLOCK cd /* Block containing newline information */
#define PSSTART start_pattern /* Field containing processed string start */
diff --git a/pcre_config.c b/pcre_config.c
index d148f35..ea0e317 100644
--- a/pcre_config.c
+++ b/pcre_config.c
@@ -41,9 +41,9 @@ POSSIBILITY OF SUCH DAMAGE.
/* This module contains the external function pcre_config(). */
-#ifdef HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
+#endif
#include "pcre_internal.h"
diff --git a/pcre_dfa_exec.c b/pcre_dfa_exec.c
index f00b57f..cb915ee 100644
--- a/pcre_dfa_exec.c
+++ b/pcre_dfa_exec.c
@@ -44,9 +44,9 @@ FSM). This is NOT Perl- compatible, but it has advantages in certain
applications. */
-#ifdef HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
+#endif
#define NLBLOCK md /* Block containing newline information */
#define PSSTART start_subject /* Field containing processed string start */
diff --git a/pcre_exec.c b/pcre_exec.c
index 1c7f39c..8462640 100644
--- a/pcre_exec.c
+++ b/pcre_exec.c
@@ -42,9 +42,9 @@ POSSIBILITY OF SUCH DAMAGE.
pattern matching using an NFA algorithm, trying to mimic Perl as closely as
possible. There are also some static supporting functions. */
-#ifdef HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
+#endif
#define NLBLOCK md /* Block containing newline information */
#define PSSTART start_subject /* Field containing processed string start */
diff --git a/pcre_fullinfo.c b/pcre_fullinfo.c
index 031aad6..9f1f76b 100644
--- a/pcre_fullinfo.c
+++ b/pcre_fullinfo.c
@@ -42,9 +42,9 @@ POSSIBILITY OF SUCH DAMAGE.
information about a compiled pattern. */
-#ifdef HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
+#endif
#include "pcre_internal.h"
diff --git a/pcre_get.c b/pcre_get.c
index f9baee6..64a195e 100644
--- a/pcre_get.c
+++ b/pcre_get.c
@@ -43,9 +43,9 @@ from the subject string after a regex match has succeeded. The original idea
for these functions came from Scott Wimer. */
-#ifdef HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
+#endif
#include "pcre_internal.h"
diff --git a/pcre_globals.c b/pcre_globals.c
index 4b62d11..41b89dd 100644
--- a/pcre_globals.c
+++ b/pcre_globals.c
@@ -46,9 +46,9 @@ indirection. These values can be changed by the caller, but are shared between
all threads. However, when compiling for Virtual Pascal, things are done
differently, and global variables are not used (see pcre.in). */
-#ifdef HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
+#endif
#include "pcre_internal.h"
diff --git a/pcre_info.c b/pcre_info.c
index 7b31894..c40eb7c 100644
--- a/pcre_info.c
+++ b/pcre_info.c
@@ -43,9 +43,9 @@ information about a compiled pattern. However, use of this function is now
deprecated, as it has been superseded by pcre_fullinfo(). */
-#ifdef HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
+#endif
#include "pcre_internal.h"
diff --git a/pcre_maketables.c b/pcre_maketables.c
index b8a6682..1e6381a 100644
--- a/pcre_maketables.c
+++ b/pcre_maketables.c
@@ -45,10 +45,10 @@ compilation of dftables.c, in which case the macro DFTABLES is defined. */
#ifndef DFTABLES
- #ifdef HAVE_CONFIG_H
- #include <config.h>
- #endif
- #include "pcre_internal.h"
+# ifdef HAVE_CONFIG_H
+# include <config.h>
+# endif
+# include "pcre_internal.h"
#endif
diff --git a/pcre_newline.c b/pcre_newline.c
index 053df61..a1666ea 100644
--- a/pcre_newline.c
+++ b/pcre_newline.c
@@ -47,9 +47,9 @@ and NLTYPE_ANY. The full list of Unicode newline characters is taken from
http://unicode.org/unicode/reports/tr18/. */
-#ifdef HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
+#endif
#include "pcre_internal.h"
diff --git a/pcre_ord2utf8.c b/pcre_ord2utf8.c
index 6378cce..7552034 100644
--- a/pcre_ord2utf8.c
+++ b/pcre_ord2utf8.c
@@ -41,10 +41,10 @@ POSSIBILITY OF SUCH DAMAGE.
/* This file contains a private PCRE function that converts an ordinal
character value into a UTF8 string. */
-#ifdef HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
-
+#endif
+
#include "pcre_internal.h"
diff --git a/pcre_refcount.c b/pcre_refcount.c
index 658e627..b6a464c 100644
--- a/pcre_refcount.c
+++ b/pcre_refcount.c
@@ -44,9 +44,9 @@ pattern data block. This might be helpful in applications where the block is
shared by different users. */
-#ifdef HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
+#endif
#include "pcre_internal.h"
diff --git a/pcre_scanner.cc b/pcre_scanner.cc
index f23716d..0ff7f7f 100644
--- a/pcre_scanner.cc
+++ b/pcre_scanner.cc
@@ -29,9 +29,9 @@
//
// Author: Sanjay Ghemawat
-#ifdef HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
+#endif
#include <vector>
#include <assert.h>
diff --git a/pcre_scanner_unittest.cc b/pcre_scanner_unittest.cc
index 92d8a55..2f77d8a 100644
--- a/pcre_scanner_unittest.cc
+++ b/pcre_scanner_unittest.cc
@@ -32,9 +32,9 @@
// Unittest for scanner, especially GetNextComments and GetComments()
// functionality.
-#ifdef HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
+#endif
#include <stdio.h>
#include <string>
diff --git a/pcre_stringpiece.cc b/pcre_stringpiece.cc
index a8e1e2c..d79e1b1 100644
--- a/pcre_stringpiece.cc
+++ b/pcre_stringpiece.cc
@@ -30,9 +30,9 @@
// Author: wilsonh@google.com (Wilson Hsieh)
//
-#ifdef HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
+#endif
#include <iostream>
#include "pcrecpp_internal.h"
diff --git a/pcre_stringpiece_unittest.cc b/pcre_stringpiece_unittest.cc
index 90cad7c..c23c63d 100644
--- a/pcre_stringpiece_unittest.cc
+++ b/pcre_stringpiece_unittest.cc
@@ -1,9 +1,9 @@
// Copyright 2003 and onwards Google Inc.
// Author: Sanjay Ghemawat
-#ifdef HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
+#endif
#include <stdio.h>
#include <map>
diff --git a/pcre_study.c b/pcre_study.c
index a9b7599..6a6c314 100644
--- a/pcre_study.c
+++ b/pcre_study.c
@@ -42,9 +42,9 @@ POSSIBILITY OF SUCH DAMAGE.
supporting functions. */
-#ifdef HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
+#endif
#include "pcre_internal.h"
diff --git a/pcre_tables.c b/pcre_tables.c
index f37bf4a..7d79eff 100644
--- a/pcre_tables.c
+++ b/pcre_tables.c
@@ -44,9 +44,9 @@ uses macros to change their names from _pcre_xxx to xxxx, thereby avoiding name
clashes with the library. */
-#ifdef HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
+#endif
#include "pcre_internal.h"
diff --git a/pcre_try_flipped.c b/pcre_try_flipped.c
index a461ced..4f98918 100644
--- a/pcre_try_flipped.c
+++ b/pcre_try_flipped.c
@@ -43,9 +43,9 @@ see if it was compiled with the opposite endianness. If so, it uses an
auxiliary local function to flip the appropriate bytes. */
-#ifdef HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
+#endif
#include "pcre_internal.h"
diff --git a/pcre_ucp_searchfuncs.c b/pcre_ucp_searchfuncs.c
index 06de257..d3edc2d 100644
--- a/pcre_ucp_searchfuncs.c
+++ b/pcre_ucp_searchfuncs.c
@@ -41,9 +41,9 @@ POSSIBILITY OF SUCH DAMAGE.
/* This module contains code for searching the table of Unicode character
properties. */
-#ifdef HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
+#endif
#include "pcre_internal.h"
diff --git a/pcre_valid_utf8.c b/pcre_valid_utf8.c
index 7decf52..03798c3 100644
--- a/pcre_valid_utf8.c
+++ b/pcre_valid_utf8.c
@@ -42,9 +42,9 @@ POSSIBILITY OF SUCH DAMAGE.
strings. */
-#ifdef HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
+#endif
#include "pcre_internal.h"
diff --git a/pcre_version.c b/pcre_version.c
index 0c7c1a0..e1ab4d4 100644
--- a/pcre_version.c
+++ b/pcre_version.c
@@ -42,9 +42,9 @@ POSSIBILITY OF SUCH DAMAGE.
string that identifies the PCRE version that is in use. */
-#ifdef HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
+#endif
#include "pcre_internal.h"
diff --git a/pcre_xclass.c b/pcre_xclass.c
index fe74c6d..502e718 100644
--- a/pcre_xclass.c
+++ b/pcre_xclass.c
@@ -43,9 +43,9 @@ class (one that contains characters whose values are > 255). It is used by both
pcre_exec() and pcre_def_exec(). */
-#ifdef HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
+#endif
#include "pcre_internal.h"
diff --git a/pcrecpp.cc b/pcrecpp.cc
index 73f6b75..e9378c0 100644
--- a/pcrecpp.cc
+++ b/pcrecpp.cc
@@ -55,7 +55,7 @@ static const int kMaxArgs = 16;
static const int kVecSize = (1 + kMaxArgs) * 3; // results + PCRE workspace
// Special object that stands-in for no argument
-PCRECPP_EXP_DECL Arg no_arg((void*)NULL);
+PCRECPP_EXP_DEFN Arg no_arg((void*)NULL);
// If a regular expression has no error, its error_ field points here
static const string empty_string;
diff --git a/pcrecpp.h b/pcrecpp.h
index cb30552..c3c536c 100644
--- a/pcrecpp.h
+++ b/pcrecpp.h
@@ -355,7 +355,7 @@ PCRECPP_EXP_DECL Arg no_arg;
// along with other options we put on top of pcre.
// Only 9 modifiers, plus match_limit and match_limit_recursion,
// are supported now.
-class PCRECPP_EXP_DECL RE_Options {
+class PCRECPP_EXP_DEFN RE_Options {
public:
// constructor
RE_Options() : match_limit_(0), match_limit_recursion_(0), all_options_(0) {}
@@ -487,7 +487,7 @@ static inline RE_Options EXTENDED() {
// Interface for regular expression matching. Also corresponds to a
// pre-compiled regular expression. An "RE" object is safe for
// concurrent use by multiple threads.
-class PCRECPP_EXP_DECL RE {
+class PCRECPP_EXP_DEFN RE {
public:
// We provide implicit conversions from strings so that users can
// pass in a string or a "const char*" wherever an "RE" is expected.
diff --git a/pcrecpp_internal.h b/pcrecpp_internal.h
index f4a7fd5..0af9478 100644
--- a/pcrecpp_internal.h
+++ b/pcrecpp_internal.h
@@ -1,3 +1,38 @@
+/*************************************************
+* Perl-Compatible Regular Expressions *
+*************************************************/
+
+/*
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
+
+
#ifndef PCRECPP_INTERNAL_H
#define PCRECPP_INTERNAL_H
@@ -6,45 +41,28 @@ using some MS magic. I found some useful information on this web page:
http://msdn2.microsoft.com/en-us/library/y4h7bcy6(VS.80).aspx. According to the
information there, using __declspec(dllexport) without "extern" we have a
definition; with "extern" we have a declaration. The settings here override the
-setting in pcrecpp.h; it defines only PCRECPP_EXP_DECL, which is all that is
-needed for applications (they just import the symbols). We use:
+setting in pcre.h. We use:
PCRECPP_EXP_DECL for declarations
PCRECPP_EXP_DEFN for definitions of exported functions
- PCRECPP_EXP_DATA_DEFN for definitions of exported variables
-
-The reason for the two DEFN macros is that in non-Windows environments, one
-does not want to have "extern" before variable definitions because it leads to
-compiler warnings. So we distinguish between functions and variables. In
-Windows, the two should always be the same.
-The reason for wrapping this in #ifndef PCRECPP_EXP_DECL is so that pcretest,
-which is an application, but needs to import this file in order to "peek" at
-internals, can #include pcre.h first to get an application's-eye view.
-
-In principle, people compiling for non-Windows, non-Unix-like (i.e. uncommon,
-special-purpose environments) might want to stick other stuff in front of
-exported symbols. That's why, in the non-Windows case, we set PCRECPP_EXP_DEFN and
-PCRECPP_EXP_DATA_DEFN only if they are not already set. */
+*/
#ifndef PCRECPP_EXP_DECL
# ifdef _WIN32
# ifndef PCRECPP_STATIC
# define PCRECPP_EXP_DECL extern __declspec(dllexport)
# define PCRECPP_EXP_DEFN __declspec(dllexport)
-# define PCRECPP_EXP_DATA_DEFN __declspec(dllexport)
# else
# define PCRECPP_EXP_DECL extern
# define PCRECPP_EXP_DEFN
-# define PCRECPP_EXP_DATA_DEFN
# endif
# else
-# define PCRECPP_EXP_DECL
+# define PCRECPP_EXP_DECL extern
# define PCRECPP_EXP_DEFN
-# define PCRECPP_EXP_DATA_DEFN
# endif
#endif
-#endif
+#endif /* PCRECPP_INTERNAL_H */
/* End of pcrecpp_internal.h */
diff --git a/pcrecpp_unittest.cc b/pcrecpp_unittest.cc
index 901ed33..795e77a 100644
--- a/pcrecpp_unittest.cc
+++ b/pcrecpp_unittest.cc
@@ -33,9 +33,9 @@
//
// TODO: Test extractions for PartialMatch/Consume
-#ifdef HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
+#endif
#include <stdio.h>
#include <cassert>
diff --git a/pcredemo.c b/pcredemo.c
index 5be0899..4068e3e 100644
--- a/pcredemo.c
+++ b/pcredemo.c
@@ -11,7 +11,7 @@ Compile thuswise:
-R/usr/local/lib -lpcre
Replace "/usr/local/include" and "/usr/local/lib" with wherever the include and
-library files for PCRE are installed on your system. You don't need -I and -L
+library files for PCRE are installed on your system. You don't need -I and -L
if PCRE is installed in the standard system libraries. Only some operating
systems (e.g. Solaris) use the -R option.
*/
diff --git a/pcreposix.c b/pcreposix.c
index 543b605..9c536e7 100644
--- a/pcreposix.c
+++ b/pcreposix.c
@@ -42,12 +42,12 @@ POSSIBILITY OF SUCH DAMAGE.
functions. */
-#ifdef HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
+#endif
-/* Ensure that the PCREPOSIX_EXP_xxx macros are set appropriately for
+/* Ensure that the PCREPOSIX_EXP_xxx macros are set appropriately for
compiling these functions. This must come before including pcreposix.h, where
they are set for an application (using these functions) if they have not
previously been set. */
@@ -57,6 +57,7 @@ previously been set. */
# define PCREPOSIX_EXP_DEFN __declspec(dllexport)
#endif
+#include <pcre.h>
#include "pcre_internal.h"
#include "pcreposix.h"
diff --git a/pcreposix.h b/pcreposix.h
index 40ed406..875e1ff 100644
--- a/pcreposix.h
+++ b/pcreposix.h
@@ -107,7 +107,7 @@ typedef struct {
/* When an application links to a PCRE DLL in Windows, the symbols that are
imported have to be identified as such. When building PCRE, the appropriate
-export settings are needed, and are set in pcreposix.c before including this
+export settings are needed, and are set in pcreposix.c before including this
file. */
#if defined(_WIN32) && !defined(PCRE_STATIC) && !defined(PCREPOSIX_EXP_DECL)
diff --git a/pcretest.c b/pcretest.c
index afa1de8..613eb64 100644
--- a/pcretest.c
+++ b/pcretest.c
@@ -36,9 +36,9 @@ POSSIBILITY OF SUCH DAMAGE.
*/
-#ifdef HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
+#endif
#include <ctype.h>
#include <stdio.h>