![]() |
|
|||
File indexing completed on 2025-09-17 08:53:24
0001 /* 0002 * Copyright © 2006 Robert Millan 0003 * Copyright © 2008-2011 Guillem Jover <guillem@hadrons.org> 0004 * 0005 * Redistribution and use in source and binary forms, with or without 0006 * modification, are permitted provided that the following conditions 0007 * are met: 0008 * 1. Redistributions of source code must retain the above copyright 0009 * notice, this list of conditions and the following disclaimer. 0010 * 2. Redistributions in binary form must reproduce the above copyright 0011 * notice, this list of conditions and the following disclaimer in the 0012 * documentation and/or other materials provided with the distribution. 0013 * 3. The name of the author may not be used to endorse or promote products 0014 * derived from this software without specific prior written permission. 0015 * 0016 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, 0017 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 0018 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 0019 * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 0020 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 0021 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 0022 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 0023 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 0024 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 0025 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 0026 */ 0027 0028 #ifdef LIBBSD_OVERLAY 0029 #include <sys/cdefs.h> 0030 #if __has_include_next(<unistd.h>) 0031 #include_next <unistd.h> 0032 #endif 0033 #else 0034 #include <bsd/sys/cdefs.h> 0035 #if __has_include(<unistd.h>) 0036 #include <unistd.h> 0037 #endif 0038 #endif 0039 0040 #ifndef LIBBSD_UNISTD_H 0041 #define LIBBSD_UNISTD_H 0042 0043 #include <sys/stat.h> 0044 0045 #if !defined(S_ISTXT) && defined(S_ISVTX) 0046 #define S_ISTXT S_ISVTX 0047 #endif 0048 0049 __BEGIN_DECLS 0050 #if !defined(__APPLE__) 0051 extern int optreset; 0052 0053 #ifdef LIBBSD_OVERLAY 0054 #undef getopt 0055 #define getopt(argc, argv, optstr) bsd_getopt(argc, argv, optstr) 0056 #endif 0057 0058 int bsd_getopt(int argc, char * const argv[], const char *shortopts); 0059 #endif 0060 0061 mode_t getmode(const void *set, mode_t mode); 0062 void *setmode(const char *mode_str); 0063 0064 #if !defined(__GLIBC__) || \ 0065 !__GLIBC_PREREQ(2, 34) || \ 0066 !defined(_DEFAULT_SOURCE) 0067 void closefrom(int lowfd); 0068 #endif 0069 0070 /* Compatibility with sendmail implementations. */ 0071 #define initsetproctitle(c, a, e) setproctitle_init((c), (a), (e)) 0072 0073 void setproctitle_init(int argc, char *argv[], char *envp[]); 0074 void setproctitle(const char *fmt, ...) 0075 __printflike(1, 2); 0076 0077 int getpeereid(int s, uid_t *euid, gid_t *egid); 0078 __END_DECLS 0079 0080 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |