summaryrefslogtreecommitdiff
path: root/tcpdump.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-08-19 11:25:24 -0700
committerGuy Harris <guy@alum.mit.edu>2017-08-19 11:25:24 -0700
commit3dc736d939536bcd843597cb655fcba28268705c (patch)
tree6c69e8113f12d847aa00e1c56df66c5777a43137 /tcpdump.c
parent297bf6343f27ea1d18e5dad529c253ffd3935d41 (diff)
downloadtcpdump-3dc736d939536bcd843597cb655fcba28268705c.tar.gz
Handle attributes for function pointers by checking the compiler version.
Handle attributes for function pointers the same way we handle attributes for functions, by explicitly checking for the compiler version with #if rather than with a configure script check. That's one fewer thing that, if you're not using autoconf, has to be done in some other fashion. While we're at it, put NORETURN in the right place to have it work with Microsoft Visual Studio as well as various UN*X compilers.
Diffstat (limited to 'tcpdump.c')
-rw-r--r--tcpdump.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tcpdump.c b/tcpdump.c
index 86ccc50c..270f79b4 100644
--- a/tcpdump.c
+++ b/tcpdump.c
@@ -185,17 +185,17 @@ cap_channel_t *capdns;
#endif
/* Forwards */
-static void error(FORMAT_STRING(const char *), ...) NORETURN PRINTFLIKE(1, 2);
+static NORETURN void error(FORMAT_STRING(const char *), ...) PRINTFLIKE(1, 2);
static void warning(FORMAT_STRING(const char *), ...) PRINTFLIKE(1, 2);
-static void exit_tcpdump(int) NORETURN;
+static NORETURN void exit_tcpdump(int);
static RETSIGTYPE cleanup(int);
static RETSIGTYPE child_cleanup(int);
static void print_version(void);
static void print_usage(void);
-static void show_tstamp_types_and_exit(pcap_t *, const char *device) NORETURN;
-static void show_dlts_and_exit(pcap_t *, const char *device) NORETURN;
+static NORETURN void show_tstamp_types_and_exit(pcap_t *, const char *device);
+static NORETURN void show_dlts_and_exit(pcap_t *, const char *device);
#ifdef HAVE_PCAP_FINDALLDEVS
-static void show_devices_and_exit (void) NORETURN;
+static NORETURN void show_devices_and_exit(void);
#endif
static void print_packet(u_char *, const struct pcap_pkthdr *, const u_char *);