summaryrefslogtreecommitdiff
path: root/wsutil
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2016-03-14 19:03:11 +0000
committerJoão Valverde <j@v6e.pt>2016-04-04 23:05:31 +0000
commitecb4dc396ef71feb67aeda7603e09b0cea0bc920 (patch)
tree18c03d5662172f826f9797f56b8ff177c326c526 /wsutil
parentbe96c3d64c9d5838e7319d5dd4a2ecd45897a024 (diff)
downloadwireshark-ecb4dc396ef71feb67aeda7603e09b0cea0bc920.tar.gz
Include ws_diag_control.h in config.h
Change-Id: Ia394071710ecda3b0e6686a51fbca45a8ff20317 Reviewed-on: https://code.wireshark.org/review/14749 Petri-Dish: João Valverde <j@v6e.pt> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
Diffstat (limited to 'wsutil')
-rw-r--r--wsutil/filesystem.c3
-rw-r--r--wsutil/inet_ntop.c4
-rw-r--r--wsutil/inet_pton.c4
-rw-r--r--wsutil/str_util.c3
-rw-r--r--wsutil/ws_diag_control.h107
-rw-r--r--wsutil/wsgcrypt.h2
6 files changed, 5 insertions, 118 deletions
diff --git a/wsutil/filesystem.c b/wsutil/filesystem.c
index 2a68a9949d..b58654f664 100644
--- a/wsutil/filesystem.c
+++ b/wsutil/filesystem.c
@@ -20,7 +20,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#include "config.h"
+#include <config.h>
/*
* Required with GNU libc to get dladdr().
@@ -62,7 +62,6 @@
#include <wsutil/report_err.h>
#include <wsutil/privileges.h>
#include <wsutil/file_util.h>
-#include <wsutil/ws_diag_control.h>
#include <wiretap/wtap.h> /* for WTAP_ERR_SHORT_WRITE */
diff --git a/wsutil/inet_ntop.c b/wsutil/inet_ntop.c
index cbb9c227dd..3fe730bcc6 100644
--- a/wsutil/inet_ntop.c
+++ b/wsutil/inet_ntop.c
@@ -15,7 +15,7 @@
* SOFTWARE.
*/
-#include "config.h"
+#include <config.h>
#include "inet_addr-int.h"
@@ -24,8 +24,6 @@
#include <glib.h>
-#include <wsutil/ws_diag_control.h>
-
#ifndef __P
#define __P(args) args
#endif
diff --git a/wsutil/inet_pton.c b/wsutil/inet_pton.c
index 78b14fd3d6..3c2b6b4620 100644
--- a/wsutil/inet_pton.c
+++ b/wsutil/inet_pton.c
@@ -15,7 +15,7 @@
* SOFTWARE.
*/
-#include "config.h"
+#include <config.h>
#include "inet_addr-int.h"
@@ -24,8 +24,6 @@
#include <glib.h>
-#include <wsutil/ws_diag_control.h>
-
#ifndef __P
#define __P(args) args
#endif
diff --git a/wsutil/str_util.c b/wsutil/str_util.c
index adcbb91e03..8763666f9a 100644
--- a/wsutil/str_util.c
+++ b/wsutil/str_util.c
@@ -20,10 +20,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#include "config.h"
+#include <config.h>
#include "str_util.h"
-#include "ws_diag_control.h"
int
ws_xton(char ch)
diff --git a/wsutil/ws_diag_control.h b/wsutil/ws_diag_control.h
deleted file mode 100644
index cc0e9eec25..0000000000
--- a/wsutil/ws_diag_control.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/* ws_diag_control.h
- * Turn compiler diagnostic messages on and off.
- *
- * From FreeRADIUS build.h.
- *
- * @copyright 2013 The FreeRADIUS server project
- *
- * That project is covered by the GPLv2, so:
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-#ifndef __WS_DIAG_CONTROL_H__
-#define __WS_DIAG_CONTROL_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define XSTRINGIFY(x) #x
-
-/*
- * Macros for controlling warnings in GCC >= 4.2 and clang >= 2.8
- */
-#define DIAG_JOINSTR(x,y) XSTRINGIFY(x ## y)
-#define DIAG_DO_PRAGMA(x) _Pragma (#x)
-
-/* check the gcc or clang version
-
- pragma GCC diagnostic error/warning/ignored -Wxxx was introduced
- in gcc 4.2.0
- pragma GCC diagnostic push/pop was introduced in gcc 4.6.0
-
- pragma clang diagnostic error/warning/ignored -Wxxx and
- pragma clang diagnostic push/pop were introduced in clang 2.8 */
-
-#if defined(__GNUC__) && !defined(__clang__)
-# define gcc_version ((__GNUC__ * 1000) + (__GNUC_MINOR__ * 10))
-# if gcc_version >= 4080
- /*
- * gcc version is >= 4.8.0. We can use "GCC diagnostic push/pop" *and*
- * gcc supports "-Wpedantic".
- */
-# define DIAG_PRAGMA(x) DIAG_DO_PRAGMA(GCC diagnostic x)
- /*
- * DIAG_OFF generates
- *
- * #pragma GCC diagnostic push
- * #pragma GCC diagnostic ignored "-Wpragmas"
- * #pragma GCC diagnostic ignored "-Wx-aka-the-warning-in-question"
- *
- * Ignoring "-Wpragmas" lets us turn off diagnostics for clang warnings
- * that might not be recognized by gcc.
- */
-# define DIAG_OFF(x) DIAG_PRAGMA(push) DIAG_PRAGMA(ignored DIAG_JOINSTR(-W,pragmas)) DIAG_PRAGMA(ignored DIAG_JOINSTR(-W,x))
-# define DIAG_ON(x) DIAG_PRAGMA(pop)
-# endif
-#elif defined(__clang__)
-# define clang_version ((__clang_major__ * 1000) + (__clang_minor__ * 10))
-# if clang_version >= 2080
- /* clang version is >= 2.8: we can use "clang diagnostic ignored -Wxxx"
- and "clang diagnostic push/pop" */
-# define DIAG_PRAGMA(x) DIAG_DO_PRAGMA(clang diagnostic x)
-# define DIAG_OFF(x) DIAG_PRAGMA(push) DIAG_PRAGMA(ignored DIAG_JOINSTR(-W,x))
-# define DIAG_ON(x) DIAG_PRAGMA(pop)
-# endif
-#endif
-
-#ifndef DIAG_OFF
- /* no gcc or clang, or gcc version < 4.2.0, or clang version < 2.8:
- we can't do anything */
-# define DIAG_OFF(x)
-# define DIAG_ON(x)
-#endif
-
-/*
- * For dealing with APIs which are only deprecated in OS X (like the
- * OpenSSL and MIT/Heimdal Kerberos APIs).
- *
- * Dear Apple: this is a cross-platform program, and we're not
- * going to use your Shiny New Frameworks on OS X unless there's
- * a sufficiently clear benefit to make it worth our while to have
- * both OS X and non-OS X versions of the code.
- */
-#ifdef __APPLE__
-# define USES_APPLE_DEPRECATED_API DIAG_OFF(deprecated-declarations)
-# define USES_APPLE_RST DIAG_ON(deprecated-declarations)
-#else
-# define USES_APPLE_DEPRECATED_API
-# define USES_APPLE_RST
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* __WS_DIAG_CONTROL_H__ */
diff --git a/wsutil/wsgcrypt.h b/wsutil/wsgcrypt.h
index 2591b92516..a6f2844fbf 100644
--- a/wsutil/wsgcrypt.h
+++ b/wsutil/wsgcrypt.h
@@ -29,7 +29,7 @@
#ifdef HAVE_LIBGCRYPT
-#include <wsutil/ws_diag_control.h>
+#include <ws_diag_control.h>
DIAG_OFF(deprecated-declarations)