1*34f9b3eeSRoland Mainzset stdio 2da2e3ebdSchinif tst note{ _ALL_SOURCE & _ISOC99_SOURCE & _POSIX_SOURCE & _POSIX_C_SOURCE & _XOPEN_SOURCE & __EXTENSIONS__ works }end compile{ 3da2e3ebdSchin #define _ALL_SOURCE 1 4da2e3ebdSchin #define _ISOC99_SOURCE 1 5da2e3ebdSchin #define _POSIX_SOURCE 1 6da2e3ebdSchin #define _POSIX_C_SOURCE 21000101L 7da2e3ebdSchin #define _XOPEN_SOURCE 9900 8da2e3ebdSchin #define _GNU_SOURCE 1 9da2e3ebdSchin #define __EXTENSIONS__ 1 10da2e3ebdSchin #include <sys/types.h> 11da2e3ebdSchin #include <sys/stat.h> 12da2e3ebdSchin #include <stdlib.h> 13da2e3ebdSchin #include <unistd.h> 14da2e3ebdSchin }end { 15da2e3ebdSchin #ifndef _ALL_SOURCE 16da2e3ebdSchin #define _ALL_SOURCE 1 17da2e3ebdSchin #endif 18da2e3ebdSchin #ifndef _ISOC99_SOURCE 19da2e3ebdSchin #define _ISOC99_SOURCE 1 20da2e3ebdSchin #endif 21da2e3ebdSchin #ifndef _POSIX_SOURCE 22da2e3ebdSchin #define _POSIX_SOURCE 1 23da2e3ebdSchin #endif 24da2e3ebdSchin #ifndef _POSIX_C_SOURCE 25da2e3ebdSchin #define _POSIX_C_SOURCE 21000101L 26da2e3ebdSchin #endif 27da2e3ebdSchin #ifndef _XOPEN_SOURCE 28da2e3ebdSchin #define _XOPEN_SOURCE 9900 29da2e3ebdSchin #endif 30da2e3ebdSchin #ifndef _GNU_SOURCE 31da2e3ebdSchin #define _GNU_SOURCE 1 32da2e3ebdSchin #endif 33da2e3ebdSchin #ifndef __EXTENSIONS__ 34da2e3ebdSchin #define __EXTENSIONS__ 1 35da2e3ebdSchin #endif 36da2e3ebdSchin } 37*34f9b3eeSRoland Mainzelif tst note{ _ALL_SOURCE & _ISOC99_SOURCE & _POSIX_SOURCE & _XOPEN_SOURCE & __EXTENSIONS__ works }end compile{ 38*34f9b3eeSRoland Mainz #define _ALL_SOURCE 1 39*34f9b3eeSRoland Mainz #define _ISOC99_SOURCE 1 40*34f9b3eeSRoland Mainz #define _POSIX_SOURCE 1 41*34f9b3eeSRoland Mainz #define _XOPEN_SOURCE 9900 42*34f9b3eeSRoland Mainz #define _GNU_SOURCE 1 43*34f9b3eeSRoland Mainz #define __EXTENSIONS__ 1 44*34f9b3eeSRoland Mainz #include <sys/types.h> 45*34f9b3eeSRoland Mainz #include <sys/stat.h> 46*34f9b3eeSRoland Mainz #include <stdlib.h> 47*34f9b3eeSRoland Mainz #include <unistd.h> 48*34f9b3eeSRoland Mainz }end { 49*34f9b3eeSRoland Mainz #ifndef _ALL_SOURCE 50*34f9b3eeSRoland Mainz #define _ALL_SOURCE 1 51*34f9b3eeSRoland Mainz #endif 52*34f9b3eeSRoland Mainz #ifndef _ISOC99_SOURCE 53*34f9b3eeSRoland Mainz #define _ISOC99_SOURCE 1 54*34f9b3eeSRoland Mainz #endif 55*34f9b3eeSRoland Mainz #ifndef _POSIX_SOURCE 56*34f9b3eeSRoland Mainz #define _POSIX_SOURCE 1 57*34f9b3eeSRoland Mainz #endif 58*34f9b3eeSRoland Mainz #ifndef _XOPEN_SOURCE 59*34f9b3eeSRoland Mainz #define _XOPEN_SOURCE 9900 60*34f9b3eeSRoland Mainz #endif 61*34f9b3eeSRoland Mainz #ifndef _GNU_SOURCE 62*34f9b3eeSRoland Mainz #define _GNU_SOURCE 1 63*34f9b3eeSRoland Mainz #endif 64*34f9b3eeSRoland Mainz #ifndef __EXTENSIONS__ 65*34f9b3eeSRoland Mainz #define __EXTENSIONS__ 1 66*34f9b3eeSRoland Mainz #endif 67*34f9b3eeSRoland Mainz } 68da2e3ebdSchinelif tst note{ _ISOC99_SOURCE & _POSIX_SOURCE & _POSIX_C_SOURCE & _XOPEN_SOURCE & __EXTENSIONS__ works }end compile{ 69da2e3ebdSchin #define _ISOC99_SOURCE 1 70da2e3ebdSchin #define _POSIX_SOURCE 1 71da2e3ebdSchin #define _POSIX_C_SOURCE 21000101L 72da2e3ebdSchin #define _XOPEN_SOURCE 9900 73da2e3ebdSchin #define _GNU_SOURCE 1 74da2e3ebdSchin #define __EXTENSIONS__ 1 75da2e3ebdSchin #include <sys/types.h> 76da2e3ebdSchin #include <sys/stat.h> 77da2e3ebdSchin #include <stdlib.h> 78da2e3ebdSchin #include <unistd.h> 79da2e3ebdSchin }end { 80da2e3ebdSchin #ifndef _ISOC99_SOURCE 81da2e3ebdSchin #define _ISOC99_SOURCE 1 82da2e3ebdSchin #endif 83da2e3ebdSchin #ifndef _POSIX_SOURCE 84da2e3ebdSchin #define _POSIX_SOURCE 1 85da2e3ebdSchin #endif 86da2e3ebdSchin #ifndef _POSIX_C_SOURCE 87da2e3ebdSchin #define _POSIX_C_SOURCE 21000101L 88da2e3ebdSchin #endif 89da2e3ebdSchin #ifndef _XOPEN_SOURCE 90da2e3ebdSchin #define _XOPEN_SOURCE 9900 91da2e3ebdSchin #endif 92da2e3ebdSchin #ifndef _GNU_SOURCE 93da2e3ebdSchin #define _GNU_SOURCE 1 94da2e3ebdSchin #endif 95da2e3ebdSchin #ifndef __EXTENSIONS__ 96da2e3ebdSchin #define __EXTENSIONS__ 1 97da2e3ebdSchin #endif 98da2e3ebdSchin } 99da2e3ebdSchinelif tst note{ _POSIX_SOURCE & _XOPEN_SOURCE & __EXTENSIONS__ works }end compile{ 100da2e3ebdSchin #define _POSIX_SOURCE 1 101da2e3ebdSchin #define _XOPEN_SOURCE 1 102da2e3ebdSchin #define __EXTENSIONS__ 1 103da2e3ebdSchin #include <sys/types.h> 104da2e3ebdSchin #include <sys/stat.h> 105da2e3ebdSchin #include <stdlib.h> 106da2e3ebdSchin #include <unistd.h> 107da2e3ebdSchin }end { 108da2e3ebdSchin #ifndef _POSIX_SOURCE 109da2e3ebdSchin #define _POSIX_SOURCE 1 110da2e3ebdSchin #endif 111da2e3ebdSchin #ifndef _XOPEN_SOURCE 112da2e3ebdSchin #define _XOPEN_SOURCE 1 113da2e3ebdSchin #endif 114da2e3ebdSchin #ifndef __EXTENSIONS__ 115da2e3ebdSchin #define __EXTENSIONS__ 1 116da2e3ebdSchin #endif 117da2e3ebdSchin } 118da2e3ebdSchinelif tst note{ _XOPEN_SOURCE & __EXTENSIONS__ works }end compile{ 119da2e3ebdSchin #define _XOPEN_SOURCE 1 120da2e3ebdSchin #define __EXTENSIONS__ 1 121da2e3ebdSchin #include <sys/types.h> 122da2e3ebdSchin #include <sys/stat.h> 123da2e3ebdSchin #include <stdlib.h> 124da2e3ebdSchin #include <unistd.h> 125da2e3ebdSchin }end { 126da2e3ebdSchin #ifndef _XOPEN_SOURCE 127da2e3ebdSchin #define _XOPEN_SOURCE 1 128da2e3ebdSchin #endif 129da2e3ebdSchin #ifndef __EXTENSIONS__ 130da2e3ebdSchin #define __EXTENSIONS__ 1 131da2e3ebdSchin #endif 132da2e3ebdSchin } 133da2e3ebdSchinelif tst note{ _XOPEN_SOURCE works }end compile{ 134da2e3ebdSchin #define _XOPEN_SOURCE 1 135da2e3ebdSchin #include <sys/types.h> 136da2e3ebdSchin #include <sys/stat.h> 137da2e3ebdSchin #include <stdlib.h> 138da2e3ebdSchin #include <unistd.h> 139da2e3ebdSchin }end { 140da2e3ebdSchin #ifndef _XOPEN_SOURCE 141da2e3ebdSchin #define _XOPEN_SOURCE 1 142da2e3ebdSchin #endif 143da2e3ebdSchin } 144da2e3ebdSchinelse tst note{ __EXTENSIONS__ works }end compile{ 145da2e3ebdSchin #define __EXTENSIONS__ 1 146da2e3ebdSchin #include <sys/types.h> 147da2e3ebdSchin #include <sys/stat.h> 148da2e3ebdSchin }end { 149da2e3ebdSchin #ifndef __EXTENSIONS__ 150da2e3ebdSchin #define __EXTENSIONS__ 1 151da2e3ebdSchin #endif 152da2e3ebdSchin } 153da2e3ebdSchinendif 154