Move privileges.c and unicode-utils.c from epan to wsutil (so things like
authorJeff Morriss <jeff.morriss@ulticom.com>
Mon, 30 Jun 2008 17:16:29 +0000 (17:16 -0000)
committerJeff Morriss <jeff.morriss@ulticom.com>
Mon, 30 Jun 2008 17:16:29 +0000 (17:16 -0000)
capinfos and dumpcap don't need to depend on libwireshark nor directly pull
in those modules).  Because capinfos and editcap were only being linked with
privileges.c if we had plugins, this allows those programs to be linked when
someone is compiling --without-plugins.

svn path=/trunk/; revision=25640

26 files changed:
Makefile.am
Makefile.common
Makefile.nmake
capinfos.c
capture_sync.c
dftest.c
dumpcap.c
editcap.c
epan/Makefile.common
epan/filesystem.c
epan/guid-utils.c
epan/plugins.c
epan/wslua/init_wslua.c
gtk/file_dlg_win32.c
gtk/font_utils.c
gtk/help_dlg.c
gtk/main.c
gtk/webbrowser.c
rawshark.c
tshark.c
version_info.c
wsutil/Makefile.common
wsutil/privileges.c [moved from epan/privileges.c with 99% similarity]
wsutil/privileges.h [moved from epan/privileges.h with 100% similarity]
wsutil/unicode-utils.c [moved from epan/unicode-utils.c with 100% similarity]
wsutil/unicode-utils.h [moved from epan/unicode-utils.h with 100% similarity]

index d41106bc3e66db47ad71a2413b7b867997c7d44f..1c028ee39860a8dd0e724b45c3fadcd72025345a 100644 (file)
@@ -268,7 +268,6 @@ plugin_ldadd = \
 WTAP_PLUGIN_SOURCES = \
        epan/plugins.c \
        epan/report_err.c \
-       epan/privileges.c \
        epan/filesystem.c
 
 else           # HAVE_PLUGINS
index b51e048d467dff2a6a72f6ba0600406b2de8365e..58b4cb1b3cae3651bf4b0e4ee1e3064954cd204a 100644 (file)
@@ -236,18 +236,14 @@ dumpcap_SOURCES = \
        ringbuffer.c    \
        sync_pipe_write.c       \
        tempfile.c      \
-       version_info.c  \
-       epan/unicode-utils.c    \
-       epan/privileges.c
+       version_info.c
 
 # corresponding headers
 dumpcap_INCLUDES = \
        capture_stop_conditions.h       \
        conditions.h    \
        pcapio.h        \
-       ringbuffer.h    \
-       epan/unicode-utils.h    \
-       epan/privileges.h
+       ringbuffer.h
 
 # this target needed for distribution only
 noinst_HEADERS =       \
index 436eaccda0b56180feaf43414702e0f7704e336d..a224626bf6d9805270ac1fbd47f83908ee6dbabc 100644 (file)
@@ -29,7 +29,6 @@ PLATFORM_SRC = capture-wpcap.c capture_wpcap_packet.c
 WTAP_PLUGIN_SOURCES = \
        epan/plugins.c \
        epan/report_err.c \
-       epan/privileges.c \
        epan/filesystem.c
 
 include Makefile.common
@@ -207,7 +206,7 @@ $(RESOURCES): image
 
 wiretap\wiretap-$(WTAP_VERSION).lib: image $(ZLIB_DLL) wiretap
 
-wireshark.exe  : $(LIBS_CHECK) config.h svnversion.h $(wireshark_OBJECTS) getopt.obj inet_ntop.obj inet_pton.obj codecs epan gtk image\wireshark.res wiretap\wiretap-$(WTAP_VERSION).lib codecs\codecs.lib gtk\libui.lib plugins
+wireshark.exe  : $(LIBS_CHECK) config.h svnversion.h $(wireshark_OBJECTS) getopt.obj inet_ntop.obj inet_pton.obj codecs epan gtk image\wireshark.res wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib codecs\codecs.lib gtk\libui.lib plugins
        @echo Linking $@
        $(LINK) @<<
                /OUT:wireshark.exe $(guiflags) $(guilibsdll) $(LDFLAGS) /LARGEADDRESSAWARE /SUBSYSTEM:windows $(wireshark_LIBS) getopt.obj inet_ntop.obj inet_pton.obj $(GTK_LIBS) codecs\codecs.lib gtk\libui.lib $(wireshark_OBJECTS) image\wireshark.res
@@ -216,7 +215,7 @@ wireshark.exe       : $(LIBS_CHECK) config.h svnversion.h $(wireshark_OBJECTS) getopt.
        mt.exe -nologo -manifest "wireshark.exe.manifest" -outputresource:wireshark.exe;1
 !ENDIF
 
-tshark.exe     : $(LIBS_CHECK) config.h svnversion.h $(tshark_OBJECTS) getopt.obj inet_ntop.obj epan image\tshark.res wiretap\wiretap-$(WTAP_VERSION).lib plugins
+tshark.exe     : $(LIBS_CHECK) config.h svnversion.h $(tshark_OBJECTS) getopt.obj inet_ntop.obj epan image\tshark.res wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib plugins
        @echo Linking $@
        $(LINK) @<<
                /OUT:tshark.exe $(conflags) $(conlibsdll) $(LDFLAGS) /LARGEADDRESSAWARE /SUBSYSTEM:console $(tshark_LIBS) $(tshark_OBJECTS) getopt.obj inet_ntop.obj image\tshark.res
@@ -225,7 +224,7 @@ tshark.exe  : $(LIBS_CHECK) config.h svnversion.h $(tshark_OBJECTS) getopt.obj in
        mt.exe -nologo -manifest "tshark.exe.manifest" -outputresource:tshark.exe;1
 !ENDIF
 
-rawshark.exe   : $(LIBS_CHECK) config.h svnversion.h $(rawshark_OBJECTS) getopt.obj inet_ntop.obj epan image\rawshark.res wiretap\wiretap-$(WTAP_VERSION).lib plugins
+rawshark.exe   : $(LIBS_CHECK) config.h svnversion.h $(rawshark_OBJECTS) getopt.obj inet_ntop.obj epan image\rawshark.res wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib plugins
        @echo Linking $@
        $(LINK) @<<
                /OUT:rawshark.exe $(conflags) $(conlibsdll) $(LDFLAGS) /LARGEADDRESSAWARE /SUBSYSTEM:console $(rawshark_LIBS) $(rawshark_OBJECTS) getopt.obj inet_ntop.obj image\rawshark.res
@@ -233,10 +232,10 @@ rawshark.exe      : $(LIBS_CHECK) config.h svnversion.h $(rawshark_OBJECTS) getopt.ob
 
 # XXX: This makefile does not properly handle doing a 'nmake ... capinfos.exe' directly since some of the .objs
 #      (e.g. epan\plugins.obj) must be built first using epan\Makefile.nmake (which happens for 'nmake ... all').
-capinfos.exe   : $(LIBS_CHECK) config.h $(capinfos_OBJECTS) getopt.obj epan/unicode-utils.obj wiretap\wiretap-$(WTAP_VERSION).lib image\capinfos.res
+capinfos.exe   : $(LIBS_CHECK) config.h $(capinfos_OBJECTS) getopt.obj wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\capinfos.res
        @echo Linking $@
        $(LINK) @<<
-               /OUT:capinfos.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(capinfos_OBJECTS) getopt.obj epan/unicode-utils.obj $(capinfos_LIBS) image\capinfos.res
+               /OUT:capinfos.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(capinfos_OBJECTS) getopt.obj $(capinfos_LIBS) image\capinfos.res
 <<
 !IF "$(MSVC_VARIANT)" == "MSVC2005" || "$(MSVC_VARIANT)" == "MSVC2005EE" || "$(MSVC_VARIANT)" == "DOTNET20"
        mt.exe -nologo -manifest "capinfos.exe.manifest" -outputresource:capinfos.exe;1
@@ -244,16 +243,16 @@ capinfos.exe      : $(LIBS_CHECK) config.h $(capinfos_OBJECTS) getopt.obj epan/unicod
 
 # XXX: This makefile does not properly handle doing a 'nmake ... editcap.exe' directly since some of the .objs
 #      (e.g. epan\plugins.obj) must be built first using epan\Makefile.nmake (which happens for 'nmake ... all').
-editcap.exe    : $(LIBS_CHECK) config.h $(editcap_OBJECTS) getopt.obj strptime.obj epan/unicode-utils.obj wiretap\wiretap-$(WTAP_VERSION).lib image\editcap.res
+editcap.exe    : $(LIBS_CHECK) config.h $(editcap_OBJECTS) getopt.obj strptime.obj wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\editcap.res
        @echo Linking $@
        $(LINK) @<<
-               /OUT:editcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(editcap_OBJECTS) getopt.obj strptime.obj epan/unicode-utils.obj $(editcap_LIBS) image\editcap.res
+               /OUT:editcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(editcap_OBJECTS) getopt.obj strptime.obj $(editcap_LIBS) image\editcap.res
 <<
 !IF "$(MSVC_VARIANT)" == "MSVC2005" || "$(MSVC_VARIANT)" == "MSVC2005EE" || "$(MSVC_VARIANT)" == "DOTNET20"
        mt.exe -nologo -manifest "editcap.exe.manifest" -outputresource:editcap.exe;1
 !ENDIF
 
-mergecap.exe   : $(LIBS_CHECK)  config.h svnversion.h mergecap.obj merge.obj getopt.obj wiretap\wiretap-$(WTAP_VERSION).lib image\mergecap.res
+mergecap.exe   : $(LIBS_CHECK)  config.h svnversion.h mergecap.obj merge.obj getopt.obj wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\mergecap.res
        @echo Linking $@
        $(LINK) @<<
                /OUT:mergecap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console mergecap.obj merge.obj getopt.obj $(mergecap_LIBS) image\mergecap.res
@@ -262,7 +261,7 @@ mergecap.exe        : $(LIBS_CHECK)  config.h svnversion.h mergecap.obj merge.obj getop
        mt.exe -nologo -manifest "mergecap.exe.manifest" -outputresource:mergecap.exe;1
 !ENDIF
 
-text2pcap.exe  : $(LIBS_CHECK) config.h text2pcap.obj text2pcap-scanner.obj getopt.obj wiretap\wiretap-$(WTAP_VERSION).lib strptime.obj image\text2pcap.res
+text2pcap.exe  : $(LIBS_CHECK) config.h text2pcap.obj text2pcap-scanner.obj getopt.obj wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib strptime.obj image\text2pcap.res
        @echo Linking $@
        $(LINK) @<<
                /OUT:text2pcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console text2pcap.obj text2pcap-scanner.obj getopt.obj $(text2pcap_LIBS) strptime.obj image\text2pcap.res
@@ -289,7 +288,7 @@ randpkt.exe : $(randpkt_OBJECTS) getopt.obj
        mt.exe -nologo -manifest "randpkt.exe.manifest" -outputresource:randpkt.exe;1
 !ENDIF
 
-dumpcap.exe    : $(LIBS_CHECK) config.h svnversion.h $(dumpcap_OBJECTS) getopt.obj epan/unicode-utils.obj inet_ntop.obj mkstemp.obj wiretap\wiretap-$(WTAP_VERSION).lib image\dumpcap.res
+dumpcap.exe    : $(LIBS_CHECK) config.h svnversion.h $(dumpcap_OBJECTS) getopt.obj inet_ntop.obj mkstemp.obj wsutil\libwsutil.lib wiretap\wiretap-$(WTAP_VERSION).lib image\dumpcap.res
        @echo Linking $@
        $(LINK) @<<
                /OUT:dumpcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(dumpcap_LIBS) $(dumpcap_OBJECTS) getopt.obj inet_ntop.obj mkstemp.obj image\dumpcap.res
index d260d132c3ed6e696568dc940ebe1cf53a960a39..e7d3afeaa04a5b4ee7abcb25934f5b0a15eabfda 100644 (file)
@@ -49,7 +49,7 @@
 #include <epan/plugins.h>
 #include <epan/report_err.h>
 #include "wtap.h"
-#include <epan/privileges.h>
+#include <wsutil/privileges.h>
 
 #ifdef NEED_GETOPT_H
 #include "getopt.h"
index f8c836dfc27b39095a1e0d3e5de5e54c29ade761..489c4f776287fa366bb812e14354d91c62bbff83 100644 (file)
@@ -44,7 +44,7 @@
 #include <signal.h>
 
 #ifdef _WIN32
-#include "epan/unicode-utils.h"
+#include <wsutil/unicode-utils.h>
 #endif
 
 #ifdef HAVE_SYS_WAIT_H
index 8dd5bce8d2147df420c37602fba41a487879995e..7317f3b561657fea25d37485abce2fe4ef7ff569 100644 (file)
--- a/dftest.c
+++ b/dftest.c
@@ -43,7 +43,7 @@
 #include <epan/timestamp.h>
 #include <epan/plugins.h>
 #include <epan/filesystem.h>
-#include <epan/privileges.h>
+#include <wsutil/privileges.h>
 #include <epan/prefs.h>
 #include "util.h"
 #include "epan/dfilter/dfilter.h"
index 94fdc4ca9992ee37f5155a97815f2e70135c27ec..85d0140683c9b8d10bf3f77107b670b30da25394 100644 (file)
--- a/dumpcap.c
+++ b/dumpcap.c
 #endif
 
 #ifdef _WIN32
-#include "epan/unicode-utils.h"
+#include <wsutil/unicode-utils.h>
 #endif
 
-#include "epan/privileges.h"
+#include <wsutil/privileges.h>
 
 #include "sync_pipe.h"
 
index 57f1e0a4a37d0b9c4d63bc3204a0848ea5fe3fda..84ecd0a727f51b8f2d6cc4097891fd9657845b27 100644 (file)
--- a/editcap.c
+++ b/editcap.c
@@ -58,7 +58,7 @@
 #include "epan/plugins.h"
 #include "epan/report_err.h"
 #include "epan/filesystem.h"
-#include <epan/privileges.h>
+#include <wsutil/privileges.h>
 #include "epan/nstime.h"
 
 #include "svnversion.h"
index 067af5dc9667816e368bbec9583350429d0bbe5d..4924f0d8cf77565e18f06cfd8e1bce209090af5a 100644 (file)
@@ -69,7 +69,6 @@ LIBWIRESHARK_SRC =            \
        packet.c                \
        plugins.c               \
        prefs.c                 \
-       privileges.c            \
        proto.c                 \
        range.c                 \
        reassemble.c            \
@@ -93,7 +92,6 @@ LIBWIRESHARK_SRC =            \
        tvbparse.c              \
        tvbuff.c                \
        uat.c                   \
-       unicode-utils.c         \
        value_string.c          \
        xdlc.c                  \
        xmlstub.c
@@ -201,7 +199,6 @@ LIBWIRESHARK_INCLUDES =     \
        ppptypes.h              \
        prefs.h                 \
        prefs-int.h             \
-       privileges.h            \
        proto.h                 \
        ptvcursor.h             \
        range.h                 \
index b9fcb2f3bc20836975fc3ffdc82c9c018c92527d..799a79e37b083087ee3f617d404a55c7f8d01879 100644 (file)
 #include <windows.h>
 #include <tchar.h>
 #include <shlobj.h>
-#include "epan/unicode-utils.h"
+#include <wsutil/unicode-utils.h>
 #else
 #include <pwd.h>
 #endif
 
 #include "filesystem.h"
-#include "privileges.h"
+#include <wsutil/privileges.h>
 #include <wsutil/file_util.h>
 
 #define PROFILES_DIR    "profiles"
index cbe73a2896e423404d0091e8eafa573df8d6eab0..ce1dc2291ad0aaa8c8bc6ea2f8cd9af10ae4f3e3 100644 (file)
@@ -31,7 +31,7 @@
 
 #include <glib.h>
 #include <epan/epan.h>
-#include <epan/unicode-utils.h>
+#include <wsutil/unicode-utils.h>
 #include <epan/emem.h>
 #include "guid-utils.h"
 
index cc84b475ec8d894caef3850409c6a55c882094a2..ed8aaa3f8c2c199fb18a6e90304b6ab8e3175786 100644 (file)
@@ -49,7 +49,7 @@
 #endif
 
 #include "filesystem.h"
-#include "privileges.h"
+#include <wsutil/privileges.h>
 #include <wsutil/file_util.h>
 #include "report_err.h"
 
index 0745cea101484ac5a719faebc871e7833d46720b..1c975f91ef49f75aa44d72afe20054ccbdb1e44c 100644 (file)
@@ -31,7 +31,7 @@
 #include <math.h>
 #include <epan/expert.h>
 #include <epan/ex-opt.h>
-#include <epan/privileges.h>
+#include <wsutil/privileges.h>
 #include <wsutil/file_util.h>
 
 static lua_State* L = NULL;
index 51a0b8f60ccb24d4c67f28e5a3998d3a3e942219..bb5a35605f837b4f0306872532441a0af83bf23a 100644 (file)
@@ -39,7 +39,7 @@
 #include "epan/filesystem.h"
 #include "epan/addr_resolv.h"
 #include "epan/prefs.h"
-#include "epan/unicode-utils.h"
+#include <wsutil/unicode-utils.h>
 
 #include "../globals.h"
 #include "../alert_box.h"
index 4130979e331aa95fd84765ea777eac5e30cce993..a6ccfcf57625a3565074d31f8e0d720e2403ea6b 100644 (file)
@@ -37,7 +37,7 @@
 #ifdef _WIN32
 #include <windows.h>
 #include <tchar.h>
-#include <epan/unicode-utils.h>
+#include <wsutil/unicode-utils.h>
 #endif
 
 #include "../simple_dialog.h"
index eefdc68f34c00bec5b8e0f331ab9dbe81acb6c6a..52b77f05caa29881068537c67f7480efe581b82b 100644 (file)
@@ -47,7 +47,7 @@
 #ifdef HHC_DIR
 #include <windows.h>
 #include <htmlhelp.h>
-#include "epan/unicode-utils.h"
+#include <wsutil/unicode-utils.h>
 #endif
 
 
index 3693d4239a4c4bca62de25f2e8b0832bc68a6c03..73163a8dde5518d0b9d8b6ed5fba17bac14c5d0a 100644 (file)
@@ -59,7 +59,7 @@
 
 #include <epan/epan.h>
 #include <epan/filesystem.h>
-#include <epan/privileges.h>
+#include <wsutil/privileges.h>
 #include <epan/epan_dissect.h>
 #include <epan/timestamp.h>
 #include <epan/packet.h>
index b22e781be2cbb701628372fb9935c0786867d730..88e4ea62abf08f562e3922e5b1ededa2e461fc82 100644 (file)
@@ -82,7 +82,7 @@
 #include <windows.h>
 /* We're using Unicode */
 #include <tchar.h>
-#include <epan/unicode-utils.h>
+#include <wsutil/unicode-utils.h>
 /* if WIN32_LEAN_AND_MEAN is defined, shellapi.h is needed too */
 #include <shellapi.h>
 #elif defined (HAVE_OS_X_FRAMEWORKS)
index 358e4ed9937592370ac6c2dcb1309a56bf430098..6b24301e16b050d6c6fd69ebc60c9f9d3db5be09 100644 (file)
@@ -72,7 +72,7 @@
 #include <glib.h>
 #include <epan/epan.h>
 #include <epan/filesystem.h>
-#include <epan/privileges.h>
+#include <wsutil/privileges.h>
 #include <wsutil/file_util.h>
 
 #include "globals.h"
@@ -96,7 +96,7 @@
 #include <epan/epan_dissect.h>
 #include <epan/stat_cmd_args.h>
 #include <epan/timestamp.h>
-#include <epan/unicode-utils.h>
+#include <wsutil/unicode-utils.h>
 #include "epan/column-utils.h"
 #include "epan/proto.h"
 #include <epan/tap.h>
index a6c8a964db27646a5060e02c5bfae3bda607fee4..f385fac2306dfa5e637240e326564b55fd534bdb 100644 (file)
--- a/tshark.c
+++ b/tshark.c
@@ -62,7 +62,7 @@
 #include <glib.h>
 #include <epan/epan.h>
 #include <epan/filesystem.h>
-#include <epan/privileges.h>
+#include <wsutil/privileges.h>
 
 #include "globals.h"
 #include <epan/timestamp.h>
index 97825c3da6ab8ec294fe92aa3108af5c5bfcd607..2a20c69b366053805223b4b667edf0f89f8ce8c5 100644 (file)
@@ -59,7 +59,7 @@
 
 #include "version_info.h"
 #include "capture-pcap-util.h"
-#include "epan/unicode-utils.h"
+#include <wsutil/unicode-utils.h>
 
 #include "svnversion.h"
 
index 6684c8faad1374ddbcd84acb0fe86f78a251d596..df0c87d6e0794ddb8c21bf7c0485eb95c1f46e5f 100644 (file)
 # into a list of object files by replacing ".c" with ".obj") or files
 # generated from YACC or Lex files (as Automake doesn't want them in
 # _SOURCES variables).
-LIBWSUTIL_SRC = \
-       mpeg-audio.c
+LIBWSUTIL_SRC =        \
+       mpeg-audio.c    \
+       privileges.c    \
+       unicode-utils.c
 
 # Header files that are not generated from other files
-LIBWSUTIL_INCLUDES = \
-       mpeg-audio.h
+LIBWSUTIL_INCLUDES =   \
+       mpeg-audio.h    \
+       privileges.h    \
+       unicode-utils.h
similarity index 99%
rename from epan/privileges.c
rename to wsutil/privileges.c
index a62001343b36020a4bd0b68608a2138f8f487f19..19adbd3d70c0e9ab655466c9bf90162489bc077e 100644 (file)
@@ -35,7 +35,6 @@
 #include "privileges.h"
 
 #ifdef _WIN32
-#include "emem.h"
 #include <windows.h>
 #include <wchar.h>
 #include <tchar.h>
@@ -147,7 +146,6 @@ npf_sys_is_running() {
 #include <glib.h>
 #include <string.h>
 #include <errno.h>
-#include "emem.h"
 
 static uid_t ruid, euid;
 static gid_t rgid, egid;
similarity index 100%
rename from epan/privileges.h
rename to wsutil/privileges.h
similarity index 100%
rename from epan/unicode-utils.c
rename to wsutil/unicode-utils.c
similarity index 100%
rename from epan/unicode-utils.h
rename to wsutil/unicode-utils.h