Fixed missing defines.

This commit is contained in:
Branimir Karadzic 2014-08-22 09:53:14 -07:00
parent c889ebc231
commit 3f19e754b9
4 changed files with 6 additions and 5 deletions

View file

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

View file

@ -1200,7 +1200,7 @@ static void print_float (string_buffer& buffer, float f)
if (!posE)
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 -
// only for exponential notation, it seems, will add one extra useless zero. Let's try to remove
// that so compiler output matches.

View file

@ -71,7 +71,7 @@ glsl_strtof(const char *s, char **end)
loc = newlocale(LC_CTYPE_MASK, "C", NULL);
}
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);
#else
return (float) strtod(s, end);

View file

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