Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorvald Natvig <slicer@users.sourceforge.net>2009-02-23 16:54:11 +0300
committerThorvald Natvig <slicer@users.sourceforge.net>2009-02-23 16:54:11 +0300
commit7041b3fd02a798f71bf7646dcb11c51c1b962a7f (patch)
tree1b6eb8a91b5cdb2d3969c80e7a2c87eb357ecb3c
parent39c8094b992ed2731968e7e10f4bda9005592858 (diff)
murmur_pch.h cleanup [lewellyn]
git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@1574 05730e5d-ab1b-0410-a4ac-84af385074fa
-rw-r--r--src/murmur/Register.cpp2
-rw-r--r--src/murmur/UnixMurmur.cpp2
-rw-r--r--src/murmur/main.cpp5
-rw-r--r--src/murmur/murmur_pch.h25
4 files changed, 16 insertions, 18 deletions
diff --git a/src/murmur/Register.cpp b/src/murmur/Register.cpp
index 1d4f04244..732b5f351 100644
--- a/src/murmur/Register.cpp
+++ b/src/murmur/Register.cpp
@@ -28,8 +28,6 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <QtXml>
-
#include "Server.h"
#include "Meta.h"
#include "Version.h"
diff --git a/src/murmur/UnixMurmur.cpp b/src/murmur/UnixMurmur.cpp
index 495338528..a99b98885 100644
--- a/src/murmur/UnixMurmur.cpp
+++ b/src/murmur/UnixMurmur.cpp
@@ -28,8 +28,6 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <signal.h>
-
#include "murmur_pch.h"
#include "UnixMurmur.h"
#include "Meta.h"
diff --git a/src/murmur/main.cpp b/src/murmur/main.cpp
index af1544001..9727bb41e 100644
--- a/src/murmur/main.cpp
+++ b/src/murmur/main.cpp
@@ -42,11 +42,6 @@
#ifdef Q_OS_UNIX
#include "UnixMurmur.h"
-#include <stdio.h>
-#endif
-
-#ifdef Q_OS_WIN
-#include <intrin.h>
#endif
QFile *qfLog = NULL;
diff --git a/src/murmur/murmur_pch.h b/src/murmur/murmur_pch.h
index 72abaf691..b83cacd54 100644
--- a/src/murmur/murmur_pch.h
+++ b/src/murmur/murmur_pch.h
@@ -1,6 +1,7 @@
#ifndef _MURMUR_PCH_H
#define _MURMUR_PCH_H
+#define _USE_MATH_DEFINES
#if defined(__INTEL_COMPILER)
#include <mathimf.h>
#endif
@@ -9,18 +10,18 @@
#include <QtNetwork/QtNetwork>
#include <QtSql/QtSql>
#include <QtXml/QtXml>
+#ifdef USE_DBUS
#include <QtDBus/QtDBus>
-#ifdef Q_OS_WIN
-#include <QtGui/QtGui>
#endif
#ifdef Q_OS_WIN
+#include <QtGui/QtGui>
#include <winsock2.h>
#include <windows.h>
#include <shellapi.h>
+#include <intrin.h>
#endif
-
#include <openssl/aes.h>
#include <openssl/rand.h>
#include <openssl/pem.h>
@@ -28,6 +29,8 @@
#include <openssl/x509v3.h>
#ifdef Q_OS_UNIX
+#include <stdio.h>
+#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -40,6 +43,7 @@
#include <netinet/in.h>
#include <netinet/ip.h>
#include <errno.h>
+#include <signal.h>
#define INVALID_SOCKET -1
#define SOCKET_ERROR -1
#ifdef Q_OS_DARWIN
@@ -47,18 +51,21 @@
#endif
#endif
-#ifdef Q_OS_WIN
-#ifndef Q_CC_INTEL
+#if !defined (Q_CC_INTEL) && !defined (Q_OS_WIN)
#include <math.h>
-#define lroundf(x) ( static_cast<int>( (x) + ((x) >= 0 ? 0.5 : -0.5) ) )
#endif
-#define M_PI 3.14159265358979323846
+#if defined (Q_OS_WIN) && (defined (Q_CC_INTEL) || defined (Q_CC_MSVC))
+#define lroundf(x) ( static_cast<int>( (x) + ((x) >= 0 ? 0.5 : -0.5) ) )
#define ALLOCA(x) _alloca(x)
-#define STACKVAR(type, varname, count) type *varname=reinterpret_cast<type *>(ALLOCA(sizeof(type) * (count)))
#define snprintf ::_snprintf
#else
-#include <math.h>
+#include <alloca.h>
+#define ALLOCA(x) alloca(x)
+#endif
+#if defined (Q_CC_GNU) || (defined (Q_CC_INTEL) && !defined (Q_OS_WIN))
#define STACKVAR(type, varname, count) type varname[count]
+#else
+#define STACKVAR(type, varname, count) type *varname=reinterpret_cast<type *>(ALLOCA(sizeof(type) * (count)))
#endif
#ifdef USE_ICE