⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 conf.h

📁 < linux网络编程工具>>配套源码
💻 H
📖 第 1 页 / 共 5 页
字号:
# ifndef _PATH_VENDOR_CF
#  define _PATH_VENDOR_CF	"/etc/sendmail/sendmail.cf"
# endif /* ! _PATH_VENDOR_CF */
# ifndef _PATH_SENDMAILPID
#  define _PATH_SENDMAILPID	"/etc/sendmail/sendmail.pid"
# endif /* ! _PATH_SENDMAILPID */

# ifdef TCPWRAPPERS
#  ifndef HASUNSETENV
#   define HASUNSETENV	1
#  endif /* ! HASUNSETENV */
#  undef NEEDPUTENV
# endif /* TCPWRAPPERS */

#endif /* NeXT */

/*
**  Apple Rhapsody
**	Contributed by Wilfredo Sanchez <wsanchez@apple.com>
**
**	Also used for Apple Darwin support.
*/

#if defined(DARWIN)
# define HASFCHMOD	1	/* has fchmod(2) syscall */
# define HASFLOCK	1	/* has flock(2) syscall */
# define HASUNAME	1	/* has uname(2) syscall */
# define HASUNSETENV	1
# define HASSETSID	1	/* has the setsid(2) POSIX syscall */
# define HASINITGROUPS	1
# define HASSETVBUF	1
# define HASSETREUID	1
# define USESETEUID	1	/* has usable seteuid(2) call */
# define HASLSTAT	1
# define HASSETRLIMIT	1
# define HASWAITPID	1
# define HASSTRERROR	1	/* has strerror(3) */
# define HASSNPRINTF	1	/* has snprintf(3) and vsnprintf(3) */
# define HASSTRERROR	1	/* has strerror(3) */
# define HASGETDTABLESIZE	1
# define HASGETUSERSHELL	1
# define NEEDGETOPT	1	/* need a replacement for getopt(3) */
# define BSD4_4_SOCKADDR	/* has sa_len */
# define NETLINK	1	/* supports AF_LINK */
# define HAS_ST_GEN	1	/* has st_gen field in stat struct */
# define GIDSET_T	gid_t
# define LA_TYPE	LA_SUBR		/* use getloadavg(3) */
# define SFS_TYPE	SFS_MOUNT	/* use <sys/mount.h> statfs() impl */
# define SPT_TYPE	SPT_PSSTRINGS
# define SPT_PADCHAR	'\0'	/* pad process title with nulls */
# define ERRLIST_PREDEFINED	/* don't declare sys_errlist */
#endif /* DARWIN */


/*
**  4.4 BSD
**
**	See also BSD defines.
*/

#if defined(BSD4_4) && !defined(__bsdi__) && !defined(__GNU__)
# include <paths.h>
# define HASUNSETENV	1	/* has unsetenv(3) call */
# define USESETEUID	1	/* has usable seteuid(2) call */
# define HASFCHMOD	1	/* has fchmod(2) syscall */
# define HASSNPRINTF	1	/* has snprintf(3) and vsnprintf(3) */
# define HASSTRERROR	1	/* has strerror(3) */
# define HAS_ST_GEN	1	/* has st_gen field in stat struct */
# include <sys/cdefs.h>
# define ERRLIST_PREDEFINED	/* don't declare sys_errlist */
# define BSD4_4_SOCKADDR	/* has sa_len */
# define NEED_PRINTF_PERCENTQ	1	/* doesn't have %lld */
# define NETLINK	1	/* supports AF_LINK */
# ifndef LA_TYPE
#  define LA_TYPE	LA_SUBR
# endif /* ! LA_TYPE */
# define SFS_TYPE	SFS_MOUNT	/* use <sys/mount.h> statfs() impl */
# define SPT_TYPE	SPT_PSSTRINGS	/* use PS_STRINGS pointer */
#endif /* defined(BSD4_4) && !defined(__bsdi__) && !defined(__GNU__) */


/*
**  BSD/OS (was BSD/386) (all versions)
**	From Tony Sanders, BSDI
*/

#ifdef __bsdi__
# include <paths.h>
# define HASUNSETENV	1	/* has the unsetenv(3) call */
# define HASSETSID	1	/* has the setsid(2) POSIX syscall */
# define USESETEUID	1	/* has usable seteuid(2) call */
# define HASFCHMOD	1	/* has fchmod(2) syscall */
# define HASSETLOGIN	1	/* has setlogin(2) */
# define HASSNPRINTF	1	/* has snprintf(3) and vsnprintf(3) */
# define HASUNAME	1	/* has uname(2) syscall */
# define HASSTRERROR	1	/* has strerror(3) */
# define HAS_ST_GEN	1	/* has st_gen field in stat struct */
# include <sys/cdefs.h>
# define ERRLIST_PREDEFINED	/* don't declare sys_errlist */
# define BSD4_4_SOCKADDR	/* has sa_len */
# define NETLINK	1	/* supports AF_LINK */
# define SFS_TYPE	SFS_MOUNT	/* use <sys/mount.h> statfs() impl */
# ifndef LA_TYPE
#  define LA_TYPE	LA_SUBR
# endif /* ! LA_TYPE */
# define GIDSET_T	gid_t
# define QUAD_T		quad_t
# if defined(_BSDI_VERSION) && _BSDI_VERSION >= 199312
			/* version 1.1 or later */
#  undef SPT_TYPE
#  define SPT_TYPE	SPT_BUILTIN	/* setproctitle is in libc */
# else /* defined(_BSDI_VERSION) && _BSDI_VERSION >= 199312 */
			/* version 1.0 or earlier */
#  define SPT_PADCHAR	'\0'	/* pad process title with nulls */
# endif /* defined(_BSDI_VERSION) && _BSDI_VERSION >= 199312 */
# if defined(_BSDI_VERSION) && _BSDI_VERSION >= 199701	/* on 3.x */
#  define HASSETUSERCONTEXT 1	/* has setusercontext */
# endif /* defined(_BSDI_VERSION) && _BSDI_VERSION >= 199701 */
#endif /* __bsdi__ */


/*
**  QNX 4.2x
**	Contributed by Glen McCready <glen@qnx.com>.
**
**	Should work with all versions of QNX.
*/

#if defined(__QNX__)
# include <unix.h>
# include <sys/select.h>
# undef NGROUPS_MAX
# define HASSETSID	1	/* has the setsid(2) POSIX syscall */
# define USESETEUID	1	/* has usable seteuid(2) call */
# define HASFCHMOD	1	/* has fchmod(2) syscall */
# define HASGETDTABLESIZE 1	/* has getdtablesize(2) call */
# define HASSETREUID	1	/* has setreuid(2) call */
# define HASSTRERROR	1	/* has strerror(3) */
# define HASFLOCK	0
# undef HASINITGROUPS		/* has initgroups(3) call */
# define NEEDGETOPT	1	/* use sendmail's getopt */
# define IP_SRCROUTE	1	/* can check IP source routing */
# define TZ_TYPE	TZ_TMNAME	/* use tmname variable */
# define GIDSET_T	gid_t
# define LA_TYPE	LA_ZERO
# define SFS_TYPE	SFS_NONE
# define SPT_TYPE	SPT_REUSEARGV
# define SPT_PADCHAR	'\0'	/* pad process title with nulls */
# define HASGETUSERSHELL 0
# define E_PSEUDOBASE	512
# define _FILE_H_INCLUDED
#endif /* defined(__QNX__) */


/*
**  FreeBSD / NetBSD / OpenBSD (all architectures, all versions)
**
**  4.3BSD clone, closer to 4.4BSD	for FreeBSD 1.x and NetBSD 0.9x
**  4.4BSD-Lite based			for FreeBSD 2.x and NetBSD 1.x
**
**	See also BSD defines.
*/

#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
# include <paths.h>
# define HASUNSETENV	1	/* has unsetenv(3) call */
# define HASSETSID	1	/* has the setsid(2) POSIX syscall */
# define USESETEUID	1	/* has usable seteuid(2) call */
# define HASFCHMOD	1	/* has fchmod(2) syscall */
# define HASFCHOWN	1	/* fchown(2) */
# define HASSNPRINTF	1	/* has snprintf(3) and vsnprintf(3) */
# define HASUNAME	1	/* has uname(2) syscall */
# define HASSTRERROR	1	/* has strerror(3) */
# define HAS_ST_GEN	1	/* has st_gen field in stat struct */
# define NEED_PRINTF_PERCENTQ	1	/* doesn't have %lld */
# include <sys/cdefs.h>
# define ERRLIST_PREDEFINED	/* don't declare sys_errlist */
# define BSD4_4_SOCKADDR	/* has sa_len */
# define NETLINK	1	/* supports AF_LINK */
# define SAFENFSPATHCONF 1	/* pathconf(2) pessimizes on NFS filesystems */
# define GIDSET_T	gid_t
# define QUAD_T		unsigned long long
# define SFIO_STDIO_COMPAT	1	/* can use RES_DEBUG */
# ifndef LA_TYPE
#  define LA_TYPE	LA_SUBR
# endif /* ! LA_TYPE */
# define SFS_TYPE	SFS_MOUNT	/* use <sys/mount.h> statfs() impl */
# if defined(__NetBSD__) && (NetBSD > 199307 || NetBSD0_9 > 1)
#  undef SPT_TYPE
#  define SPT_TYPE	SPT_BUILTIN	/* setproctitle is in libc */
# endif /* defined(__NetBSD__) && (NetBSD > 199307 || NetBSD0_9 > 1) */
# if defined(__NetBSD__) && ((__NetBSD_Version__ > 102070000) || (NetBSD1_2 > 8) || defined(NetBSD1_4) || defined(NetBSD1_3))
#   define HASURANDOMDEV	1	/* has /dev/urandom(4) */
# endif /* defined(__NetBSD__) && ((__NetBSD_Version__ > 102070000) || (NetBSD1_2 > 8) || defined(NetBSD1_4) || defined(NetBSD1_3)) */
# if defined(__FreeBSD__)
#  define HASSETLOGIN	1	/* has setlogin(2) */
#  if __FreeBSD_version >= 227001
#   define HASSRANDOMDEV	1	/* has srandomdev(3) */
#   define HASURANDOMDEV	1	/* has /dev/urandom(4) */
#  endif /* __FreeBSD_version >= 227001 */
#  undef SPT_TYPE
#  if __FreeBSD__ >= 2
#   include <osreldate.h>
#   if __FreeBSD_version >= 199512	/* 2.2-current when it appeared */
#    include <libutil.h>
#    define SPT_TYPE	SPT_BUILTIN
#   endif /* __FreeBSD_version >= 199512 */
#   if __FreeBSD_version >= 222000	/* 2.2.2-release and later */
#    define HASSETUSERCONTEXT	1	/* BSDI-style login classes */
#   endif /* __FreeBSD_version >= 222000 */
#   if __FreeBSD_version >= 330000	/* 3.3.0-release and later */
#    ifndef HASSTRL
#     define HASSTRL		1	/* has strlc{py,at}(3) functions */
#    endif /* HASSTRL */
#   endif /* __FreeBSD_version >= 330000 */
#   define USESYSCTL		1	/* use sysctl(3) for getting ncpus */
#   include <sys/sysctl.h>
#  endif /* __FreeBSD__ >= 2 */
#  ifndef SPT_TYPE
#   define SPT_TYPE	SPT_REUSEARGV
#   define SPT_PADCHAR	'\0'		/* pad process title with nulls */
#  endif /* ! SPT_TYPE */
# endif /* defined(__FreeBSD__) */
# if defined(__OpenBSD__)
#  undef SPT_TYPE
#  define SPT_TYPE	SPT_BUILTIN	/* setproctitle is in libc */
#  define HASSETLOGIN	1	/* has setlogin(2) */
#  define HASURANDOMDEV	1	/* has /dev/urandom(4) */
#  if OpenBSD < 199912
#   define HASSTRL	0	/* strlcat(3) is broken in 2.5 and earlier */
#  else /* OpenBSD < 199912 */
#   define HASSTRL	1	/* has strlc{py,at}(3) functions */
#  endif /* OpenBSD < 199912 */
# endif /* defined(__OpenBSD__) */
#endif /* defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) */


/*
**  Mach386
**
**	For mt Xinu's Mach386 system.
*/

#if defined(MACH) && defined(i386) && !defined(__GNU__)
# define MACH386	1
# define HASUNSETENV	1	/* has unsetenv(3) call */
# define HASINITGROUPS	1	/* has initgroups(3) call */
# ifndef HASFLOCK
#  define HASFLOCK	1	/* has flock(2) call */
# endif /* ! HASFLOCK */
# define NEEDGETOPT	1	/* need a replacement for getopt(3) */
# define NEEDSTRTOL	1	/* need the strtol() function */
# define setpgid	setpgrp
# ifndef LA_TYPE
#  define LA_TYPE	LA_FLOAT
# endif /* ! LA_TYPE */
# define SFS_TYPE	SFS_VFS	/* use <sys/vfs.h> statfs() implementation */
# undef HASSETVBUF		/* don't actually have setvbuf(3) */
# undef WEXITSTATUS
# undef WIFEXITED
# ifndef _PATH_VENDOR_CF
#  define _PATH_VENDOR_CF	"/usr/lib/sendmail.cf"
# endif /* ! _PATH_VENDOR_CF */
# ifndef _PATH_SENDMAILPID
#  define _PATH_SENDMAILPID	"/etc/sendmail.pid"
# endif /* ! _PATH_SENDMAILPID */
#endif /* defined(MACH) && defined(i386) && !defined(__GNU__) */



/*
**  GNU OS (hurd)
**	Largely BSD & posix compatible.
**	Port contributed by Miles Bader <miles@gnu.ai.mit.edu>.
**	Updated by Mark Kettenis <kettenis@wins.uva.nl>.
*/

#if defined(__GNU__) && !defined(NeXT)
# include <paths.h>
# define HASFCHMOD	1	/* has fchmod(2) call */
# define HASFCHOWN	1	/* has fchown(2) call */
# define HASUNAME	1	/* has uname(2) call */
# define HASUNSETENV	1	/* has unsetenv(3) call */
# define HAS_ST_GEN	1	/* has st_gen field in stat struct */
# define HASSNPRINTF	1	/* has snprintf(3) and vsnprintf(3) */
# define HASSTRERROR	1	/* has strerror(3) */
# define GIDSET_T	gid_t
# define SOCKADDR_LEN_T	socklen_t
# define SOCKOPT_LEN_T	socklen_t
# if (__GLIBC__ == 2 && __GLIBC_MINOR__ > 1) || __GLIBC__ > 2
#  define LA_TYPE	LA_SUBR
# else
#  define LA_TYPE	LA_MACH
   /* GNU uses mach[34], which renames some rpcs from mach2.x. */
#  define host_self	mach_host_self
# endif
# define SFS_TYPE	SFS_STATFS
# define SPT_TYPE	SPT_CHANGEARGV
# define ERRLIST_PREDEFINED	1	/* don't declare sys_errlist */
# define BSD4_4_SOCKADDR	1	/* has sa_len */
# define SIOCGIFCONF_IS_BROKEN  1	/* SIOCGFCONF doesn't work */
# define HAS_IN_H	1	/* GNU has netinet/in.h. */
/* GNU has no MAXPATHLEN; ideally the code should be changed to not use it. */
# define MAXPATHLEN	2048
#endif /* defined(__GNU__) && !defined(NeXT) */

/*
**  4.3 BSD -- this is for very old systems
**
**	Should work for mt Xinu MORE/BSD and Mips UMIPS-BSD 2.1.
**
**	You'll also have to install a new resolver library.
**	I don't guarantee that support for this environment is complete.
*/

#if defined(oldBSD43) || defined(MORE_BSD) || defined(umipsbsd)
# define NEEDVPRINTF	1	/* need a replacement for vprintf(3) */
# define NEEDGETOPT	1	/* need a replacement for getopt(3) */
# define ARBPTR_T	char *
# define setpgid	setpgrp
# ifndef LA_TYPE
#  define LA_TYPE	LA_FLOAT
# endif /* ! LA_TYPE */
# ifndef _PATH_VENDOR_CF
#  define _PATH_VENDOR_CF	"/usr/lib/sendmail.cf"
# endif /* ! _PATH_VENDOR_CF */
# ifndef IDENTPROTO
#  define IDENTPROTO	0	/* TCP/IP implementation is broken */
# endif /* ! IDENTPROTO */
# undef WEXITSTATUS
# undef WIFEXITED
typedef short		pid_t;
#endif /* defined(oldBSD43) || defined(MORE_BSD) || defined(umipsbsd) */


/*
**  SCO Unix
**
**	This includes three parts:
**
**	The first is for SCO OpenServer 5.
**	(Contributed by Keith Reynolds <keithr@sco.COM>).
**
**		SCO OpenServer 5 has a compiler version number macro,
**		which we can use to figure out what version we're on.
**		This may have to change in future releases.
**
**	The second is for SCO UNIX 3.2v4.2/Open Desktop 3.0.
**	(Contributed by Philippe Brand <phb@colombo.telesys-innov.fr>).
**
**	The third is for SCO UNIX 3.2v4.0/Open Desktop 2.0 and earlier.
*/

/* SCO OpenServer 5 */
#if _SCO_DS >= 1
# include <paths.h>
# define SIOCGIFNUM_IS_BROKEN 1	/* SIOCGIFNUM returns bogus value */
# define HASSNPRINTF	1	/* has snprintf(3) call */
# define HASFCHMOD	1	/* has fchmod(2) call */
# define HASFCHOWN	1	/* has fchown(2) call */
# define HASSETRLIMIT	1	/* has setrlimit(2) call */
# define USESETEUID	1	/* has seteuid(2) call */
# define HASINITGROUPS	1	/* has initgroups(3) call */
# define HASGETDTABLESIZE 1	/* has getdtablesize(2) call */
# define RLIMIT_NEEDS_SYS_TIME_H	1
# ifndef LA_TYPE
#  define LA_TYPE	LA_DEVSHORT
# endif /* ! LA_TYPE */
# define _PATH_AVENRUN	"/dev/table/avenrun"
# ifndef _SCO_unix_4_2
#  define _SCO_unix_4_2
# else /* ! _SCO_unix_4_2 */
#  define SOCKADDR_LEN_T	size_t	/* e.g., arg#3 to accept, getsockname */
#  define SOCKOPT_LEN_T		size_t	/* arg#5 to getsockopt */
# endif /* ! _SCO_unix_4_2 */
#endif /* _SCO_DS >= 1 */

/* SCO UNIX 3.2v4.2/Open Desktop 3.0 */
#ifdef _SCO_unix_4_2
# define _SCO_unix_
# define HASSETREUID	1	/* has setreuid(2) call */
#endif /* _SCO_unix_4_2 */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -