diff options
author | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2018-01-28 17:40:52 +0000 |
---|---|---|
committer | João Valverde <j@v6e.pt> | 2018-01-29 10:55:02 +0000 |
commit | 38c0ffe4c6683a4ed8493f42dbe8658098a921aa (patch) | |
tree | 3082e67591c8684ba4b653f32435881e437bac61 | |
parent | 6d29434c3ff737de9f66f66213827b7eddb56ce6 (diff) |
Avoid #ifdef'ing out translation units
Change-Id: Ibef0120184ae577f11059fcaf0eaa24a32820273
Reviewed-on: https://code.wireshark.org/review/25502
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
-rw-r--r-- | wiretap/wtap.c | 4 | ||||
-rw-r--r-- | wsutil/CMakeLists.txt | 9 | ||||
-rw-r--r-- | wsutil/Makefile.am | 5 | ||||
-rw-r--r-- | wsutil/plugins.c | 4 |
4 files changed, 13 insertions, 9 deletions
diff --git a/wiretap/wtap.c b/wiretap/wtap.c index 3b7021f080..422c8c56e7 100644 --- a/wiretap/wtap.c +++ b/wiretap/wtap.c @@ -1423,12 +1423,12 @@ wtap_init(gboolean load_wiretap_plugins) init_open_routines(); wtap_opttypes_initialize(); wtap_init_encap_types(); -#ifdef HAVE_PLUGINS if (load_wiretap_plugins) { +#ifdef HAVE_PLUGINS libwiretap_plugins = plugins_init(WS_PLUGIN_WIRETAP); g_slist_foreach(wtap_plugins, call_plugin_register_wtap_module, NULL); - } #endif + } } /* diff --git a/wsutil/CMakeLists.txt b/wsutil/CMakeLists.txt index 5f27e74780..407d27a2dd 100644 --- a/wsutil/CMakeLists.txt +++ b/wsutil/CMakeLists.txt @@ -115,7 +115,6 @@ set(WSUTIL_COMMON_FILES nstime.c cpu_info.c os_version_info.c - plugins.c privileges.c rsa.c sober128.c @@ -134,13 +133,19 @@ set(WSUTIL_COMMON_FILES xtea.c ) +if(ENABLE_PLUGINS) + list(APPEND WSUTIL_COMMON_FILES + plugins.c + ) +endif() + set(WSUTIL_FILES ${WSUTIL_COMMON_FILES}) if(WIN32) list(APPEND WSUTIL_FILES file_util.c win32-utils.c ) -ENDIF(WIN32) +endif(WIN32) if(HAVE_MACOS_FRAMEWORKS) diff --git a/wsutil/Makefile.am b/wsutil/Makefile.am index 9affa31736..008a50110d 100644 --- a/wsutil/Makefile.am +++ b/wsutil/Makefile.am @@ -152,7 +152,6 @@ libwsutil_la_SOURCES = \ mpeg-audio.c \ nstime.c \ os_version_info.c \ - plugins.c \ privileges.c \ report_message.c \ rsa.c \ @@ -170,6 +169,10 @@ libwsutil_la_SOURCES = \ wsjsmn.c \ xtea.c +if HAVE_PLUGINS +libwsutil_la_SOURCES += plugins.c +endif + # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html libwsutil_la_LDFLAGS = -version-info 0:0:0 @LDFLAGS_SHAREDLIB@ diff --git a/wsutil/plugins.c b/wsutil/plugins.c index d6ddccb7b7..517065c2d7 100644 --- a/wsutil/plugins.c +++ b/wsutil/plugins.c @@ -10,8 +10,6 @@ #include "config.h" -#ifdef HAVE_PLUGINS - #include <time.h> #include <stdlib.h> @@ -345,8 +343,6 @@ plugins_cleanup(plugins_t *plugins) g_hash_table_destroy((GHashTable *)plugins); } -#endif /* HAVE_PLUGINS */ - /* * Editor modelines * |