]> git.mxchange.org Git - simgear.git/blobdiff - XGL/xglUtils.c
Cygnus tools compatibility tweaks.
[simgear.git] / XGL / xglUtils.c
index 6be1e6fa7dafa1411bbac52325748b692f3e2ef7..971c353b4d9ec0edbb9d2308c0f2bd718043480e 100644 (file)
@@ -1,17 +1,23 @@
 
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 
-#ifndef __CYGWIN32__
-#  include <malloc.h>
+#if !defined( __CYGWIN__ ) && !defined( __CYGWIN32__ )
+#  if !defined( HAVE_STL_SGI_PORT )    // Avoid malloc with STLport
+#    include <malloc.h>
+#  endif
 #endif
 
-#ifdef WIN32
-#  include <windows.h>
-#else
+#ifdef HAVE_UNISTD_H
 #  include <unistd.h>
 #endif
 
+
 #include "xgl.h"
 
 #ifndef TRUE
 #endif
 
 int   xglTraceOn = TRUE ;
-#ifndef __CYGWIN32__
+
+#ifndef WIN32
     FILE *xglTraceFd = stdout ;
-#else /* __CYGWIN32__ */
+#else /* WIN32 */
     /* Bail for now, we just want it to compile I guess */
     FILE *xglTraceFd = NULL;
-#endif /* __CYGWIN32 */
+#endif /* WIN32 */
 
 struct GLenumLookup
 {