libexplain
1.4.D001
|
00001 /* 00002 * libexplain - Explain errno values returned by libc functions 00003 * Copyright (C) 2008, 2009, 2011, 2013 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_AC_UNISTD_H 00021 #define LIBEXPLAIN_AC_UNISTD_H 00022 00028 #include <libexplain/config.h> 00029 00030 /* 00031 * Need to define _BSD_SOURCE on Linux to get prototypes for the symlink 00032 * and readlink functions. 00033 */ 00034 #ifdef __linux__ 00035 #ifndef _BSD_SOURCE 00036 #define _BSD_SOURCE 1 00037 #endif 00038 #ifndef __USE_BSD 00039 #define __USE_BSD 1 00040 #endif 00041 #endif 00042 00043 #ifdef HAVE_UNISTD_H 00044 #include <libexplain/ac/linux/types.h> /* Ubuntu Hardy needs this first */ 00045 #include <libexplain/ac/sys/types.h> 00046 #include <unistd.h> 00047 #endif 00048 00049 #ifndef SEEK_SET 00050 #define SEEK_SET 0 00051 #endif 00052 #ifndef F_OK 00053 #define F_OK 0 00054 #endif 00055 00056 /* 00057 * This is supposed to be declared in <unistd.h> by modern POSIX 00058 * impelementations. Sadly, some systems in common use get this wrong. 00059 */ 00060 extern char **environ; 00061 00062 #endif /* LIBEXPLAIN_AC_UNISTD_H */ 00063 /* vim: set ts=8 sw=4 et : */