00001 /* This file is part of Cloudy and is copyright (C)1978-2011 by Gary J. Ferland and 00002 * others. For conditions of distribution and use see copyright notice in license.txt */ 00003 00004 #ifndef CDSTD_H_ 00005 #define CDSTD_H_ 00006 00007 // cdstd.h: define macros to select library API version. 00008 00009 // This must be included before all library #includes. 00010 // Typically this done as part of cddefines.h, only required 00011 // independently when cddefines.h is not first include. 00012 00013 // We *require* only POSIX1990. 00014 // See e.g. Rochkind, Advanced UNIX Programming for more details. 00015 00016 // There appears to be a bug in the POSIX implementation in FreeBSD that was 00017 // imported into Apple Darwin (at least version 11.4.2) where defining _POSIX_SOURCE 00018 // will cause compilation errors as a result of missing type definitions (e.g., u_int) 00019 // when including certain system header files. See e.g. this report: 00020 // http://lists.freebsd.org/pipermail/freebsd-bugs/2011-April/044049.html 00021 #if !defined(__APPLE__) && !defined(__FreeBSD__) 00022 #define _POSIX_SOURCE 00023 #endif 00024 00025 #endif // CDSTD_H_