From 1e8519b5b7fe80434ef4e4f82fe6ec4a2c80f8eb Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sat, 12 Sep 2009 14:47:55 +0000 Subject: [PATCH] 2009-09-12 16:47 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * external/pcre/pcreglob.c ! Fixed watcom compilation. There are still warnings. Please review it. * external/pcre/config.h * external/pcre/Makefile * -DPCRE_STATIC moved to Makefile from config.h. There is no dynlib build mode here, so this could be done. --- harbour/ChangeLog | 10 ++++++++++ harbour/external/pcre/Makefile | 2 ++ harbour/external/pcre/config.h | 4 ---- harbour/external/pcre/pcreglob.c | 2 ++ 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 9f4c4e5f57..c46a709005 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,16 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-09-12 16:47 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * external/pcre/pcreglob.c + ! Fixed watcom compilation. There are still warnings. + Please review it. + + * external/pcre/config.h + * external/pcre/Makefile + * -DPCRE_STATIC moved to Makefile from config.h. There is + no dynlib build mode here, so this could be done. + 2009-09-12 15:27 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * config/bsd/gcc.mk * config/hpux/gcc.mk diff --git a/harbour/external/pcre/Makefile b/harbour/external/pcre/Makefile index 168b23cfc5..4ee4d46c2e 100644 --- a/harbour/external/pcre/Makefile +++ b/harbour/external/pcre/Makefile @@ -34,6 +34,8 @@ LIBNAME := hbpcre ifneq ($(HB_HAS_PCRE_LOCAL),) + HB_CFLAGS += -DPCRE_STATIC + # workaround for problems in sunpro x86 PIC builds exploited by hbpcre library code ifeq ($(HB_COMPILER),sunpro) ifeq ($(HB_PLATFORM),sunos) diff --git a/harbour/external/pcre/config.h b/harbour/external/pcre/config.h index 9d0a5a0fb0..315e04ef07 100644 --- a/harbour/external/pcre/config.h +++ b/harbour/external/pcre/config.h @@ -1,10 +1,6 @@ /* config.h. Generated from config.h.in by configure. */ /* config.h.in. Generated from configure.ac by autoheader. */ -#if !defined( HB_DYNLIB ) - #define PCRE_STATIC -#endif - /* On Unix-like systems config.h.in is converted by "configure" into config.h. Some other environments also support the use of "configure". PCRE is written in Standard C, but there are a few non-standard things it can cope with, allowing diff --git a/harbour/external/pcre/pcreglob.c b/harbour/external/pcre/pcreglob.c index 01e65eafb9..6907050678 100644 --- a/harbour/external/pcre/pcreglob.c +++ b/harbour/external/pcre/pcreglob.c @@ -53,11 +53,13 @@ differently, and global variables are not used (see pcre.in). */ #include "pcreinal.h" #ifndef VPCOMPAT +extern "C" { PCRE_EXP_DATA_DEFN void *(*pcre_malloc)(size_t) = malloc; PCRE_EXP_DATA_DEFN void (*pcre_free)(void *) = free; PCRE_EXP_DATA_DEFN void *(*pcre_stack_malloc)(size_t) = malloc; PCRE_EXP_DATA_DEFN void (*pcre_stack_free)(void *) = free; PCRE_EXP_DATA_DEFN int (*pcre_callout)(pcre_callout_block *) = NULL; +} #endif /* End of pcre_globals.c */