00001 /* 00002 Asking the system what it has 00003 AUP2, Sec. 1.05.3 00004 00005 Copyright 2003 by Marc J. Rochkind. All rights reserved. 00006 May be copied only for purposes and under conditions described 00007 on the Web page www.basepath.com/aup/copyright.htm. 00008 00009 The Example Files are provided "as is," without any warranty; 00010 without even the implied warranty of merchantability or fitness 00011 for a particular purpose. The author and his publisher are not 00012 responsible for any damages, direct or incidental, resulting 00013 from the use or non-use of these Example Files. 00014 00015 The Example Files may contain defects, and some contain deliberate 00016 coding mistakes that were included for educational reasons. 00017 You are responsible for determining if and how the Example Files 00018 are to be used. 00019 00020 */ 00021 #define SUV_SUS2 00022 00023 #if 1 00024 #include "suvreq.h" 00025 #endif 00026 #include <unistd.h> 00027 #include <stdio.h> 00028 00029 int main(void) 00030 { 00031 printf("Request:\n"); 00032 00033 #ifdef _POSIX_SOURCE 00034 printf("\t_POSIX_SOURCE defined\n"); 00035 printf("\t_POSIX_C_SOURCE = %ld\n", (long)_POSIX_C_SOURCE); 00036 #else 00037 printf("\t_POSIX_SOURCE undefined\n"); 00038 #endif 00039 00040 #ifdef _XOPEN_SOURCE 00041 #if _XOPEN_SOURCE == 0 00042 printf("\t_XOPEN_SOURCE defined (0 or no value)\n"); 00043 #else 00044 printf("\t_XOPEN_SOURCE = %d\n", _XOPEN_SOURCE); 00045 #endif 00046 #else 00047 printf("\t_XOPEN_SOURCE undefined\n"); 00048 #endif 00049 00050 #ifdef _XOPEN_SOURCE_EXTENDED 00051 printf("\t_XOPEN_SOURCE_EXTENDED defined\n"); 00052 #else 00053 printf("\t_XOPEN_SOURCE_EXTENDED undefined\n"); 00054 #endif 00055 00056 printf("Claims:\n"); 00057 #ifdef _POSIX_VERSION 00058 printf("\t_POSIX_VERSION = %ld\n", (long)_POSIX_VERSION); 00059 #else 00060 printf("\tNot POSIX\n"); 00061 #endif 00062 00063 #ifdef _XOPEN_UNIX 00064 printf("\tX/Open\n"); 00065 #ifdef _XOPEN_VERSION 00066 printf("\t_XOPEN_VERSION = %d\n", _XOPEN_VERSION); 00067 #else 00068 printf("\tError: _XOPEN_UNIX defined, but not _XOPEN_VERSION\n"); 00069 #endif 00070 #else 00071 printf("\tNot X/Open\n"); 00072 #endif 00073 00074 return 0; 00075 00076 00077 }