_ISOC99_SOURCE is a libc macro, we now use WZ_C99 instead (which gets defined via __STDC_VERSION__)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1749 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
e3c15e4a23
commit
58e8bda3a9
|
@ -72,7 +72,7 @@ typedef struct
|
|||
#endif /* !WZ_OS_WIN */
|
||||
|
||||
// If we are C99 compatible, the "bool" macro will be defined in <stdbool.h> (as _Bool)
|
||||
#if defined(_ISOC99_SOURCE)
|
||||
#if defined(WZ_C99)
|
||||
# include <stdbool.h>
|
||||
#else
|
||||
// Pretend we are C99 compatible (well, for the bool type then)
|
||||
|
@ -88,7 +88,7 @@ typedef struct
|
|||
# ifndef __bool_true_false_are_defined
|
||||
# define __bool_true_false_are_defined (1)
|
||||
# endif
|
||||
#endif
|
||||
#endif /* WZ_C99 */
|
||||
|
||||
/* Numeric size defines */
|
||||
#define UBYTE_MAX 0xff
|
||||
|
|
|
@ -122,6 +122,17 @@
|
|||
#endif /* WZ_CC_x */
|
||||
|
||||
|
||||
/*
|
||||
The supported C standard, must be one of: (WZ_Cxx)
|
||||
|
||||
99 - ISO/IEC 9899:1999 / C99
|
||||
|
||||
*/
|
||||
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
# define WZ_C99
|
||||
#endif /* WZ_Cxx */
|
||||
|
||||
|
||||
/**
|
||||
* \def WZ_DECL_DEPRECATED
|
||||
*
|
||||
|
|
|
@ -213,9 +213,9 @@ soundDataBuffer* sound_DecodeOggVorbis(struct OggVorbisDecoderState* decoder, si
|
|||
return NULL;
|
||||
}
|
||||
|
||||
#if !defined(_ISOC99_SOURCE)
|
||||
#if !defined(WZ_C99)
|
||||
buffer->data = (char*)(buffer + 1);
|
||||
#endif
|
||||
#endif /* WZ_C99 */
|
||||
buffer->bufferSize = bufferSize;
|
||||
buffer->bitsPerSample = 16;
|
||||
buffer->channelCount = decoder->VorbisInfo->channels;
|
||||
|
|
|
@ -37,11 +37,11 @@ typedef struct
|
|||
unsigned int frequency;
|
||||
|
||||
// the raw PCM data
|
||||
#if defined(_ISOC99_SOURCE)
|
||||
#if defined(WZ_C99)
|
||||
char data[];
|
||||
#else
|
||||
char* data;
|
||||
#endif
|
||||
#endif /* WZ_C99 */
|
||||
} soundDataBuffer;
|
||||
|
||||
// Forward declaration so we can take pointers to this type
|
||||
|
|
Loading…
Reference in New Issue