forked from osmocom/wireshark
Move even more headers outside 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".
This commit is contained in:
parent
1e1f4e6b5f
commit
e434d404d0
|
@ -11,13 +11,12 @@
|
|||
#ifndef __WTAP_MODULES_H__
|
||||
#define __WTAP_MODULES_H__
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
|
||||
/*
|
||||
* Entry in the table of built-in wiretap modules to register.
|
||||
*/
|
||||
|
|
|
@ -17,8 +17,6 @@
|
|||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include "ws_symbol_export.h"
|
||||
|
||||
WS_DLL_PUBLIC void get_cpu_info(GString *str);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -17,10 +17,6 @@
|
|||
|
||||
#include "ws_symbol_export.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <io.h> /* for _read(), _write(), etc. */
|
||||
#include <gmodule.h>
|
||||
|
@ -36,6 +32,12 @@ extern "C" {
|
|||
|
||||
#include <sys/stat.h> /* for stat() and struct stat */
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/* We set a larger IO Buffer size for the capture files */
|
||||
#define IO_BUF_SIZE (64 * 1024)
|
||||
|
||||
|
@ -58,8 +60,6 @@ extern "C" {
|
|||
#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
/*
|
||||
|
|
|
@ -13,13 +13,13 @@
|
|||
|
||||
#include <glib.h>
|
||||
|
||||
#include <gmodule.h>
|
||||
#include "ws_symbol_export.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include <gmodule.h>
|
||||
#include "ws_symbol_export.h"
|
||||
|
||||
typedef void (*plugin_register_func)(void);
|
||||
|
||||
typedef void plugins_t;
|
||||
|
|
|
@ -13,6 +13,20 @@
|
|||
|
||||
#include "ws_symbol_export.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
/*
|
||||
* On Windows, a process ID is a HANDLE.
|
||||
* Include <windows.h> to make sure HANDLE is defined.
|
||||
*/
|
||||
#include <windows.h>
|
||||
#else
|
||||
/*
|
||||
* On UN*X, a process ID is a pid_t.
|
||||
* Include <sys/types.h> to make sure pid_t is defined.
|
||||
*/
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
@ -20,20 +34,15 @@ extern "C" {
|
|||
#ifdef _WIN32
|
||||
/*
|
||||
* On Windows, a process ID is a HANDLE.
|
||||
* Include <windows.h> to make sure HANDLE is defined.
|
||||
*/
|
||||
#include <windows.h>
|
||||
|
||||
typedef HANDLE ws_process_id;
|
||||
|
||||
#define WS_INVALID_PID INVALID_HANDLE_VALUE
|
||||
|
||||
#else
|
||||
/*
|
||||
* On UN*X, a process ID is a pid_t.
|
||||
* Include <sys/types.h> to make sure pid_t is defined.
|
||||
*/
|
||||
#include <sys/types.h>
|
||||
|
||||
typedef pid_t ws_process_id;
|
||||
|
||||
#define WS_INVALID_PID -1
|
||||
|
|
|
@ -12,12 +12,12 @@
|
|||
|
||||
#include "ws_symbol_export.h"
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include <time.h>
|
||||
|
||||
/** Converts a broken down date representation, relative to UTC,
|
||||
* to a timestamp
|
||||
*/
|
||||
|
|
|
@ -15,6 +15,12 @@
|
|||
|
||||
#include <glib.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#include <tchar.h>
|
||||
#include <wchar.h>
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Unicode convenience routines.
|
||||
|
@ -29,10 +35,6 @@ int ws_utf8_char_len(guint8 ch);
|
|||
|
||||
#ifdef _WIN32
|
||||
|
||||
#include <windows.h>
|
||||
#include <tchar.h>
|
||||
#include <wchar.h>
|
||||
|
||||
/** Given a UTF-8 string, convert it to UTF-16. This is meant to be used
|
||||
* to convert between GTK+ 2.x (UTF-8) to Windows (UTF-16).
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue