aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2021-03-16 13:50:13 -0700
committerGuy Harris <gharris@sonic.net>2021-03-16 13:50:13 -0700
commit2820156fbd4b0213ca015216d8cd97c31b503c8c (patch)
treeac6593b99ec9ee226b3ccc323164ce80de158516 /epan
parent205e77d404244461f2b311a4285dfeeb55117502 (diff)
Move still *more* headers outside of extern "C".
If a header declares a function, or anything else requiring the extern "C" decoration, have it wrap the declaration itself; don't rely on the header itself being included inside extern "C".
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/asn1/kerberos/packet-kerberos-template.h4
-rw-r--r--epan/dissectors/packet-a21.h4
-rw-r--r--epan/dissectors/packet-bluetooth.h8
-rw-r--r--epan/dissectors/packet-dcm.h3
-rw-r--r--epan/dissectors/packet-quic.h8
-rw-r--r--epan/dissectors/packet-scsi.h6
-rw-r--r--epan/dissectors/packet-tcp.h8
-rw-r--r--epan/dissectors/packet-udp.h8
-rw-r--r--epan/wmem/wmem_user_cb_int.h4
-rw-r--r--epan/wslua/init_wslua.h4
10 files changed, 27 insertions, 30 deletions
diff --git a/epan/dissectors/asn1/kerberos/packet-kerberos-template.h b/epan/dissectors/asn1/kerberos/packet-kerberos-template.h
index 870214e320..7032d60d7f 100644
--- a/epan/dissectors/asn1/kerberos/packet-kerberos-template.h
+++ b/epan/dissectors/asn1/kerberos/packet-kerberos-template.h
@@ -122,10 +122,10 @@ extern gboolean krb_decrypt;
#endif /* HAVE_KERBEROS */
-#include "packet-kerberos-exp.h"
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
+#include "packet-kerberos-exp.h"
+
#endif /* __PACKET_KERBEROS_H */
diff --git a/epan/dissectors/packet-a21.h b/epan/dissectors/packet-a21.h
index 1877aa3bf5..802b650590 100644
--- a/epan/dissectors/packet-a21.h
+++ b/epan/dissectors/packet-a21.h
@@ -10,12 +10,12 @@
#ifndef __PACKET_A21_H__
#define __PACKET_A21_H__
+#include "ws_symbol_export.h"
+
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
-#include "ws_symbol_export.h"
-
WS_DLL_PUBLIC
void dissect_a21_ie_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *top_tree, proto_tree *tree, gint offset, guint8 message_type);
diff --git a/epan/dissectors/packet-bluetooth.h b/epan/dissectors/packet-bluetooth.h
index 029123ff2c..245fb06f8b 100644
--- a/epan/dissectors/packet-bluetooth.h
+++ b/epan/dissectors/packet-bluetooth.h
@@ -10,15 +10,15 @@
#ifndef __PACKET_BLUETOOTH_H__
#define __PACKET_BLUETOOTH_H__
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
#include <epan/wmem/wmem.h>
#include "packet-usb.h"
#include "packet-ubertooth.h"
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
#define PROTO_DATA_BLUETOOTH_SERVICE_UUID 0
#define BLUETOOTH_DATA_SRC 0
diff --git a/epan/dissectors/packet-dcm.h b/epan/dissectors/packet-dcm.h
index 46dbab2624..29a3c6f06e 100644
--- a/epan/dissectors/packet-dcm.h
+++ b/epan/dissectors/packet-dcm.h
@@ -25,9 +25,6 @@
extern "C" {
#endif /* __cplusplus */
-#include "config.h"
-
-
#define DCM_VR_AE 1 /* Application Entity */
#define DCM_VR_AS 2 /* Age String */
#define DCM_VR_AT 3 /* Attribute Tag */
diff --git a/epan/dissectors/packet-quic.h b/epan/dissectors/packet-quic.h
index 336082cf0e..3b2fb80435 100644
--- a/epan/dissectors/packet-quic.h
+++ b/epan/dissectors/packet-quic.h
@@ -10,14 +10,14 @@
#ifndef __PACKET_QUIC_H__
#define __PACKET_QUIC_H__
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
#include "ws_symbol_export.h"
#include <wsutil/wsgcrypt.h> /* needed to define HAVE_LIBGCRYPT_AEAD */
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
/**
* Metadata for a STREAM frame.
* https://tools.ietf.org/html/draft-ietf-quic-transport-23#section-19.8
diff --git a/epan/dissectors/packet-scsi.h b/epan/dissectors/packet-scsi.h
index c574ed8fff..6db5ec3876 100644
--- a/epan/dissectors/packet-scsi.h
+++ b/epan/dissectors/packet-scsi.h
@@ -11,13 +11,13 @@
#ifndef __PACKET_SCSI_H_
#define __PACKET_SCSI_H_
+#include <epan/exceptions.h>
+#include <epan/srt_table.h>
+
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
-#include <epan/exceptions.h>
-#include <epan/srt_table.h>
-
/* Structure containing itl nexus data :
* The itlq nexus is a structure containing data specific
* for a initiator target lun combination.
diff --git a/epan/dissectors/packet-tcp.h b/epan/dissectors/packet-tcp.h
index 900e7292ca..9411aa5962 100644
--- a/epan/dissectors/packet-tcp.h
+++ b/epan/dissectors/packet-tcp.h
@@ -10,16 +10,16 @@
#ifndef __PACKET_TCP_H__
#define __PACKET_TCP_H__
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
#include "ws_symbol_export.h"
#include <epan/conversation.h>
#include <epan/wmem/wmem.h>
#include <epan/wmem/wmem_interval_tree.h>
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
/* TCP flags */
#define TH_FIN 0x0001
#define TH_SYN 0x0002
diff --git a/epan/dissectors/packet-udp.h b/epan/dissectors/packet-udp.h
index 7b9e7055f4..adbbf2c2fd 100644
--- a/epan/dissectors/packet-udp.h
+++ b/epan/dissectors/packet-udp.h
@@ -11,14 +11,14 @@
#ifndef __PACKET_UDP_H__
#define __PACKET_UDP_H__
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
#include "ws_symbol_export.h"
#include <epan/conversation.h>
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
/* UDP structs and definitions */
typedef struct _e_udphdr {
guint16 uh_sport;
diff --git a/epan/wmem/wmem_user_cb_int.h b/epan/wmem/wmem_user_cb_int.h
index 7232241c81..3fed11e354 100644
--- a/epan/wmem/wmem_user_cb_int.h
+++ b/epan/wmem/wmem_user_cb_int.h
@@ -14,12 +14,12 @@
#include <glib.h>
+#include "wmem_user_cb.h"
+
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
-#include "wmem_user_cb.h"
-
WS_DLL_LOCAL
void
wmem_call_callbacks(wmem_allocator_t *allocator, wmem_cb_event_t event);
diff --git a/epan/wslua/init_wslua.h b/epan/wslua/init_wslua.h
index 4bac8884ce..0fdf0882b6 100644
--- a/epan/wslua/init_wslua.h
+++ b/epan/wslua/init_wslua.h
@@ -11,12 +11,12 @@
#ifndef __INIT_WSLUA_H__
#define __INIT_WSLUA_H__
+#include "ws_symbol_export.h"
+
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
-#include "ws_symbol_export.h"
-
WS_DLL_PUBLIC int wslua_count_plugins(void);
WS_DLL_PUBLIC void wslua_reload_plugins (register_cb cb, gpointer client_data);