summaryrefslogtreecommitdiff
path: root/wsutil
diff options
context:
space:
mode:
Diffstat (limited to 'wsutil')
-rw-r--r--wsutil/CMakeLists.txt3
-rw-r--r--wsutil/Makefile.am2
-rw-r--r--wsutil/crash_info.h3
-rw-r--r--wsutil/crc10.h3
-rw-r--r--wsutil/crc16.h12
-rw-r--r--wsutil/crc32.h21
-rw-r--r--wsutil/crc6.h3
-rw-r--r--wsutil/crc7.h3
-rw-r--r--wsutil/crc8.h3
-rw-r--r--wsutil/file_util.h30
-rw-r--r--wsutil/inet_aton.h3
-rw-r--r--wsutil/inet_v6defs.h6
-rw-r--r--wsutil/privileges.h21
-rw-r--r--wsutil/strptime.h3
-rw-r--r--wsutil/wsgetopt.h6
15 files changed, 40 insertions, 82 deletions
diff --git a/wsutil/CMakeLists.txt b/wsutil/CMakeLists.txt
index e90b487f56..df689bff48 100644
--- a/wsutil/CMakeLists.txt
+++ b/wsutil/CMakeLists.txt
@@ -64,9 +64,6 @@ add_library(wsutil ${LINK_MODE_LIB}
set(FULL_SO_VERSION "0.0.0")
set_target_properties(wsutil PROPERTIES COMPILE_DEFINITIONS "WS_BUILD_DLL")
-if(DEFINED COMPILE_HIDE_SYMBOLS)
- set_target_properties(wsutil PROPERTIES COMPILE_FLAGS ${COMPILE_HIDE_SYMBOLS})
-endif()
set_target_properties(wsutil PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS}")
set_target_properties(wsutil PROPERTIES VERSION ${FULL_SO_VERSION} SOVERSION 0)
diff --git a/wsutil/Makefile.am b/wsutil/Makefile.am
index 1cdfd076d8..7a3774faaa 100644
--- a/wsutil/Makefile.am
+++ b/wsutil/Makefile.am
@@ -54,7 +54,7 @@ include ../Makefile.am.inc
include Makefile.common
-AM_CFLAGS =-DWS_BUILD_DLL @COMPILE_HIDE_SYMBOLS@
+AM_CFLAGS =-DWS_BUILD_DLL
if HAVE_WARNINGS_AS_ERRORS
AM_CFLAGS += -Werror
diff --git a/wsutil/crash_info.h b/wsutil/crash_info.h
index d19ce6bcc5..9643fe8c34 100644
--- a/wsutil/crash_info.h
+++ b/wsutil/crash_info.h
@@ -31,8 +31,7 @@
extern "C" {
#endif
-WS_DLL_PUBLIC
-extern void ws_add_crash_info(const char *fmt, ...)
+WS_DLL_PUBLIC void ws_add_crash_info(const char *fmt, ...)
G_GNUC_PRINTF(1,2);
#ifdef __cplusplus
diff --git a/wsutil/crc10.h b/wsutil/crc10.h
index 111763ae83..41ea0feded 100644
--- a/wsutil/crc10.h
+++ b/wsutil/crc10.h
@@ -29,7 +29,6 @@
#include "ws_symbol_export.h"
/* update the data block's CRC-10 remainder one byte at a time */
-WS_DLL_PUBLIC
-extern guint16 update_crc10_by_bytes(guint16 crc10, const guint8 *data_blk_ptr, int data_blk_size);
+WS_DLL_PUBLIC guint16 update_crc10_by_bytes(guint16 crc10, const guint8 *data_blk_ptr, int data_blk_size);
#endif /* __CRC10_H__ */
diff --git a/wsutil/crc16.h b/wsutil/crc16.h
index 09dde4b893..3529a1af6c 100644
--- a/wsutil/crc16.h
+++ b/wsutil/crc16.h
@@ -46,15 +46,13 @@ extern "C" {
@param buf The buffer containing the data.
@param len The number of bytes to include in the computation.
@return The CRC16 CCITT checksum. */
-WS_DLL_PUBLIC
-extern guint16 crc16_ccitt(const guint8 *buf, guint len);
+WS_DLL_PUBLIC guint16 crc16_ccitt(const guint8 *buf, guint len);
/** Compute CRC16 X.25 CCITT checksum of a buffer of data.
@param buf The buffer containing the data.
@param len The number of bytes to include in the computation.
@return The CRC16 X.25 CCITT checksum. */
-WS_DLL_PUBLIC
-extern guint16 crc16_x25_ccitt(const guint8 *buf, guint len);
+WS_DLL_PUBLIC guint16 crc16_x25_ccitt(const guint8 *buf, guint len);
/** Compute CRC16 CCITT checksum of a buffer of data. If computing the
* checksum over multiple buffers and you want to feed the partial CRC16
@@ -63,8 +61,7 @@ extern guint16 crc16_x25_ccitt(const guint8 *buf, guint len);
@param len The number of bytes to include in the computation.
@param seed The seed to use.
@return The CRC16 CCITT checksum (using the given seed). */
-WS_DLL_PUBLIC
-extern guint16 crc16_ccitt_seed(const guint8 *buf, guint len, guint16 seed);
+WS_DLL_PUBLIC guint16 crc16_ccitt_seed(const guint8 *buf, guint len, guint16 seed);
/** Calculates a CRC16 checksum for the given buffer with the polynom
* 0x5935 using a precompiled CRC table
@@ -73,8 +70,7 @@ extern guint16 crc16_ccitt_seed(const guint8 *buf, guint len, guint16 seed);
* @param seed The seed to use.
* @return the CRC16 checksum for the buffer
*/
-WS_DLL_PUBLIC
-extern guint16 crc16_0x5935(const guint8 *buf, guint32 len, guint16 seed);
+WS_DLL_PUBLIC guint16 crc16_0x5935(const guint8 *buf, guint32 len, guint16 seed);
#ifdef __cplusplus
}
diff --git a/wsutil/crc32.h b/wsutil/crc32.h
index 72d3b07b59..2a96befb47 100644
--- a/wsutil/crc32.h
+++ b/wsutil/crc32.h
@@ -46,21 +46,18 @@ extern "C" {
/** Lookup the crc value in the crc32_ccitt_table
@param pos Position in the table. */
-WS_DLL_PUBLIC
-extern guint32 crc32_ccitt_table_lookup (guchar pos);
+WS_DLL_PUBLIC guint32 crc32_ccitt_table_lookup (guchar pos);
/** Lookup the crc value in the crc32c_table
@param pos Position in the table. */
-WS_DLL_PUBLIC
-extern guint32 crc32c_table_lookup (guchar pos);
+WS_DLL_PUBLIC guint32 crc32c_table_lookup (guchar pos);
/** Compute CRC32C checksum of a buffer of data.
@param buf The buffer containing the data.
@param len The number of bytes to include in the computation.
@param crc The preload value for the CRC32C computation.
@return The CRC32C checksum. */
-WS_DLL_PUBLIC
-extern guint32 crc32c_calculate(const void *buf, int len, guint32 crc);
+WS_DLL_PUBLIC guint32 crc32c_calculate(const void *buf, int len, guint32 crc);
/** Compute CRC32C checksum of a buffer of data without swapping seed crc
or completed checksum
@@ -68,15 +65,13 @@ extern guint32 crc32c_calculate(const void *buf, int len, guint32 crc);
@param len The number of bytes to include in the computation.
@param crc The preload value for the CRC32C computation.
@return The CRC32C checksum. */
-WS_DLL_PUBLIC
-extern guint32 crc32c_calculate_no_swap(const void *buf, int len, guint32 crc);
+WS_DLL_PUBLIC guint32 crc32c_calculate_no_swap(const void *buf, int len, guint32 crc);
/** Compute CRC32 CCITT checksum of a buffer of data.
@param buf The buffer containing the data.
@param len The number of bytes to include in the computation.
@return The CRC32 CCITT checksum. */
-WS_DLL_PUBLIC
-extern guint32 crc32_ccitt(const guint8 *buf, guint len);
+WS_DLL_PUBLIC guint32 crc32_ccitt(const guint8 *buf, guint len);
/** Compute CRC32 CCITT checksum of a buffer of data. If computing the
* checksum over multiple buffers and you want to feed the partial CRC32
@@ -85,16 +80,14 @@ extern guint32 crc32_ccitt(const guint8 *buf, guint len);
@param len The number of bytes to include in the computation.
@param seed The seed to use.
@return The CRC32 CCITT checksum (using the given seed). */
-WS_DLL_PUBLIC
-extern guint32 crc32_ccitt_seed(const guint8 *buf, guint len, guint32 seed);
+WS_DLL_PUBLIC guint32 crc32_ccitt_seed(const guint8 *buf, guint len, guint32 seed);
/** Compute MPEG-2 CRC32 checksum of a buffer of data.
@param buf The buffer containing the data.
@param len The number of bytes to include in the computation.
@param seed The seed to use.
@return The CRC32 MPEG-2 checksum (using the given seed). */
-WS_DLL_PUBLIC
-extern guint32 crc32_mpeg2_seed(const guint8 *buf, guint len, guint32 seed);
+WS_DLL_PUBLIC guint32 crc32_mpeg2_seed(const guint8 *buf, guint len, guint32 seed);
WS_DLL_PUBLIC int AirPDcapWepDecrypt(
const guchar *seed,
diff --git a/wsutil/crc6.h b/wsutil/crc6.h
index 9320a9a494..e271dadb47 100644
--- a/wsutil/crc6.h
+++ b/wsutil/crc6.h
@@ -27,7 +27,6 @@
#include "ws_symbol_export.h"
-WS_DLL_PUBLIC
-extern guint16 update_crc6_by_bytes(guint16 crc6, guint8 byte1, guint8 byte2);
+WS_DLL_PUBLIC guint16 update_crc6_by_bytes(guint16 crc6, guint8 byte1, guint8 byte2);
#endif /* __CRC6_H__ */
diff --git a/wsutil/crc7.h b/wsutil/crc7.h
index 68259e8146..2afc9fb109 100644
--- a/wsutil/crc7.h
+++ b/wsutil/crc7.h
@@ -69,8 +69,7 @@ static inline guint8 crc7init(void)
* \param data_len Number of bytes in the \a data buffer.
* \return The updated crc value.
*****************************************************************************/
-WS_DLL_PUBLIC
-extern guint8 crc7update(guint8 crc, const unsigned char *data, int data_len);
+WS_DLL_PUBLIC guint8 crc7update(guint8 crc, const unsigned char *data, int data_len);
/**
diff --git a/wsutil/crc8.h b/wsutil/crc8.h
index 28c790fd91..ed98c5eac2 100644
--- a/wsutil/crc8.h
+++ b/wsutil/crc8.h
@@ -41,8 +41,7 @@ extern "C" {
* @param seed The seed to use.
* @return the CRC8 checksum for the buffer
*/
-WS_DLL_PUBLIC
-extern guint8 crc8_0x2F(guint8 *buf, guint32 len, guint8 seed);
+WS_DLL_PUBLIC guint8 crc8_0x2F(guint8 *buf, guint32 len, guint8 seed);
#ifdef __cplusplus
}
diff --git a/wsutil/file_util.h b/wsutil/file_util.h
index a39e82461d..e07da108a6 100644
--- a/wsutil/file_util.h
+++ b/wsutil/file_util.h
@@ -67,23 +67,15 @@ extern "C" {
#include <stdio.h>
-WS_DLL_PUBLIC
-extern int ws_stdio_open (const gchar *filename, int flags, int mode);
-WS_DLL_PUBLIC
-extern int ws_stdio_rename (const gchar *oldfilename, const gchar *newfilename);
-WS_DLL_PUBLIC
-extern int ws_stdio_mkdir (const gchar *filename, int mode);
-WS_DLL_PUBLIC
-extern int ws_stdio_stat64 (const gchar *filename, ws_statb64 *buf);
-WS_DLL_PUBLIC
-extern int ws_stdio_unlink (const gchar *filename);
-WS_DLL_PUBLIC
-extern int ws_stdio_remove (const gchar *filename);
+WS_DLL_PUBLIC int ws_stdio_open (const gchar *filename, int flags, int mode);
+WS_DLL_PUBLIC int ws_stdio_rename (const gchar *oldfilename, const gchar *newfilename);
+WS_DLL_PUBLIC int ws_stdio_mkdir (const gchar *filename, int mode);
+WS_DLL_PUBLIC int ws_stdio_stat64 (const gchar *filename, ws_statb64 *buf);
+WS_DLL_PUBLIC int ws_stdio_unlink (const gchar *filename);
+WS_DLL_PUBLIC int ws_stdio_remove (const gchar *filename);
-WS_DLL_PUBLIC
-extern FILE * ws_stdio_fopen (const gchar *filename, const gchar *mode);
-WS_DLL_PUBLIC
-extern FILE * ws_stdio_freopen (const gchar *filename, const gchar *mode, FILE *stream);
+WS_DLL_PUBLIC FILE * ws_stdio_fopen (const gchar *filename, const gchar *mode);
+WS_DLL_PUBLIC FILE * ws_stdio_freopen (const gchar *filename, const gchar *mode, FILE *stream);
#define ws_open ws_stdio_open
#define ws_rename ws_stdio_rename
@@ -139,15 +131,13 @@ GModule *ws_module_open(gchar *module_name, GModuleFlags flags);
/*
* utf8 version of getenv, needed to get win32 filename paths
*/
-WS_DLL_PUBLIC
-extern char *getenv_utf8(const char *varname);
+WS_DLL_PUBLIC char *getenv_utf8(const char *varname);
/** Create or open a "Wireshark is running" mutex.
* Create or open a mutex which signals that Wireshark or its associated
* executables is running. Used by the installer to test for a running application.
*/
-WS_DLL_PUBLIC
-extern void create_app_running_mutex();
+WS_DLL_PUBLIC void create_app_running_mutex();
#else /* _WIN32 */
diff --git a/wsutil/inet_aton.h b/wsutil/inet_aton.h
index 05ce348556..f4d372d436 100644
--- a/wsutil/inet_aton.h
+++ b/wsutil/inet_aton.h
@@ -31,7 +31,6 @@
#include "ws_symbol_export.h"
struct in_addr;
-WS_DLL_PUBLIC
-extern int inet_aton(const char* cp_arg, struct in_addr *addr);
+WS_DLL_PUBLIC int inet_aton(const char* cp_arg, struct in_addr *addr);
#endif
diff --git a/wsutil/inet_v6defs.h b/wsutil/inet_v6defs.h
index 04abecb872..3f17ae1001 100644
--- a/wsutil/inet_v6defs.h
+++ b/wsutil/inet_v6defs.h
@@ -41,11 +41,9 @@
#define inet_ntop ws_inet_ntop
#endif
-WS_DLL_PUBLIC
-extern int inet_pton(int af, const char *src, void *dst);
+WS_DLL_PUBLIC int inet_pton(int af, const char *src, void *dst);
#ifndef HAVE_INET_NTOP_PROTO
-WS_DLL_PUBLIC
-extern const char *inet_ntop(int af, const void *src, char *dst,
+WS_DLL_PUBLIC const char *inet_ntop(int af, const void *src, char *dst,
size_t size);
#endif
diff --git a/wsutil/privileges.h b/wsutil/privileges.h
index 231f3e34bc..2ce14da109 100644
--- a/wsutil/privileges.h
+++ b/wsutil/privileges.h
@@ -35,8 +35,7 @@ extern "C" {
* Called when the program starts, to enable security features and save
* whatever credential information we'll need later.
*/
-WS_DLL_PUBLIC
-extern void init_process_policies(void);
+WS_DLL_PUBLIC void init_process_policies(void);
/**
* Was this program started with special privileges? get_credential_info()
@@ -44,8 +43,7 @@ extern void init_process_policies(void);
* @return TRUE if the program was started with special privileges,
* FALSE otherwise.
*/
-WS_DLL_PUBLIC
-extern gboolean started_with_special_privs(void);
+WS_DLL_PUBLIC gboolean started_with_special_privs(void);
/**
* Is this program running with special privileges? get_credential_info()
@@ -53,31 +51,27 @@ extern gboolean started_with_special_privs(void);
* @return TRUE if the program is running with special privileges,
* FALSE otherwise.
*/
-WS_DLL_PUBLIC
-extern gboolean running_with_special_privs(void);
+WS_DLL_PUBLIC gboolean running_with_special_privs(void);
/**
* Permanently relinquish special privileges. get_credential_info()
* MUST be called before calling this.
*/
-WS_DLL_PUBLIC
-extern void relinquish_special_privs_perm(void);
+WS_DLL_PUBLIC void relinquish_special_privs_perm(void);
/**
* Get the current username. String must be g_free()d after use.
* @return A freshly g_alloc()ed string containing the username,
* or "UNKNOWN" on failure.
*/
-WS_DLL_PUBLIC
-extern gchar *get_cur_username(void);
+WS_DLL_PUBLIC gchar *get_cur_username(void);
/**
* Get the current group. String must be g_free()d after use.
* @return A freshly g_alloc()ed string containing the group,
* or "UNKNOWN" on failure.
*/
-WS_DLL_PUBLIC
-extern gchar *get_cur_groupname(void);
+WS_DLL_PUBLIC gchar *get_cur_groupname(void);
#ifdef _WIN32
/**
@@ -85,8 +79,7 @@ extern gchar *get_cur_groupname(void);
* @return TRUE if npf.sys is running, FALSE if it's not or if there was
* an error checking its status.
*/
-WS_DLL_PUBLIC
-extern gboolean npf_sys_is_running();
+WS_DLL_PUBLIC gboolean npf_sys_is_running();
#endif
#ifdef __cplusplus
diff --git a/wsutil/strptime.h b/wsutil/strptime.h
index b11d29e715..56b064a324 100644
--- a/wsutil/strptime.h
+++ b/wsutil/strptime.h
@@ -29,7 +29,6 @@
/*
* Version of "strptime()", for the benefit of OSes that don't have it.
*/
-WS_DLL_PUBLIC
-extern char *strptime(const char *, const char *, struct tm *);
+WS_DLL_PUBLIC char *strptime(const char *, const char *, struct tm *);
#endif
diff --git a/wsutil/wsgetopt.h b/wsutil/wsgetopt.h
index eaebe65a96..41054d1cc9 100644
--- a/wsutil/wsgetopt.h
+++ b/wsutil/wsgetopt.h
@@ -151,8 +151,7 @@ struct option
/* Many other libraries have conflicting prototypes for getopt, with
differences in the consts, in stdlib.h. To avoid compilation
errors, only prototype getopt for the GNU C library. */
-WS_DLL_PUBLIC
-extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
+WS_DLL_PUBLIC int getopt (int ___argc, char *const *___argv, const char *__shortopts)
__THROW;
# if defined __need_getopt && defined __USE_POSIX2 \
@@ -171,8 +170,7 @@ extern int __posix_getopt (int ___argc, char *const *___argv,
# endif
# endif
#else /* not __GNU_LIBRARY__ */
-WS_DLL_PUBLIC
-extern int getopt (int ___argc, char *const *___argv,
+WS_DLL_PUBLIC int getopt (int ___argc, char *const *___argv,
const char *__shortopts);
#endif /* __GNU_LIBRARY__ */