forked from nmap/nmap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
NMAP_MODIFICATIONS
276 lines (230 loc) · 8.58 KB
/
NMAP_MODIFICATIONS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
This directory contains a version of LibPCRE 7.6 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:
cmake
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
CleanTxt
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 pcrecpp_internal.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 Removed config.sub, config.guess, depcomp, install-sh, and missing.
These files are found in the parent (i.e., Nmap's) directory.
o Comment out some build configuration lines from pcre_internal.h because Nmap
builds a static library:
--- pcre-7.6/pcre_internal.h 2008-01-20 13:59:21.000000000 -0600
+++ libpcre/pcre_internal.h 2008-02-15 18:12:28.000000000 -0600
@@ -108,15 +108,19 @@ PCRE_EXP_DATA_DEFN only if they are not
#ifndef PCRE_EXP_DECL
# ifdef _WIN32
+/* COMMENTED OUT AS IT'S COMPILED STATICALLY
# ifndef PCRE_STATIC
# 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
# define PCRE_EXP_DECL extern "C"
...and pcre.h.in/pcre.h.generic/pcre.h:
--- pcre-7.6/pcre.h.in 2008-01-20 14:01:08.000000000 -0600
+++ libpcre/pcre.h.in 2008-02-15 18:12:54.000000000 -0600
@@ -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 existing definitions of PCRE_EXP_DECL and PCRECPP_EXP_DECL. */
+/*
#if defined(_WIN32) && !defined(PCRE_STATIC)
# ifndef PCRE_EXP_DECL
# define PCRE_EXP_DECL extern __declspec(dllimport)
@@ -64,6 +65,7 @@ don't change existing definitions of PCR
# endif
# endif
#endif
+*/
/* By default, we use the standard "extern" declarations. */
..and pcreposix.h:
--- pcre-7.6/pcreposix.h 2008-01-20 13:56:29.000000000 -0600
+++ libpcre/pcreposix.h 2008-02-15 18:13:29.000000000 -0600
@@ -110,10 +110,12 @@ imported have to be identified as such.
export settings are needed, and are set in pcreposix.c before including this
file. */
+/*
#if defined(_WIN32) && !defined(PCRE_STATIC) && !defined(PCREPOSIX_EXP_DECL)
# define PCREPOSIX_EXP_DECL extern __declspec(dllimport)
# define PCREPOSIX_EXP_DEFN __declspec(dllimport)
#endif
+*/
/* By default, we use the standard "extern" declarations. */
o Added pcre_winconfig.h for Windows. LibPCRE used to include config.h in
pcre_internal.h, and we'd include this winconfig there instead of config.h
if WIN32 is defined. Now, however, they've moved config.h includes to a
bunch of different files, so we have to change them. We could remove the
other includes and move it back to pcre_internal.h, but they must've moved
them for a reason, so we'll follow them. Occurrences of
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
get changed to
#ifdef WIN32
#include "pcre_winconfig.h"
#else
#include "config.h"
#endif
o Removed this pcre_chartables deletion code from configure.ac:
--- configure.ac (revision 13598)
+++ configure.ac (working copy)
@@ -491,10 +491,6 @@
# Make the generated script files executable.
AC_CONFIG_COMMANDS([script-chmod], [chmod a+x pcre-config])
-# Make sure that pcre_chartables.c is removed in case the method for
-# creating it was changed by reconfiguration.
-AC_CONFIG_COMMANDS([delete-old-chartables], [rm -f pcre_chartables.c])
-
AC_OUTPUT
dnl end configure.ac
o Removed Makefile.am since it doesn't even seem to regenerate without a bunch of files which were previously deleted (e.g. NEWS, etc.)
o Removed the code from Makefile.in which regenerates Makefile.am when it's out of date:
--- Makefile.in (revision 13598)
+++ Makefile.in (working copy)
@@ -265,21 +265,7 @@
.SUFFIXES:
.SUFFIXES: .c .o .obj
-am--refresh:
- @:
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
- cd $(srcdir) && $(AUTOMAKE) --gnu \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu Makefile
+
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -751,7 +737,7 @@
.MAKE: install-am install-strip
-.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
+.PHONY: CTAGS GTAGS all all-am check check-am clean \
clean-binPROGRAMS clean-generic clean-libLIBRARIES \
clean-noinstPROGRAMS ctags dist dist-all dist-bzip2 dist-gzip \
dist-shar dist-tarZ dist-zip distcheck distclean \
o Regenerated everything with 'aclocal; autoconf'
o Prevent pcre.h from being regenerated everytime configure is invoked and
subsequently removed upon a distclean:
Index: configure.ac
===================================================================
--- configure.ac (revision 25730)
+++ configure.ac (working copy)
@@ -13,7 +13,7 @@
AC_PREREQ(2.57)
AC_INIT(PCRE, pcre_major.pcre_minor[]pcre_prerelease, , pcre)
-AC_CONFIG_SRCDIR([pcre.h.in])
+AC_CONFIG_SRCDIR()
AM_INIT_AUTOMAKE([dist-bzip2 dist-zip])
AC_CONFIG_HEADERS(config.h)
@@ -485,7 +485,6 @@
AC_CONFIG_FILES(
Makefile
pcre-config
- pcre.h
)
# Make the generated script files executable.
Index: Makefile.in
===================================================================
--- Makefile.in (revision 25730)
+++ Makefile.in (working copy)
@@ -44,7 +44,6 @@
$(srcdir)/../depcomp $(srcdir)/../install-sh \
$(srcdir)/../missing $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
- $(srcdir)/pcre-config.in $(srcdir)/pcre.h.in \
$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
@@ -54,7 +53,7 @@
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES = pcre-config pcre.h
+CONFIG_CLEAN_FILES = pcre-config
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -228,9 +227,6 @@
CLEANFILES =
MAINTAINERCLEANFILES = pcre.h.generic
-# These are the header files we'll install. We do not distribute pcre.h because
-# it is generated from pcre.h.in.
-nodist_include_HEADERS = pcre.h
include_HEADERS = pcreposix.h
bin_SCRIPTS = pcre-config
@WITH_REBUILD_CHARTABLES_TRUE@dftables_SOURCES = dftables.c
@@ -303,8 +299,6 @@
-rm -f config.h stamp-h1
pcre-config: $(top_builddir)/config.status $(srcdir)/pcre-config.in
cd $(top_builddir) && $(SHELL) ./config.status $@
-pcre.h: $(top_builddir)/config.status $(srcdir)/pcre.h.in
- cd $(top_builddir) && $(SHELL) ./config.status $@
install-libLIBRARIES: $(lib_LIBRARIES)
@$(NORMAL_INSTALL)
test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
@@ -760,7 +754,6 @@
pcre.h.generic: configure.ac
rm -f $@
- cp -p pcre.h $@
@WITH_REBUILD_CHARTABLES_TRUE@pcre_chartables.c: dftables$(EXEEXT)
@WITH_REBUILD_CHARTABLES_TRUE@ ./dftables$(EXEEXT) $@