From 2382038f343fdd56e8ba0a26be8e93f30aed048d Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 16 Oct 2015 01:03:11 +0200 Subject: C89 == C90 == ANSI C == Standard C MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- doc/info/chap/introduction.texinfo | 10 +++++++++- include/slibc/c-version.h | 17 +++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/doc/info/chap/introduction.texinfo b/doc/info/chap/introduction.texinfo index 21982f6..2f3c2f5 100644 --- a/doc/info/chap/introduction.texinfo +++ b/doc/info/chap/introduction.texinfo @@ -257,14 +257,22 @@ defines for header files and functions are disabled. macros defined by other projects. @table @code -@item _ISOC90_SOURCE +@item _ISOC89_SOURCE +@itemx _ISOC90_SOURCE @cpindex @sc{ISO}@tie{}C @cpindex C90 +@cpindex C89 +@cpindex @sc{ANSI}@tie{}C @lvindex _ISOC90_SOURCE +@lvindex _ISOC89_SOURCE Enables functionality from the @sc{ISO}@tie{}C90 standard, even if the program is not compiled with C90. +Note, @sc{ISO}@tie{}C89, @sc{ISO}@tie{}C90, +@sc{ANSI}@tie{}C and Standard C, all refer to +the same standard. + @item _ISOC99_SOURCE @cpindex @sc{ISO}@tie{}C @cpindex C99 diff --git a/include/slibc/c-version.h b/include/slibc/c-version.h index 635ddb4..0cd5c3e 100644 --- a/include/slibc/c-version.h +++ b/include/slibc/c-version.h @@ -79,3 +79,20 @@ # endif #endif +/** + * C89, C90, ANSI C and Standard C are all the + * same standard. + */ +#if defined(__C89__) && !defined(__C90__) +# define __C90__ +#endif +#if defined(__C90__) && !defined(__C89__) +# define __C89__ +#endif +#if defined(__ISOC89_SOURCE) && !defined(__ISOC90_SOURCE) +# define __ISOC90_SOURCE +#endif +#if defined(__ISOC90_SOURCE) && !defined(__ISOC89_SOURCE) +# define __ISOC89_SOURCE +#endif + -- cgit v1.2.3-70-g09d2