__STDC__ is always defined in C89.

This commit is contained in:
Adam Jackson 2009-06-12 12:39:06 -04:00
parent bab9c572cd
commit 74d18e89a3
2 changed files with 1 additions and 19 deletions

11
Xmd.h
View file

@ -91,7 +91,7 @@ SOFTWARE.
* The extra indirection in the __STDC__ case is to get macro arguments to
* expand correctly before the concatenation, rather than afterward.
*/
#if ((defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)) && !defined(UNIXCPP)) || defined(ANSICPP)
#if !defined(UNIXCPP) || defined(ANSICPP)
#define _SIZEOF(x) sz_##x
#define SIZEOF(x) _SIZEOF(x)
#else
@ -112,13 +112,8 @@ typedef unsigned long CARD64;
typedef unsigned int INT32;
typedef unsigned int INT16;
#else
#ifdef __STDC__
typedef signed int INT32;
typedef signed int INT16;
#else
typedef int INT32;
typedef int INT16;
#endif
#endif
#else
#define B32
@ -132,11 +127,7 @@ typedef long INT32;
typedef short INT16;
#endif
#if defined(__STDC__)
typedef signed char INT8;
#else
typedef char INT8;
#endif
#ifdef LONG64
typedef unsigned long CARD64;

9
Xos.h
View file

@ -73,21 +73,12 @@ in this Software without prior written authorization from The Open Group.
#if (defined(sun) && defined(__SVR4))
#include <strings.h>
#endif
#ifdef __STDC__
#ifndef index
#define index(s,c) (strchr((s),(c)))
#endif
#ifndef rindex
#define rindex(s,c) (strrchr((s),(c)))
#endif
#else
#ifndef index
#define index strchr
#endif
#ifndef rindex
#define rindex strrchr
#endif
#endif
#endif
#else