From ac54ab8a3e91615e8b5b7b7cd3999abc5b41960c Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 14 Apr 2020 18:19:59 -0700 Subject: Remove some unnecessary cmake checks --- alc/helpers.cpp | 39 +++++++++++++++------------------------ 1 file changed, 15 insertions(+), 24 deletions(-) (limited to 'alc/helpers.cpp') diff --git a/alc/helpers.cpp b/alc/helpers.cpp index aa9ca7ae..2aee6a2d 100644 --- a/alc/helpers.cpp +++ b/alc/helpers.cpp @@ -18,6 +18,9 @@ * Or go to http://www.gnu.org/copyleft/lgpl.html */ +/* Define this first since Windows' system headers may include headers affected + * by it (is it even still needed?). + */ #ifdef _WIN32 #ifdef __MINGW32__ #define _WIN32_IE 0x501 @@ -37,28 +40,6 @@ #include #include -#ifdef HAVE_DIRENT_H -#include -#endif -#ifdef HAVE_SYS_SYSCONF_H -#include -#endif - -#ifdef HAVE_PROC_PIDPATH -#include -#endif - -#ifdef __FreeBSD__ -#include -#include -#endif - -#ifndef _WIN32 -#include -#elif defined(_WIN32_IE) -#include -#endif - #include "alcmain.h" #include "almalloc.h" #include "alfstream.h" @@ -72,6 +53,8 @@ #ifdef _WIN32 +#include + const PathNamePair &GetProcBinary() { static PathNamePair ret; @@ -240,6 +223,15 @@ void SetRTPriority(void) #else +#include +#include +#include +#ifdef __FreeBSD__ +#include +#endif +#ifdef HAVE_PROC_PIDPATH +#include +#endif #if defined(HAVE_PTHREAD_SETSCHEDPARAM) && !defined(__OpenBSD__) #include #include @@ -327,8 +319,7 @@ const PathNamePair &GetProcBinary() void al_print(FILE *logfile, const char *fmt, ...) { - va_list ap; - + std::va_list ap; va_start(ap, fmt); vfprintf(logfile, fmt, ap); va_end(ap); -- cgit v1.2.3