summaryrefslogtreecommitdiff
path: root/ext/pcre/pcrelib/pcreposix.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pcre/pcrelib/pcreposix.c')
-rw-r--r--ext/pcre/pcrelib/pcreposix.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/ext/pcre/pcrelib/pcreposix.c b/ext/pcre/pcrelib/pcreposix.c
index 8582fba097..83263deaab 100644
--- a/ext/pcre/pcrelib/pcreposix.c
+++ b/ext/pcre/pcrelib/pcreposix.c
@@ -42,9 +42,24 @@ POSSIBILITY OF SUCH DAMAGE.
functions. */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+
+/* 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. */
+
+#if defined(_WIN32) && !defined(PCRE_STATIC)
+# define PCREPOSIX_EXP_DECL extern __declspec(dllexport)
+# define PCREPOSIX_EXP_DEFN __declspec(dllexport)
+#endif
+
+#include <pcre.h>
#include "pcre_internal.h"
#include "pcreposix.h"
-#include "stdlib.h"
@@ -109,7 +124,8 @@ static const int eint[] = {
REG_BADPAT, /* repeating a DEFINE group is not allowed */
REG_INVARG, /* inconsistent NEWLINE options */
REG_BADPAT, /* \g is not followed followed by an (optionally braced) non-zero number */
- REG_BADPAT /* (?+ or (?- must be followed by a non-zero number */
+ REG_BADPAT, /* (?+ or (?- must be followed by a non-zero number */
+ REG_BADPAT /* number is too big */
};
/* Table of texts corresponding to POSIX error codes */