1 /* c-unistd.h: ensure we have constants from <unistd.h>. Included from 2 c-std.h. 3 4 Copyright 1992, 1993, 2008, 2012 Karl Berry. 5 Copyright 2005 Olaf Weber. 6 7 This library is free software; you can redistribute it and/or 8 modify it under the terms of the GNU Lesser General Public 9 License as published by the Free Software Foundation; either 10 version 2.1 of the License, or (at your option) any later version. 11 12 This library is distributed in the hope that it will be useful, 13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 Lesser General Public License for more details. 16 17 You should have received a copy of the GNU Lesser General Public License 18 along with this library; if not, see <http://www.gnu.org/licenses/>. */ 19 20 #ifndef KPATHSEA_C_UNISTD_H 21 #define KPATHSEA_C_UNISTD_H 22 23 /* <unistd.h> is allowed to depend on <sys/types.h>. */ 24 #include <kpathsea/systypes.h> 25 26 #if HAVE_UNISTD_H 27 #if defined (WIN32) || defined (__CYGWIN__) 28 # define __need_getopt 29 #include <kpathsea/getopt.h> 30 #endif 31 #include <unistd.h> 32 #endif 33 34 #include <kpathsea/c-std.h> 35 36 /* For fseek. */ 37 #ifndef SEEK_SET 38 #define SEEK_SET 0 39 #define SEEK_CUR 1 40 #define SEEK_END 2 41 #endif /* not SEEK_SET */ 42 43 /* For access. */ 44 #ifndef F_OK 45 #define F_OK 0 46 #define X_OK 1 47 #define W_OK 2 48 #define R_OK 4 49 #endif /* not F_OK */ 50 51 #ifndef STDIN_FILENO 52 #define STDIN_FILENO 0 53 #define STDOUT_FILENO 1 54 #define STDERR_FILENO 2 55 #endif /* not STDIN_FILENO */ 56 57 #endif /* not KPATHSEA_C_UNISTD_H */ 58