Update operating system detection for condition compilation.
authorKevin M. Rosenberg <kevin@rosenberg.net>
Wed, 8 May 2013 03:22:54 +0000 (21:22 -0600)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Wed, 8 May 2013 03:22:54 +0000 (21:22 -0600)
wdq2wav.cpp
wdq2wav.h

index 5c35d4c24620bf5182804ce7816596defe76aace..be084f8bfb91d39b164b9de0664870c3bdf99234 100644 (file)
@@ -806,10 +806,10 @@ WavFile::WriteFile ()
   return true;
 }
 
-#ifdef WIN32
+#ifdef _WIN32
 #include <windows.h>
 #include <mmsystem.h>
-#elif defined(LINUX)
+#elif defined(__linux__)
 #include <sys/ioctl.h>
 #include <sys/soundcard.h>
 #endif
@@ -817,10 +817,10 @@ WavFile::WriteFile ()
 bool
 WavFile::Play ()
 {
-#ifdef WIN32
+#ifdef _WIN32
   if (PlaySound ((LPCSTR) m_data, 0, SND_MEMORY | SND_NODEFAULT))
     return true;
-#elif defined(LINUX)
+#elif defined(__linux__)
   int fd;
   if ((fd = open ("/dev/dsp",O_WRONLY)) == -1) {
     error_msg ("Error opening /dev/dsp");
index 6e740f4e772d7a8b5f7db22b0865764a0bf27b7b..a5e5ad2d2c33d00e6751dc90bc635666737aa8dd 100644 (file)
--- a/wdq2wav.h
+++ b/wdq2wav.h
 #include <math.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#ifdef WIN32
+#ifdef _WIN32
 #include <io.h>
 #include <getopt.h>
 #else
 #include <unistd.h>
 #endif
 
-#ifdef LINUX
+#ifdef __linux__
 #include <endian.h>
 #if __BYTE_ORDER == __BIG_ENDIAN
 #define WORDS_BIG_ENDIAN 1