From 587f156557c67a8dd4e025d7ce08b154cbb1132d Mon Sep 17 00:00:00 2001 From: Campus Date: Mon, 30 Nov 2015 12:37:15 +0100 Subject: reorganized header files - added ndpi_includes.h --- src/include/ndpi_win32.h | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) (limited to 'src/include/ndpi_win32.h') diff --git a/src/include/ndpi_win32.h b/src/include/ndpi_win32.h index f653caa51..645c022e5 100644 --- a/src/include/ndpi_win32.h +++ b/src/include/ndpi_win32.h @@ -22,36 +22,34 @@ * */ -#ifndef __NDPI_WIN32_INCLUDE_FILE__ -#define __NDPI_WIN32_INCLUDE_FILE__ +#ifndef __NDPI_WIN32_H__ +#define __NDPI_WIN32_H__ -#ifdef WIN32 -#include /* winsock.h is included automatically */ +#include +#include #include #include -#include /* getopt from: http://www.pwilson.net/sample.html. */ -#include /* for getpid() and the exec..() family */ +#include /* getopt from: http://www.pwilson.net/sample.html. */ +#include /* for getpid() and the exec..() family */ +#include #ifndef _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS #endif -#define snprintf _snprintf -extern char* strsep(char **stringp, const char *delim); +#define _WS2TCPIP_H_ /* Avoid compilation problems */ + +extern char* strsep(char **sp, const char *sep); -#define __attribute__(x) -#include -#ifndef __GNUC__ typedef unsigned char u_char; typedef unsigned short u_short; typedef unsigned int uint; typedef unsigned long u_long; -#endif -typedef u_char u_int8_t; -typedef u_short u_int16_t; -typedef unsigned int u_int32_t; -typedef unsigned __int64 u_int64_t; - +typedef u_char u_int8_t; +typedef u_short u_int16_t; +typedef uint u_int32_t; +typedef uint u_int; +typedef unsigned __int64 u_int64_t; #define pthread_t HANDLE #define pthread_mutex_t HANDLE @@ -68,6 +66,4 @@ extern unsigned long waitForNextEvent(unsigned long ulDelay /* ms */); #define sleep(a /* sec */) waitForNextEvent(1000*a /* ms */) -#endif /* Win32 */ - -#endif /* __NDPI_WIN32_INCLUDE_FILE__ */ +#endif /* __NDPI_WIN32_H__ */ -- cgit v1.2.3