diff options
author | Davide Beatrici <davidebeatrici@gmail.com> | 2019-09-12 23:44:16 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-12 23:44:16 +0300 |
commit | a38d19a7595c3e672f5ed549400b36348e01e442 (patch) | |
tree | 34bd1c4db9b95748d263aea811e849dec7e5525c /src/murmur/murmur_pch.h | |
parent | 713b92c3c233f8f38200c4a458e0196d3d39a3b0 (diff) | |
parent | 15831dbca85dd906edbad2bfff2b147527a456e2 (diff) |
Merge PR #3644: Don't include PCH headers directly, add missing includes
Diffstat (limited to 'src/murmur/murmur_pch.h')
-rw-r--r-- | src/murmur/murmur_pch.h | 118 |
1 files changed, 53 insertions, 65 deletions
diff --git a/src/murmur/murmur_pch.h b/src/murmur/murmur_pch.h index ce83046cf..eb2405e94 100644 --- a/src/murmur/murmur_pch.h +++ b/src/murmur/murmur_pch.h @@ -7,21 +7,21 @@ #ifndef MUMBLE_MURMUR_MURMUR_PCH_H_ #define MUMBLE_MURMUR_MURMUR_PCH_H_ -#define WIN32_LEAN_AND_MEAN +#ifdef _MSC_VER +# define _USE_MATH_DEFINES +#endif -#define _USE_MATH_DEFINES +#include <QtCore/QtGlobal> -#ifdef __APPLE__ -#include <CoreFoundation/CoreFoundation.h> -#include <CoreServices/CoreServices.h> -#undef check -#undef TYPE_BOOL +#ifdef Q_OS_WIN +# include "win.h" #endif -#ifdef __MINGW32__ -#define _WIN32_WINNT 0x0600 -#include <ws2tcpip.h> -#include <mswsock.h> +#ifdef __APPLE__ +# include <CoreFoundation/CoreFoundation.h> +# include <CoreServices/CoreServices.h> +# undef check +# undef TYPE_BOOL #endif #include <QtCore/QtCore> @@ -29,72 +29,60 @@ #include <QtSql/QtSql> #include <QtXml/QtXml> #ifdef USE_DBUS -#include <QtDBus/QtDBus> +# include <QtDBus/QtDBus> #endif #include "QAtomicIntCompat.h" #ifdef Q_OS_WIN -#include <QtGui/QtGui> -#if QT_VERSION >= 0x050000 -# include "Qt4Compat.h" -# include <QtWidgets/QtWidgets> -#endif - -#include "../qos2_mingw.h" - -#include <winsock2.h> -#include <qos2.h> -#include <windows.h> -#include <shellapi.h> -#include <delayimp.h> +# include <QtGui/QtGui> +# if QT_VERSION >= 0x050000 +# include "Qt4Compat.h" +# include <QtWidgets/QtWidgets> +# endif + +# include <ws2tcpip.h> +# include <qos2.h> +# include <shellapi.h> +# include <delayimp.h> extern "C" { void __cpuid(int a[4], int b); }; #endif #ifdef Q_OS_UNIX -#include <stdio.h> -#include <stdlib.h> -#include <unistd.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <sys/types.h> -#include <sys/socket.h> -#include <sys/time.h> -#include <sys/resource.h> -#include <syslog.h> -#ifdef Q_OS_LINUX -#include <linux/types.h> // needed to work around evil magic stuff in capability.h -#include <sys/capability.h> -#include <sys/prctl.h> -#endif -#include <pwd.h> -#include <grp.h> -#if defined __FreeBSD__ || defined __OpenBSD__ -#include <netinet/in_systm.h> -#endif -#include <netinet/in.h> -#include <netinet/ip.h> -#include <errno.h> -#include <signal.h> -#include <poll.h> -#define INVALID_SOCKET -1 -#define SOCKET_ERROR -1 -#ifdef Q_OS_DARWIN -#include <poll.h> +# include <stdio.h> +# include <stdlib.h> +# include <unistd.h> +# include <sys/types.h> +# include <sys/stat.h> +# include <fcntl.h> +# include <sys/types.h> +# include <sys/socket.h> +# include <sys/time.h> +# include <sys/resource.h> +# include <syslog.h> +# ifdef Q_OS_LINUX +# include <linux/types.h> // needed to work around evil magic stuff in capability.h +# include <sys/capability.h> +# include <sys/prctl.h> +# endif +# include <pwd.h> +# include <grp.h> +# if defined __FreeBSD__ || defined __OpenBSD__ +# include <netinet/in_systm.h> +# endif +# include <netinet/in.h> +# include <netinet/ip.h> +# include <errno.h> +# include <signal.h> +# include <poll.h> +# ifdef Q_OS_DARWIN +# include <poll.h> +# endif #endif -#endif - -#include <math.h> -#if defined (Q_OS_WIN) -#define snprintf ::_snprintf -#define STACKVAR(type, varname, count) type *varname=reinterpret_cast<type *>(_alloca(sizeof(type) * (count))) -#else -#define STACKVAR(type, varname, count) type varname[count] -#endif +#include <cmath> #include <boost/function.hpp> #include <boost/bind.hpp> @@ -102,7 +90,7 @@ extern "C" { #include <boost/weak_ptr.hpp> #ifdef USE_BONJOUR -#include <dns_sd.h> +# include <dns_sd.h> #endif #include <openssl/opensslv.h> |