forked from osmocom/wireshark
Move ui/version_info.[ch] to wsutil
parent
3e07c0dc01
commit
84f963dfa2
|
@ -2592,7 +2592,6 @@ if(BUILD_wireshark AND QT_FOUND)
|
|||
iface_monitor
|
||||
wiretap
|
||||
epan
|
||||
version_info
|
||||
summary
|
||||
${QT_LIBRARIES}
|
||||
${APPLE_APPLICATION_SERVICES_LIBRARY}
|
||||
|
@ -2605,6 +2604,7 @@ if(BUILD_wireshark AND QT_FOUND)
|
|||
${WINSPARKLE_LIBRARIES}
|
||||
$<$<BOOL:${WIN32}>:UxTheme.lib>
|
||||
${SPEEXDSP_LIBRARIES}
|
||||
${ZLIB_LIBRARIES}
|
||||
${MINIZIP_LIBRARIES}
|
||||
)
|
||||
|
||||
|
@ -2699,7 +2699,6 @@ if(BUILD_logray AND QT_FOUND)
|
|||
iface_monitor
|
||||
wiretap
|
||||
epan
|
||||
version_info
|
||||
summary
|
||||
${QT_LIBRARIES}
|
||||
${APPLE_APPLICATION_SERVICES_LIBRARY}
|
||||
|
@ -2860,7 +2859,6 @@ if(BUILD_tshark)
|
|||
wiretap
|
||||
epan
|
||||
wsutil
|
||||
version_info
|
||||
${APPLE_CORE_FOUNDATION_LIBRARY}
|
||||
${APPLE_SYSTEM_CONFIGURATION_LIBRARY}
|
||||
${WIN_WS2_32_LIBRARY}
|
||||
|
@ -2890,7 +2888,6 @@ if(BUILD_tfshark)
|
|||
ui
|
||||
wiretap
|
||||
epan
|
||||
version_info
|
||||
${APPLE_CORE_FOUNDATION_LIBRARY}
|
||||
${APPLE_SYSTEM_CONFIGURATION_LIBRARY}
|
||||
)
|
||||
|
@ -2913,7 +2910,6 @@ if(BUILD_rawshark AND PCAP_FOUND)
|
|||
ui
|
||||
wiretap
|
||||
epan
|
||||
version_info
|
||||
${APPLE_CORE_FOUNDATION_LIBRARY}
|
||||
${APPLE_SYSTEM_CONFIGURATION_LIBRARY}
|
||||
${WIN_WS2_32_LIBRARY}
|
||||
|
@ -2936,7 +2932,6 @@ if(BUILD_sharkd)
|
|||
ui
|
||||
wiretap
|
||||
epan
|
||||
version_info
|
||||
${APPLE_CORE_FOUNDATION_LIBRARY}
|
||||
${APPLE_SYSTEM_CONFIGURATION_LIBRARY}
|
||||
${WIN_WS2_32_LIBRARY}
|
||||
|
@ -2966,7 +2961,6 @@ if(BUILD_dftest)
|
|||
ui
|
||||
wiretap
|
||||
epan
|
||||
version_info
|
||||
)
|
||||
set(dftest_FILES
|
||||
dftest.c
|
||||
|
@ -3007,7 +3001,6 @@ if(BUILD_text2pcap)
|
|||
wsutil
|
||||
ui
|
||||
epan
|
||||
version_info
|
||||
${ZLIB_LIBRARIES}
|
||||
)
|
||||
set(text2pcap_FILES
|
||||
|
@ -3027,7 +3020,6 @@ if(BUILD_mergecap)
|
|||
set(mergecap_LIBS
|
||||
ui
|
||||
wiretap
|
||||
version_info
|
||||
${ZLIB_LIBRARIES}
|
||||
${CMAKE_DL_LIBS}
|
||||
)
|
||||
|
@ -3047,7 +3039,6 @@ if(BUILD_reordercap)
|
|||
set(reordercap_LIBS
|
||||
ui
|
||||
wiretap
|
||||
version_info
|
||||
${ZLIB_LIBRARIES}
|
||||
${CMAKE_DL_LIBS}
|
||||
)
|
||||
|
@ -3068,7 +3059,6 @@ if(BUILD_capinfos)
|
|||
ui
|
||||
wiretap
|
||||
wsutil
|
||||
version_info
|
||||
${ZLIB_LIBRARIES}
|
||||
${GCRYPT_LIBRARIES}
|
||||
${CMAKE_DL_LIBS}
|
||||
|
@ -3091,7 +3081,6 @@ if(BUILD_captype)
|
|||
ui
|
||||
wiretap
|
||||
wsutil
|
||||
version_info
|
||||
${ZLIB_LIBRARIES}
|
||||
${CMAKE_DL_LIBS}
|
||||
)
|
||||
|
@ -3111,7 +3100,6 @@ if(BUILD_editcap)
|
|||
set(editcap_LIBS
|
||||
ui
|
||||
wiretap
|
||||
version_info
|
||||
${ZLIB_LIBRARIES}
|
||||
${GCRYPT_LIBRARIES}
|
||||
${CMAKE_DL_LIBS}
|
||||
|
@ -3136,7 +3124,6 @@ if(BUILD_dumpcap AND PCAP_FOUND)
|
|||
caputils
|
||||
iface_monitor
|
||||
ui
|
||||
version_info
|
||||
pcap::pcap
|
||||
${CAP_LIBRARIES}
|
||||
${ZLIB_LIBRARIES}
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
#include <wsutil/filesystem.h>
|
||||
#include <wsutil/privileges.h>
|
||||
#include <cli_main.h>
|
||||
#include <ui/version_info.h>
|
||||
#include <wsutil/version_info.h>
|
||||
#include <wiretap/wtap_opttypes.h>
|
||||
|
||||
#ifdef HAVE_PLUGINS
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include <wsutil/filesystem.h>
|
||||
#include <wsutil/privileges.h>
|
||||
#include <cli_main.h>
|
||||
#include <ui/version_info.h>
|
||||
#include <wsutil/version_info.h>
|
||||
|
||||
#ifdef HAVE_PLUGINS
|
||||
#include <wsutil/plugins.h>
|
||||
|
|
2
dftest.c
2
dftest.c
|
@ -40,7 +40,7 @@
|
|||
#include "ui/util.h"
|
||||
#include "ui/cmdarg_err.h"
|
||||
#include "ui/failure_message.h"
|
||||
#include "ui/version_info.h"
|
||||
#include "wsutil/version_info.h"
|
||||
|
||||
static int opt_verbose = 0;
|
||||
#define DFTEST_LOG_NONE 0
|
||||
|
|
|
@ -378,7 +378,7 @@ A description of `_MSC_VER` and `_MSC_FULL_VER`, and their relation to Visual St
|
|||
can be found at
|
||||
https://learn.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=msvc-170[Microsoft-specific predefined macros].
|
||||
|
||||
Information on the V{cpp} version can be found in the file _ui/version_info.c_.
|
||||
Information on the V{cpp} version can be found in the file _wsutil/version_info.c_.
|
||||
|
||||
After correct installation of the toolchain, typing
|
||||
at the Visual Studio Command line prompt (cmd.exe):
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include <ui/cmdarg_err.h>
|
||||
#include <wsutil/strtoi.h>
|
||||
#include <cli_main.h>
|
||||
#include <ui/version_info.h>
|
||||
#include <wsutil/version_info.h>
|
||||
|
||||
#include <wsutil/socket.h>
|
||||
#include <wsutil/wslog.h>
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
#include <wsutil/strnatcmp.h>
|
||||
#include <wsutil/str_util.h>
|
||||
#include <cli_main.h>
|
||||
#include <ui/version_info.h>
|
||||
#include <wsutil/version_info.h>
|
||||
#include <wsutil/pint.h>
|
||||
#include <wsutil/strtoi.h>
|
||||
#include <wsutil/ws_assert.h>
|
||||
|
|
|
@ -58,7 +58,6 @@
|
|||
#include <wsutil/curve25519.h>
|
||||
#include <wsutil/pint.h>
|
||||
#include <wsutil/wslog.h>
|
||||
#include <ui/version_info.h>
|
||||
#include <epan/secrets.h>
|
||||
#include <wiretap/secrets-types.h>
|
||||
|
||||
|
|
|
@ -32,8 +32,7 @@
|
|||
#include <wsutil/nstime.h>
|
||||
#include <wsutil/wslog.h>
|
||||
#include <wsutil/ws_assert.h>
|
||||
|
||||
#include <ui/version_info.h>
|
||||
#include <wsutil/version_info.h>
|
||||
|
||||
#include "conversation.h"
|
||||
#include "except.h"
|
||||
|
@ -777,6 +776,9 @@ epan_dissect_packet_contains_field(epan_dissect_t* edt,
|
|||
void
|
||||
epan_gather_compile_info(feature_list l)
|
||||
{
|
||||
gather_zlib_compile_info(l);
|
||||
gather_pcre2_compile_info(l);
|
||||
|
||||
/* Lua */
|
||||
#ifdef HAVE_LUA
|
||||
#ifdef HAVE_LUA_UNICODE
|
||||
|
@ -874,6 +876,9 @@ epan_gather_compile_info(feature_list l)
|
|||
void
|
||||
epan_gather_runtime_info(feature_list l)
|
||||
{
|
||||
gather_zlib_runtime_info(l);
|
||||
gather_pcre2_runtime_info(l);
|
||||
|
||||
/* c-ares */
|
||||
with_feature(l, "c-ares %s", ares_version(NULL));
|
||||
|
||||
|
|
3
extcap.c
3
extcap.c
|
@ -43,6 +43,7 @@
|
|||
#include <wsutil/tempfile.h>
|
||||
#include <wsutil/wslog.h>
|
||||
#include <wsutil/ws_assert.h>
|
||||
#include <wsutil/version_info.h>
|
||||
|
||||
#include "capture/capture_session.h"
|
||||
#include "capture_opts.h"
|
||||
|
@ -50,8 +51,6 @@
|
|||
#include "extcap.h"
|
||||
#include "extcap_parser.h"
|
||||
|
||||
#include "ui/version_info.h"
|
||||
|
||||
/* Number of seconds to wait for extcap process to exit after cleanup.
|
||||
* If extcap does not exit before the timeout, it is forcefully terminated.
|
||||
*/
|
||||
|
|
2
file.c
2
file.c
|
@ -24,7 +24,7 @@
|
|||
#include <wsutil/json_dumper.h>
|
||||
#include <wsutil/wslog.h>
|
||||
#include <wsutil/ws_assert.h>
|
||||
#include <ui/version_info.h>
|
||||
#include <wsutil/version_info.h>
|
||||
|
||||
#include <wiretap/merge.h>
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ set(fuzzshark_LIBS
|
|||
ui
|
||||
wiretap
|
||||
epan
|
||||
version_info
|
||||
wsutil
|
||||
)
|
||||
if(OSS_FUZZ)
|
||||
if("$ENV{LIB_FUZZING_ENGINE}" STREQUAL "")
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include <wsutil/privileges.h>
|
||||
#include <wsutil/report_message.h>
|
||||
#include <wsutil/wslog.h>
|
||||
#include <ui/version_info.h>
|
||||
#include <wsutil/version_info.h>
|
||||
|
||||
#include <wiretap/wtap.h>
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include <wsutil/wslog.h>
|
||||
|
||||
#include <cli_main.h>
|
||||
#include <ui/version_info.h>
|
||||
#include <wsutil/version_info.h>
|
||||
|
||||
#ifdef HAVE_PLUGINS
|
||||
#include <wsutil/plugins.h>
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
#include <wiretap/pcap-encap.h>
|
||||
|
||||
#include <cli_main.h>
|
||||
#include <ui/version_info.h>
|
||||
#include <wsutil/version_info.h>
|
||||
|
||||
#include "capture/capture-pcap-util.h"
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include <wsutil/file_util.h>
|
||||
#include <wsutil/privileges.h>
|
||||
#include <cli_main.h>
|
||||
#include <ui/version_info.h>
|
||||
#include <wsutil/version_info.h>
|
||||
#include <wiretap/wtap_opttypes.h>
|
||||
|
||||
#ifdef HAVE_PLUGINS
|
||||
|
|
2
sharkd.c
2
sharkd.c
|
@ -31,7 +31,7 @@
|
|||
#include <wsutil/privileges.h>
|
||||
#include <wsutil/report_message.h>
|
||||
#include <wsutil/wslog.h>
|
||||
#include <ui/version_info.h>
|
||||
#include <wsutil/version_info.h>
|
||||
#include <wiretap/wtap_opttypes.h>
|
||||
|
||||
#include <epan/decode_as.h>
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#endif
|
||||
|
||||
#include <wsutil/strtoi.h>
|
||||
#include <ui/version_info.h>
|
||||
#include <wsutil/version_info.h>
|
||||
|
||||
#include "sharkd.h"
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
#include <ui/rtp_stream.h>
|
||||
#include <ui/tap-rtp-common.h>
|
||||
#include <ui/tap-rtp-analysis.h>
|
||||
#include <ui/version_info.h>
|
||||
#include <wsutil/version_info.h>
|
||||
#include <epan/to_str.h>
|
||||
|
||||
#include <epan/addr_resolv.h>
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
#include <cli_main.h>
|
||||
#include <ui/cmdarg_err.h>
|
||||
#include <ui/text_import.h>
|
||||
#include <ui/version_info.h>
|
||||
#include <wsutil/version_info.h>
|
||||
#include <ui/failure_message.h>
|
||||
#include <wsutil/report_message.h>
|
||||
#include <wsutil/inet_addr.h>
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
#include <wsutil/wslog.h>
|
||||
#include <wsutil/ws_assert.h>
|
||||
#include <cli_main.h>
|
||||
#include <ui/version_info.h>
|
||||
#include <wsutil/version_info.h>
|
||||
|
||||
#include "globals.h"
|
||||
#include <epan/timestamp.h>
|
||||
|
|
2
tshark.c
2
tshark.c
|
@ -51,7 +51,7 @@
|
|||
#include <wsutil/ws_assert.h>
|
||||
#include <wsutil/strtoi.h>
|
||||
#include <cli_main.h>
|
||||
#include <ui/version_info.h>
|
||||
#include <wsutil/version_info.h>
|
||||
#include <wiretap/wtap_opttypes.h>
|
||||
|
||||
#include "globals.h"
|
||||
|
|
|
@ -104,31 +104,12 @@ target_include_directories(summary
|
|||
${GCRYPT_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
add_library(version_info STATIC version_info.c)
|
||||
|
||||
if(NOT VCSVERSION_OVERRIDE)
|
||||
add_dependencies(version_info vcs_version)
|
||||
endif()
|
||||
|
||||
target_link_libraries(version_info
|
||||
PRIVATE
|
||||
wsutil
|
||||
${ZLIB_LIBRARIES}
|
||||
${PCRE2_LIBRARIES}
|
||||
)
|
||||
|
||||
target_include_directories(version_info
|
||||
SYSTEM PRIVATE
|
||||
${ZLIB_INCLUDE_DIRS}
|
||||
${PCRE2_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
set_target_properties(ui version_info PROPERTIES
|
||||
set_target_properties(ui summary PROPERTIES
|
||||
LINK_FLAGS "${WS_LINK_FLAGS}"
|
||||
FOLDER "UI"
|
||||
)
|
||||
if(MSVC)
|
||||
set_target_properties(ui version_info PROPERTIES
|
||||
set_target_properties(ui summary PROPERTIES
|
||||
LINK_FLAGS_DEBUG "${WS_MSVC_DEBUG_LINK_FLAGS}"
|
||||
)
|
||||
endif()
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include <ws_exit_codes.h>
|
||||
#include <wsutil/ws_getopt.h>
|
||||
|
||||
#include <ui/version_info.h>
|
||||
#include <wsutil/version_info.h>
|
||||
|
||||
#include <ui/clopts_common.h>
|
||||
#include <ui/cmdarg_err.h>
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
#include "wsutil/filesystem.h"
|
||||
#include <wsutil/ws_assert.h>
|
||||
#include "ui/cmdarg_err.h"
|
||||
#include "ui/version_info.h"
|
||||
|
||||
/* XXX - We might want to switch this to a UAT */
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include "globals.h"
|
||||
#include "wsutil/os_version_info.h"
|
||||
#include "wsutil/tempfile.h"
|
||||
#include "ui/version_info.h"
|
||||
#include "wsutil/version_info.h"
|
||||
|
||||
#include <epan/tap.h>
|
||||
#include <epan/prefs.h>
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include <wsutil/report_message.h>
|
||||
#include <wsutil/please_report_bug.h>
|
||||
#include <wsutil/unicode-utils.h>
|
||||
#include <ui/version_info.h>
|
||||
#include <wsutil/version_info.h>
|
||||
|
||||
#include <epan/addr_resolv.h>
|
||||
#include <epan/ex-opt.h>
|
||||
|
|
|
@ -24,7 +24,7 @@ DIAG_ON(frame-larger-than=)
|
|||
#include <wsutil/filesystem.h>
|
||||
#include <wsutil/wslog.h>
|
||||
#include <wsutil/ws_assert.h>
|
||||
#include <ui/version_info.h>
|
||||
#include <wsutil/version_info.h>
|
||||
#include <epan/prefs.h>
|
||||
#include <epan/stats_tree_priv.h>
|
||||
#include <epan/plugin_if.h>
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#include "wsutil/file_util.h"
|
||||
#include "wsutil/tempfile.h"
|
||||
#include "wsutil/plugins.h"
|
||||
#include "ui/version_info.h"
|
||||
#include "wsutil/version_info.h"
|
||||
#include "ui/capture_globals.h"
|
||||
|
||||
#include "extcap.h"
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
#include "wsutil/str_util.h"
|
||||
#include "wsutil/utf8_entities.h"
|
||||
#include "ui/version_info.h"
|
||||
#include "wsutil/version_info.h"
|
||||
|
||||
#include <ui/qt/utils/qt_ui_utils.h>
|
||||
#include "main_application.h"
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
|
||||
#include "wsutil/file_util.h"
|
||||
#include "wsutil/str_util.h"
|
||||
#include "ui/version_info.h"
|
||||
|
||||
#include "ws_symbol_export.h"
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include <wsutil/report_message.h>
|
||||
#include <wsutil/please_report_bug.h>
|
||||
#include <wsutil/unicode-utils.h>
|
||||
#include <ui/version_info.h>
|
||||
#include <wsutil/version_info.h>
|
||||
|
||||
#include <epan/addr_resolv.h>
|
||||
#include <epan/ex-opt.h>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "ui/capture_globals.h"
|
||||
#include "ui/urls.h"
|
||||
|
||||
#include "ui/version_info.h"
|
||||
#include "wsutil/version_info.h"
|
||||
|
||||
#include "welcome_page.h"
|
||||
#include <ui_welcome_page.h>
|
||||
|
|
|
@ -24,7 +24,7 @@ DIAG_ON(frame-larger-than=)
|
|||
#include <wsutil/filesystem.h>
|
||||
#include <wsutil/wslog.h>
|
||||
#include <wsutil/ws_assert.h>
|
||||
#include <ui/version_info.h>
|
||||
#include <wsutil/version_info.h>
|
||||
#include <epan/prefs.h>
|
||||
#include <epan/stats_tree_priv.h>
|
||||
#include <epan/plugin_if.h>
|
||||
|
@ -3135,4 +3135,3 @@ QString WiresharkMainWindow::findRtpStreams(QVector<rtpstream_id_t *> *stream_id
|
|||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -17,8 +17,7 @@
|
|||
#include <wiretap/wtap_opttypes.h>
|
||||
#include <wsutil/os_version_info.h>
|
||||
#include <wsutil/report_message.h>
|
||||
|
||||
#include "ui/version_info.h"
|
||||
#include "wsutil/version_info.h"
|
||||
|
||||
#include "tap_export_pdu.h"
|
||||
|
||||
|
|
|
@ -99,7 +99,7 @@
|
|||
#include <wsutil/nstime.h>
|
||||
#include <wsutil/time_util.h>
|
||||
|
||||
#include <ui/version_info.h>
|
||||
#include <wsutil/version_info.h>
|
||||
#include <wsutil/cpu_info.h>
|
||||
#include <wsutil/os_version_info.h>
|
||||
|
||||
|
|
|
@ -81,6 +81,7 @@ set(WSUTIL_PUBLIC_HEADERS
|
|||
type_util.h
|
||||
unicode-utils.h
|
||||
utf8_entities.h
|
||||
version_info.h
|
||||
ws_assert.h
|
||||
ws_cpuid.h
|
||||
glib-compat.h
|
||||
|
@ -143,6 +144,7 @@ set(WSUTIL_COMMON_FILES
|
|||
to_str.c
|
||||
type_util.c
|
||||
unicode-utils.c
|
||||
version_info.c
|
||||
ws_getopt.c
|
||||
ws_mempbrk.c
|
||||
ws_pipe.c
|
||||
|
@ -284,6 +286,10 @@ add_library(wsutil
|
|||
${CMAKE_BINARY_DIR}/resources/libwsutil.rc
|
||||
)
|
||||
|
||||
if(NOT VCSVERSION_OVERRIDE)
|
||||
add_dependencies(wsutil vcs_version)
|
||||
endif()
|
||||
|
||||
target_compile_definitions(wsutil PRIVATE
|
||||
WS_BUILD_DLL
|
||||
BUILD_WSUTIL
|
||||
|
@ -309,6 +315,7 @@ target_link_libraries(wsutil
|
|||
${CMAKE_DL_LIBS}
|
||||
${GCRYPT_LIBRARIES}
|
||||
${GNUTLS_LIBRARIES}
|
||||
${ZLIB_LIBRARIES}
|
||||
${PCRE2_LIBRARIES}
|
||||
${WIN_IPHLPAPI_LIBRARY}
|
||||
${WIN_WS2_32_LIBRARY}
|
||||
|
@ -321,6 +328,7 @@ target_include_directories(wsutil SYSTEM
|
|||
${GNUTLS_INCLUDE_DIRS}
|
||||
PRIVATE
|
||||
${GMODULE2_INCLUDE_DIRS}
|
||||
${ZLIB_INCLUDE_DIRS}
|
||||
${PCRE2_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
|
|
|
@ -152,8 +152,14 @@ get_appname_and_version(void)
|
|||
return appname_with_version;
|
||||
}
|
||||
|
||||
static void
|
||||
get_zlib_feature_info(feature_list l)
|
||||
void
|
||||
gather_pcre2_compile_info(feature_list l)
|
||||
{
|
||||
with_feature(l, "PCRE2");
|
||||
}
|
||||
|
||||
void
|
||||
gather_zlib_compile_info(feature_list l)
|
||||
{
|
||||
#ifdef HAVE_ZLIB
|
||||
#ifdef ZLIB_VERSION
|
||||
|
@ -191,8 +197,6 @@ get_compiled_version_info(gather_feature_func gather_compile)
|
|||
with_feature(&l,
|
||||
"GLib (version unknown)");
|
||||
#endif
|
||||
with_feature(&l, "PCRE2");
|
||||
get_zlib_feature_info(&l);
|
||||
|
||||
if (gather_compile != NULL) {
|
||||
gather_compile(&l);
|
||||
|
@ -415,8 +419,8 @@ get_compiler_info(GString *str)
|
|||
#endif
|
||||
}
|
||||
|
||||
static inline void
|
||||
get_pcre2_runtime_version_info(feature_list l)
|
||||
void
|
||||
gather_pcre2_runtime_info(feature_list l)
|
||||
{
|
||||
/* From pcre2_api(3):
|
||||
* The where argument should point to a buffer that is at least 24 code
|
||||
|
@ -441,6 +445,15 @@ get_pcre2_runtime_version_info(feature_list l)
|
|||
g_free(buf_pcre2);
|
||||
}
|
||||
|
||||
void
|
||||
gather_zlib_runtime_info(feature_list l)
|
||||
{
|
||||
(void)l;
|
||||
#if defined(HAVE_ZLIB) && !defined(_WIN32)
|
||||
with_feature(l, "zlib %s", zlibVersion());
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Get various library run-time versions, and the OS version, and append
|
||||
* them to the specified GString.
|
||||
|
@ -469,10 +482,7 @@ get_runtime_version_info(gather_feature_func gather_runtime)
|
|||
|
||||
with_feature(&l, "GLib %u.%u.%u",
|
||||
glib_major_version, glib_minor_version, glib_micro_version);
|
||||
get_pcre2_runtime_version_info(&l);
|
||||
#if defined(HAVE_ZLIB) && !defined(_WIN32)
|
||||
with_feature(&l, "zlib %s", zlibVersion());
|
||||
#endif
|
||||
|
||||
if (gather_runtime != NULL) {
|
||||
gather_runtime(&l);
|
||||
}
|
|
@ -39,6 +39,7 @@ extern "C" {
|
|||
* put the libcap information into the string, as we currently
|
||||
* don't use libcap in TShark.
|
||||
*/
|
||||
WS_DLL_PUBLIC
|
||||
void ws_init_version_info(const char *appname,
|
||||
gather_feature_func gather_compile,
|
||||
gather_feature_func gather_runtime);
|
||||
|
@ -48,8 +49,17 @@ void ws_init_version_info(const char *appname,
|
|||
* ws_init_version_info(), followed by a string giving the
|
||||
* application version.
|
||||
*/
|
||||
WS_DLL_PUBLIC
|
||||
const char *get_appname_and_version(void);
|
||||
|
||||
WS_DLL_PUBLIC
|
||||
void
|
||||
gather_pcre2_compile_info(feature_list l);
|
||||
|
||||
WS_DLL_PUBLIC
|
||||
void
|
||||
gather_zlib_compile_info(feature_list l);
|
||||
|
||||
/*
|
||||
* Get various library compile-time versions, put them in a GString,
|
||||
* and return the GString.
|
||||
|
@ -57,8 +67,17 @@ const char *get_appname_and_version(void);
|
|||
* "gather_compile" is called (if non-null) to add any additional build-time
|
||||
* information.
|
||||
*/
|
||||
WS_DLL_PUBLIC
|
||||
GString *get_compiled_version_info(gather_feature_func gather_compile);
|
||||
|
||||
WS_DLL_PUBLIC
|
||||
void
|
||||
gather_pcre2_runtime_info(feature_list l);
|
||||
|
||||
WS_DLL_PUBLIC
|
||||
void
|
||||
gather_zlib_runtime_info(feature_list l);
|
||||
|
||||
/*
|
||||
* Get various library run-time versions, and the OS version, put them in
|
||||
* a GString, and return the GString.
|
||||
|
@ -68,6 +87,7 @@ GString *get_compiled_version_info(gather_feature_func gather_compile);
|
|||
* put the libcap information into the string, as we currently
|
||||
* don't use libcap in TShark.
|
||||
*/
|
||||
WS_DLL_PUBLIC
|
||||
GString *get_runtime_version_info(gather_feature_func gather_runtime);
|
||||
|
||||
/*
|
||||
|
@ -75,22 +95,26 @@ GString *get_runtime_version_info(gather_feature_func gather_runtime);
|
|||
* from a tree checked out from Wireshark's version control system,
|
||||
* something identifying what version was checked out.
|
||||
*/
|
||||
WS_DLL_PUBLIC
|
||||
const char *get_ws_vcs_version_info(void);
|
||||
|
||||
/*
|
||||
* Shorter version of get_ws_vcs_version_info().
|
||||
*/
|
||||
WS_DLL_PUBLIC
|
||||
const char *get_ws_vcs_version_info_short(void);
|
||||
|
||||
/*
|
||||
* Return version number as integers.
|
||||
*/
|
||||
WS_DLL_PUBLIC
|
||||
void get_ws_version_number(int *major, int *minor, int *micro);
|
||||
|
||||
/*
|
||||
* Show the program name and version number information on the standard
|
||||
* output; this is used for command-line "show the version" options.
|
||||
*/
|
||||
WS_DLL_PUBLIC
|
||||
void show_version(void);
|
||||
|
||||
/*
|
||||
|
@ -98,12 +122,16 @@ void show_version(void);
|
|||
* description string, and a "See {URL} for more information" message.
|
||||
* This is used for command-line "help" options.
|
||||
*/
|
||||
WS_DLL_PUBLIC
|
||||
void show_help_header(const char *description);
|
||||
|
||||
WS_DLL_PUBLIC
|
||||
const char *get_copyright_info(void);
|
||||
|
||||
WS_DLL_PUBLIC
|
||||
const char *get_license_info(void);
|
||||
|
||||
WS_DLL_PUBLIC
|
||||
const char *get_license_info_short(void);
|
||||
|
||||
#ifdef __cplusplus
|
Loading…
Reference in New Issue