1 // 2 // aegis - a project change supervisor 3 // Copyright (C) 1994, 1996, 1997, 2004-2006, 2008 Peter Miller 4 // 5 // This program is free software; you can redistribute it and/or modify 6 // it under the terms of the GNU General Public License as published by 7 // the Free Software Foundation; either version 3 of the License, or 8 // (at your option) any later version. 9 // 10 // This program is distributed in the hope that it will be useful, 11 // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 // GNU General Public License for more details. 14 // 15 // You should have received a copy of the GNU General Public License 16 // along with this program. If not, see 17 // <http://www.gnu.org/licenses/>. 18 // 19 20 #ifndef COMMON_AC_UNISTD_H 21 #define COMMON_AC_UNISTD_H 22 23 #include <common/config.h> 24 25 // 26 // Need to define __USE_BSD on Linux to get prototypes for the symlink 27 // and readlink functions. 28 // 29 #ifdef __linux__ 30 #ifndef _BSD_SOURCE 31 #define _BSD_SOURCE 32 #endif 33 #ifndef __USE_BSD 34 #define __USE_BSD 35 #endif 36 #endif 37 38 #if HAVE_UNISTD_H 39 #include <common/ac/sys/types.h> 40 #include <unistd.h> 41 #endif 42 43 #ifndef CONF_NO_seteuid 44 #ifndef HAVE_SETEUID 45 int seteuid(int); 46 int setegid(int); 47 #endif 48 #endif 49 50 #endif // COMMON_AC_UNISTD_H 51