Use OS preprocessor checks with '#if defined()' consistently.

Avoids undefined preprocessor directives warnings.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28399 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
diego 2009-01-30 23:29:39 +00:00
parent 9133dff0b2
commit f64d639d2b
2 changed files with 10 additions and 20 deletions

View File

@ -18,27 +18,17 @@ CpuCaps gCpuCaps;
#include <sys/param.h> #include <sys/param.h>
#include <sys/sysctl.h> #include <sys/sysctl.h>
#include <machine/cpu.h> #include <machine/cpu.h>
#endif #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) || defined(__APPLE__)
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) || defined(__APPLE__)
#include <sys/types.h> #include <sys/types.h>
#include <sys/sysctl.h> #include <sys/sysctl.h>
#endif #elif defined(__linux__)
#ifdef __linux__
#include <signal.h> #include <signal.h>
#endif #elif defined(__MINGW32__) || defined(__CYGWIN__)
#if defined(__MINGW32__) || defined(__CYGWIN__)
#include <windows.h> #include <windows.h>
#endif #elif defined(__OS2__)
#ifdef __OS2__
#define INCL_DOS #define INCL_DOS
#include <os2.h> #include <os2.h>
#endif #elif defined(__AMIGAOS4__)
#ifdef __AMIGAOS4__
#include <proto/exec.h> #include <proto/exec.h>
#endif #endif
@ -475,7 +465,7 @@ static void check_os_katmai_support( void )
#ifdef __APPLE__ #ifdef __APPLE__
#include <sys/sysctl.h> #include <sys/sysctl.h>
#elif __AMIGAOS4__ #elif defined(__AMIGAOS4__)
/* nothing */ /* nothing */
#else #else
#include <signal.h> #include <signal.h>
@ -529,7 +519,7 @@ void GetCpuCaps( CpuCaps *caps)
if (has_vu != 0) if (has_vu != 0)
caps->hasAltiVec = 1; caps->hasAltiVec = 1;
} }
#elif __AMIGAOS4__ #elif defined(__AMIGAOS4__)
ULONG result = 0; ULONG result = 0;
GetCPUInfoTags(GCIT_VectorUnit, &result, TAG_DONE); GetCPUInfoTags(GCIT_VectorUnit, &result, TAG_DONE);

View File

@ -18,12 +18,12 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
#elif __MINGW32__ #elif defined(__MINGW32__)
#include <windows.h> #include <windows.h>
#elif __CYGWIN__ #elif defined(__CYGWIN__)
#include <windows.h> #include <windows.h>
#include <sys/cygwin.h> #include <sys/cygwin.h>
#elif __OS2__ #elif defined(__OS2__)
#define INCL_DOS #define INCL_DOS
#include <os2.h> #include <os2.h>
#endif #endif