summaryrefslogtreecommitdiff
path: root/pcrecpp_internal.h
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 /pcrecpp_internal.h
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
Diffstat (limited to 'pcrecpp_internal.h')
-rw-r--r--pcrecpp_internal.h60
1 files changed, 39 insertions, 21 deletions
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 */