diff options
Diffstat (limited to 'src/lib/libast/features/standards')
-rw-r--r-- | src/lib/libast/features/standards | 153 |
1 files changed, 153 insertions, 0 deletions
diff --git a/src/lib/libast/features/standards b/src/lib/libast/features/standards new file mode 100644 index 0000000..adee277 --- /dev/null +++ b/src/lib/libast/features/standards @@ -0,0 +1,153 @@ +set stdio +if tst note{ _ALL_SOURCE & _ISOC99_SOURCE & _POSIX_SOURCE & _POSIX_C_SOURCE & _XOPEN_SOURCE & __EXTENSIONS__ works }end compile{ + #define _ALL_SOURCE 1 + #define _ISOC99_SOURCE 1 + #define _POSIX_SOURCE 1 + #define _POSIX_C_SOURCE 21000101L + #define _XOPEN_SOURCE 9900 + #define _GNU_SOURCE 1 + #define __EXTENSIONS__ 1 + #include <sys/types.h> + #include <sys/stat.h> + #include <stdlib.h> + #include <unistd.h> + }end { + #ifndef _ALL_SOURCE + #define _ALL_SOURCE 1 + #endif + #ifndef _ISOC99_SOURCE + #define _ISOC99_SOURCE 1 + #endif + #ifndef _POSIX_SOURCE + #define _POSIX_SOURCE 1 + #endif + #ifndef _POSIX_C_SOURCE + #define _POSIX_C_SOURCE 21000101L + #endif + #ifndef _XOPEN_SOURCE + #define _XOPEN_SOURCE 9900 + #endif + #ifndef _GNU_SOURCE + #define _GNU_SOURCE 1 + #endif + #ifndef __EXTENSIONS__ + #define __EXTENSIONS__ 1 + #endif + } +elif tst note{ _ALL_SOURCE & _ISOC99_SOURCE & _POSIX_SOURCE & _XOPEN_SOURCE & __EXTENSIONS__ works }end compile{ + #define _ALL_SOURCE 1 + #define _ISOC99_SOURCE 1 + #define _POSIX_SOURCE 1 + #define _XOPEN_SOURCE 9900 + #define _GNU_SOURCE 1 + #define __EXTENSIONS__ 1 + #include <sys/types.h> + #include <sys/stat.h> + #include <stdlib.h> + #include <unistd.h> + }end { + #ifndef _ALL_SOURCE + #define _ALL_SOURCE 1 + #endif + #ifndef _ISOC99_SOURCE + #define _ISOC99_SOURCE 1 + #endif + #ifndef _POSIX_SOURCE + #define _POSIX_SOURCE 1 + #endif + #ifndef _XOPEN_SOURCE + #define _XOPEN_SOURCE 9900 + #endif + #ifndef _GNU_SOURCE + #define _GNU_SOURCE 1 + #endif + #ifndef __EXTENSIONS__ + #define __EXTENSIONS__ 1 + #endif + } +elif tst note{ _ISOC99_SOURCE & _POSIX_SOURCE & _POSIX_C_SOURCE & _XOPEN_SOURCE & __EXTENSIONS__ works }end compile{ + #define _ISOC99_SOURCE 1 + #define _POSIX_SOURCE 1 + #define _POSIX_C_SOURCE 21000101L + #define _XOPEN_SOURCE 9900 + #define _GNU_SOURCE 1 + #define __EXTENSIONS__ 1 + #include <sys/types.h> + #include <sys/stat.h> + #include <stdlib.h> + #include <unistd.h> + }end { + #ifndef _ISOC99_SOURCE + #define _ISOC99_SOURCE 1 + #endif + #ifndef _POSIX_SOURCE + #define _POSIX_SOURCE 1 + #endif + #ifndef _POSIX_C_SOURCE + #define _POSIX_C_SOURCE 21000101L + #endif + #ifndef _XOPEN_SOURCE + #define _XOPEN_SOURCE 9900 + #endif + #ifndef _GNU_SOURCE + #define _GNU_SOURCE 1 + #endif + #ifndef __EXTENSIONS__ + #define __EXTENSIONS__ 1 + #endif + } +elif tst note{ _POSIX_SOURCE & _XOPEN_SOURCE & __EXTENSIONS__ works }end compile{ + #define _POSIX_SOURCE 1 + #define _XOPEN_SOURCE 1 + #define __EXTENSIONS__ 1 + #include <sys/types.h> + #include <sys/stat.h> + #include <stdlib.h> + #include <unistd.h> + }end { + #ifndef _POSIX_SOURCE + #define _POSIX_SOURCE 1 + #endif + #ifndef _XOPEN_SOURCE + #define _XOPEN_SOURCE 1 + #endif + #ifndef __EXTENSIONS__ + #define __EXTENSIONS__ 1 + #endif + } +elif tst note{ _XOPEN_SOURCE & __EXTENSIONS__ works }end compile{ + #define _XOPEN_SOURCE 1 + #define __EXTENSIONS__ 1 + #include <sys/types.h> + #include <sys/stat.h> + #include <stdlib.h> + #include <unistd.h> + }end { + #ifndef _XOPEN_SOURCE + #define _XOPEN_SOURCE 1 + #endif + #ifndef __EXTENSIONS__ + #define __EXTENSIONS__ 1 + #endif + } +elif tst note{ _XOPEN_SOURCE works }end compile{ + #define _XOPEN_SOURCE 1 + #include <sys/types.h> + #include <sys/stat.h> + #include <stdlib.h> + #include <unistd.h> + }end { + #ifndef _XOPEN_SOURCE + #define _XOPEN_SOURCE 1 + #endif + } +else tst note{ __EXTENSIONS__ works }end compile{ + #define __EXTENSIONS__ 1 + #include <sys/types.h> + #include <sys/stat.h> + }end { + #ifndef __EXTENSIONS__ + #define __EXTENSIONS__ 1 + #endif + } +endif |