1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-10 17:59:04 +00:00
Files
nmap/libpcre/NMAP_MODIFICATIONS
david 9a43e5394c Disable auto-generation of libpcre/pcre_chartables.c. That file is meant
to be automatically generated by the makefile; however we include a copy
to enable the Windows build to work. On Unix, the makefile was
overwriting the file with a symbolic link to
libpcre/pcre_chartables.c.dist, which was causing revision-control
headaches. Now that file is copied instead of linked to, so its contents
don't change.

It is safe to use a static copy of the file instead of an auto-generated
one because Nmap has never used the auto-generation feature. You need to
use a special flag --enable-rebuild-chartables to get that. So copying
the file has the same behavior as creating a link. Furthermore, it's not
desirable to generate that file (using dftables, an auxiliary program
that uses the current locale) because we don't want our regular
expressions to be locale-dependent.

pcre_chartables.c was also removed from CLEANFILES so it's not deleted
by "make clean" or "make distclean". pcre.h is still deleted by "make
distclean" because it's included in AC_CONFIG_FILES. That's not as big a
deal.
2007-10-03 08:11:45 +00:00

149 lines
4.2 KiB
Plaintext

This directory conains a version of LibPCRE 7.2 that has been stripped
down to less than a third of its original uncompressed size. So if you
want docs, tests and such, you should go to the PCRE website at
http://www.pcre.org . Here are the changes for the Nmap version:
o Started this NMAP_MODIFICATIONS file
o Removed these directories:
doc
testdata
o Removed these files:
pcretest.c
pcregrep.c
pcredemo.c
RunGrepTest
RunTest
RunTest.bat
perltest.pl
Detrail
PrepareRelease
libpcre.pc.in
libpcrecpp.pc.in
pcre_printint.src
CMakeLists.txt
config-cmake.h.in
132html
makevp.bat
makevp_c.txt
makevp_l.txt
pcregexp.pas
ltmain.sh
ChangeLog
NEWS
HACKING
COPYING [Look at LICENCE]
o Got rid of the C++ wrapper, which included this step:
rm -f *.cc pcrecpparg.h.in pcrecpp.h pcre_scanner.h pcre_stringpiece.h.in
o Copied pcre.h.generic to pcre.h and pcre_chartables.c.dist to, you
guessed it, pcre_chartables.c (for Windows). Running ./configure in
UNIX just overwrites them with other ones. Made the rule that makes
pcre_chartables.c copy pcre_chartables.c.dist instead of making a
symbolic link to it. Remove pcre_chartables.c from CLEANFILES.
o Stripped down Makefile.am and configure.ac substantially to remove
libtool dependency (was having trouble on Mac OS X), remove Windows
stuff (Nmap uses a custom MS VC project for this), and insure it only
worries about building libpcre.a (which is now build in the libpcre
directory rather than in libpcre/.libs ). Removed quite a bit of
unneeded things from these files, as well as adding -fno-thread-jumps
when compiling on Mac OS X on Intel (original patch: Kurt Grutzmacher
grutz(a)jingojango.net). [The diff is FAR too large to included here]
o Comment out some build configuration lines from pcre-internal.h because Nmap
builds a static library:
--- pcre-7.2/pcre_internal.h 2007-06-12 08:39:55.000000000 -0500
+++ libpcre/pcre_internal.h 2007-08-15 18:56:18.000000000 -0500
@@ -112,15 +112,19 @@ PCRE_EXP_DATA_DEFN only if they are not
#ifndef PCRE_EXP_DECL
# ifdef _WIN32
+/* COMMENTED OUT AS IT'S COMPILED STATICALLY
# ifdef DLL_EXPORT
# define PCRE_EXP_DECL extern __declspec(dllexport)
# define PCRE_EXP_DEFN __declspec(dllexport)
# define PCRE_EXP_DATA_DEFN __declspec(dllexport)
# else
+*/
# define PCRE_EXP_DECL extern
# define PCRE_EXP_DEFN
# define PCRE_EXP_DATA_DEFN
+/*
# endif
+*/
#
# else
# ifdef __cplusplus
...and pcre.h.in/pcre.h.generic/pcre.h:
--- pcre-7.2/pcre.h.in 2007-06-04 05:18:02.000000000 -0500
+++ libpcre/pcre.h.in 2007-08-15 19:24:46.000000000 -0500
@@ -51,6 +51,7 @@ imported have to be identified as such.
export setting is defined in pcre_internal.h, which includes this file. So we
don't change an existing definition of PCRE_EXP_DECL. */
+/*
#ifndef PCRE_EXP_DECL
# ifdef _WIN32
# ifndef PCRE_STATIC
@@ -58,6 +59,7 @@ don't change an existing definition of P
# endif
# endif
#endif
+*/
/* By default, we use the standard "extern" declarations. */
..and pcreposix.h:
--- pcre-7.2/pcreposix.h 2007-04-04 09:04:40.000000000 -0500
+++ libpcre/pcreposix.h 2007-08-15 20:31:42.000000000 -0500
@@ -109,12 +109,14 @@ typedef struct {
imported have to be identified as such. When building PCRE, the appropriate
export settings are needed. */
+/*
#ifdef _WIN32
# ifndef PCREPOSIX_STATIC
# define PCREPOSIX_EXP_DECL extern __declspec(dllimport)
# define PCREPOSIX_EXP_DEFN __declspec(dllimport)
# endif
#endif
+*/
/* By default, we use the standard "extern" declarations. */
o Added pcre_winconfig.h, and include it in pcre_internal.h instead of config.h:
--- pcre-7.2/pcre_internal.h 2007-06-12 08:39:55.000000000 -0500
+++ libpcre/pcre_internal.h 2007-08-15 20:33:48.000000000 -0500
@@ -69,7 +69,11 @@ be absolutely sure we get our version. *
/* Get the definitions provided by running "configure" */
+#ifdef WIN32
+#include "pcre_winconfig.h"
+#else
#include "config.h"
+#endif
/* Standard C headers plus the external interface definition. The only time
setjmp and stdarg are used is when NO_RECURSE is set. */
o Change the pcre.h #include in pcre_internal.h from <pcre.h> to "pcre.h".
This seems to be needed on Windows.
o Regenerated everything with 'automake; aclocal; autoconf'