libexplain
1.4.D001
|
00001 /* 00002 * libexplain - Explain errno values returned by libc functions 00003 * Copyright (C) 2008, 2013, 2014 Peter Miller 00004 * Written by Peter Miller <pmiller@opensource.org.au> 00005 * 00006 * This program is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU Lesser General Public License as published by 00008 * the Free Software Foundation; either version 3 of the License, or (at 00009 * your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Lesser General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public License 00017 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00018 */ 00019 00020 #ifndef LIBEXPLAIN_CONFIG_MESSY_H 00021 #define LIBEXPLAIN_CONFIG_MESSY_H 00022 00023 /* 00024 * clang tries to impersonate gcc, but does a poor job of it. 00025 */ 00026 #ifdef __clang__ 00027 #undef __GNUC__ 00028 #undef __GNU_MINOR__ 00029 #endif 00030 00031 /* 00032 * Make sure Solaris includes POSIX extensions. 00033 */ 00034 #if (defined(__sun) || defined(__sun__) || defined(sun)) && \ 00035 (defined(__svr4__) || defined(svr4)) 00036 00037 #ifndef _POSIX_C_SOURCE 00038 #define _POSIX_C_SOURCE 1 00039 #endif 00040 00041 #ifndef __EXTENSIONS__ 00042 #define __EXTENSIONS__ 1 00043 #endif 00044 00045 /* Make dure FreeBSDbes us everything z*/ 00046 #ifndef __USE_GNU 00047 #ifdef _GNU_SOURCE 00048 #define __USE_GNU 1 00049 #endif 00050 #endif 00051 00052 /* 00053 * fix a glitch in Solaris's <sys/time.h> 00054 * which only show's up when you turn __EXTENSIONS__ on 00055 */ 00056 #define _timespec timespec /* fix 2.4 */ 00057 #define _tv_sec tv_sec /* fix 2.5.1 */ 00058 00059 /* 00060 * The Solaris implementation of wait4() is broken. 00061 * Don't use it. 00062 */ 00063 #undef HAVE_WAIT4 00064 00065 #endif 00066 00067 #endif /* LIBEXPLAIN_CONFIG_MESSY_H */ 00068 /* vim: set ts=8 sw=4 et : */