*-*-cygwin* | *-*-mingw32*)
dnl CygWin under Windoze.
- LIBS="$LIBS -lopenal32 -lwinmm -ldsound -ldxguid -lole32"
+ LIBS="$LIBS -lalut -lopenal32 -lwinmm -ldsound -ldxguid -lole32"
;;
*-apple-darwin*)
#endif // __GNUC__
-#if defined( __MINGW32__ )
-# define bcopy(from, to, n) memcpy(to, from, n)
-# define FG_MEM_COPY(to,from,n) memcpy(to, from, n)
-# define isnan _isnan
-# define snprintf _snprintf
-#endif
-
/* KAI C++ */
#if defined(__KCC)
#include "cloud.hxx"
+#if defined(_MSC_VER) || defined(__MINGW32__)
+#define isnan(x) _isnan(x)
+#endif
+
static ssgStateSelector *layer_states[SGCloudLayer::SG_MAX_CLOUD_COVERAGES];
static bool state_initialized = false;
#include <stdio.h>
+
+#ifdef __MINGW32__
+// This is broken, but allows the file to compile without a POSIX
+// environment.
+static unsigned int sleep(unsigned int secs) { return 0; }
+#else
#include <unistd.h> // sleep()
+#endif
#if defined( __APPLE__ )
# define AL_ILLEGAL_ENUM AL_INVALID_ENUM
#include <stdio.h>
+#ifdef __MINGW32__
+// This is broken, but allows the file to compile without a POSIX
+// environment.
+static unsigned int sleep(unsigned int secs) { return 0; }
+#else
#include <unistd.h> // sleep()
+#endif
#include "sample_openal.hxx"
#include "soundmgr_openal.hxx"
#include STL_STRING
+#include <simgear/debug/logstream.hxx>
+
+#include <plib/sg.h>
+
#if defined(__APPLE__)
# define AL_ILLEGAL_ENUM AL_INVALID_ENUM
# define AL_ILLEGAL_COMMAND AL_INVALID_OPERATION
# include <AL/alut.h>
#endif
-#include <plib/sg.h>
-
-#include <simgear/debug/logstream.hxx>
-
SG_USING_STD(string);
-
/**
* manages everything we need to know for an individual sound sample
*/