Forráskód Böngészése

Fixed missing defines.

Branimir Karadzic 11 éve
szülő
commit
3f19e754b9

+ 3 - 3
3rdparty/glsl-optimizer/include/c99_compat.h

@@ -101,7 +101,7 @@
 #    define inline __inline
 #    define inline __inline
 #  elif defined(__SUNPRO_C) && defined(__C99FEATURES__)
 #  elif defined(__SUNPRO_C) && defined(__C99FEATURES__)
      /* C99 supports inline keyword */
      /* C99 supports inline keyword */
-#  elif (__STDC_VERSION__ >= 199901L)
+#  elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
      /* C99 supports inline keyword */
      /* C99 supports inline keyword */
 #  else
 #  else
 #    define inline
 #    define inline
@@ -116,7 +116,7 @@
  * - http://cellperformance.beyond3d.com/articles/2006/05/demystifying-the-restrict-keyword.html
  * - http://cellperformance.beyond3d.com/articles/2006/05/demystifying-the-restrict-keyword.html
  */
  */
 #ifndef restrict
 #ifndef restrict
-#  if (__STDC_VERSION__ >= 199901L)
+#  if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
      /* C99 */
      /* C99 */
 #  elif defined(__SUNPRO_C) && defined(__C99FEATURES__)
 #  elif defined(__SUNPRO_C) && defined(__C99FEATURES__)
      /* C99 */
      /* C99 */
@@ -134,7 +134,7 @@
  * C99 __func__ macro
  * C99 __func__ macro
  */
  */
 #ifndef __func__
 #ifndef __func__
-#  if (__STDC_VERSION__ >= 199901L)
+#  if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
      /* C99 */
      /* C99 */
 #  elif defined(__SUNPRO_C) && defined(__C99FEATURES__)
 #  elif defined(__SUNPRO_C) && defined(__C99FEATURES__)
      /* C99 */
      /* C99 */

+ 1 - 1
3rdparty/glsl-optimizer/src/glsl/ir_print_glsl_visitor.cpp

@@ -1200,7 +1200,7 @@ static void print_float (string_buffer& buffer, float f)
 	if (!posE)
 	if (!posE)
 		posE = strchr(tmp, 'E');
 		posE = strchr(tmp, 'E');
 
 
-	#if _MSC_VER
+	#if defined(_MSC_VER)
 	// While gcc would print something like 1.0e+07, MSVC will print 1.0e+007 -
 	// While gcc would print something like 1.0e+07, MSVC will print 1.0e+007 -
 	// only for exponential notation, it seems, will add one extra useless zero. Let's try to remove
 	// only for exponential notation, it seems, will add one extra useless zero. Let's try to remove
 	// that so compiler output matches.
 	// that so compiler output matches.

+ 1 - 1
3rdparty/glsl-optimizer/src/glsl/strtod.c

@@ -71,7 +71,7 @@ glsl_strtof(const char *s, char **end)
       loc = newlocale(LC_CTYPE_MASK, "C", NULL);
       loc = newlocale(LC_CTYPE_MASK, "C", NULL);
    }
    }
    return strtof_l(s, end, loc);
    return strtof_l(s, end, loc);
-#elif _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE
+#elif (defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 600)) || (defined(_ISOC99_SOURCE) && _ISOC99_SOURCE)
    return strtof(s, end);
    return strtof(s, end);
 #else
 #else
    return (float) strtod(s, end);
    return (float) strtod(s, end);

+ 1 - 0
premake/shaderc.lua

@@ -59,6 +59,7 @@ project "shaderc"
 		"NINCLUDE=64",
 		"NINCLUDE=64",
 		"NWORK=65536",
 		"NWORK=65536",
 		"NBUFF=65536",
 		"NBUFF=65536",
+		"OLD_PREPROCESSOR=0",
 	}
 	}
 
 
 	includedirs {
 	includedirs {