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

📄 conf.h

📁 < linux网络编程工具>>配套源码
💻 H
📖 第 1 页 / 共 5 页
字号:
**
**	Use IRIX64 instead of IRIX for 64-bit IRIX (6.0).
**	Use IRIX5 instead of IRIX for IRIX 5.x.
**
**	This version tries to be adaptive using _MIPS_SIM:
**		_MIPS_SIM == _ABIO32 (= 1)    Abi: -32 on IRIX 6.2
**		_MIPS_SIM == _ABIN32 (= 2)    Abi: -n32 on IRIX 6.2
**		_MIPS_SIM == _ABI64  (= 3)    Abi: -64 on IRIX 6.2
**
**		_MIPS_SIM is 1 also on IRIX 5.3
**
**	IRIX64 changes from Mark R. Levinson <ml@cvdev.rochester.edu>.
**	IRIX5 changes from Kari E. Hurtta <Kari.Hurtta@fmi.fi>.
**	Adaptive changes from Kari E. Hurtta <Kari.Hurtta@fmi.fi>.
*/

#if defined(__sgi)
# ifndef IRIX
#  define IRIX
# endif /* ! IRIX */
# if _MIPS_SIM > 0 && !defined(IRIX5)
#  define IRIX5			/* IRIX5 or IRIX6 */
# endif /* _MIPS_SIM > 0 && !defined(IRIX5) */
# if _MIPS_SIM > 1 && !defined(IRIX6) && !defined(IRIX64)
#  define IRIX6			/* IRIX6 */
# endif /* _MIPS_SIM > 1 && !defined(IRIX6) && !defined(IRIX64) */
#endif /* defined(__sgi) */

#ifdef IRIX
# define SYSTEM5	1	/* this is a System-V derived system */
# define HASSETREUID	1	/* has setreuid(2) call */
# define HASINITGROUPS	1	/* has initgroups(3) call */
# define HASFCHMOD	1	/* has fchmod(2) syscall */
# define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
# define IP_SRCROUTE	1	/* can check IP source routing */
# define setpgid	BSDsetpgrp
# define GIDSET_T	gid_t
# define SFS_TYPE	SFS_4ARGS	/* four argument statfs() call */
# define SFS_BAVAIL	f_bfree		/* alternate field name */
# define SYSLOG_BUFSIZE 512
# ifdef IRIX6
#  define STAT64	1
#  define QUAD_T	unsigned long long
#  define LA_TYPE	LA_IRIX6	/* figure out at run time */
#  define SAFENFSPATHCONF 0	/* pathconf(2) lies on NFS filesystems */
# else /* IRIX6 */
#  define LA_TYPE	LA_INT

#  ifdef IRIX64
#   define STAT64	1
#   define QUAD_T	unsigned long long
#   define NAMELISTMASK	0x7fffffffffffffff	/* mask for nlist() values */
#  else /* IRIX64 */
#   define STAT64	0
#   define NAMELISTMASK	0x7fffffff		/* mask for nlist() values */
#  endif /* IRIX64 */
# endif /* IRIX6 */
# if defined(IRIX64) || defined(IRIX5) || defined(IRIX6)
#  include <sys/cdefs.h>
#  include <paths.h>
#  define ARGV_T	char *const *
#  define HASFCHOWN	1	/* has fchown(2) */
#  define HASSETRLIMIT	1	/* has setrlimit(2) syscall */
#  define HASGETDTABLESIZE 1	/* has getdtablesize(2) syscall */
#  define HASSTRERROR	1	/* has strerror(3) */
# else /* defined(IRIX64) || defined(IRIX5) || defined(IRIX6) */
#  define ARGV_T	const char **
#  define WAITUNION	1	/* use "union wait" as wait argument type */
# endif /* defined(IRIX64) || defined(IRIX5) || defined(IRIX6) */
#endif /* IRIX */


/*
**  SunOS and Solaris
**
**	Tested on SunOS 4.1.x (a.k.a. Solaris 1.1.x) and
**	Solaris 2.4 (a.k.a. SunOS 5.4).
*/

#if defined(sun) && !defined(BSD)

# include <sys/time.h>
# define HASINITGROUPS	1	/* has initgroups(3) call */
# define HASUNAME	1	/* use System V uname(2) system call */
# define HASFCHMOD	1	/* has fchmod(2) syscall */
# define IP_SRCROUTE	1	/* can check IP source routing */
# define SAFENFSPATHCONF 1	/* pathconf(2) pessimizes on NFS filesystems */
# ifndef HASFCHOWN
#  define HASFCHOWN	1	/* fchown(2) */
# endif /* ! HASFCHOWN */

# ifdef SOLARIS_2_3
#  define SOLARIS	20300	/* for back compat only -- use -DSOLARIS=20300 */
# endif /* SOLARIS_2_3 */

# if defined(NOT_SENDMAIL) && !defined(SOLARIS) && defined(sun) && (defined(__svr4__) || defined(__SVR4))
#  define SOLARIS	1	/* unknown Solaris version */
# endif /* defined(NOT_SENDMAIL) && !defined(SOLARIS) && defined(sun) && (defined(__svr4__) || defined(__SVR4)) */

# ifdef SOLARIS
			/* Solaris 2.x (a.k.a. SunOS 5.x) */
#  ifndef __svr4__
#   define __svr4__		/* use all System V Release 4 defines below */
#  endif /* ! __svr4__ */
#  define GIDSET_T	gid_t
#  define USE_SA_SIGACTION	1	/* use sa_sigaction field */
#  ifndef _PATH_UNIX
#   define _PATH_UNIX		"/dev/ksyms"
#  endif /* ! _PATH_UNIX */
#  ifndef _PATH_VENDOR_CF
#   define _PATH_VENDOR_CF	"/etc/mail/sendmail.cf"
#  endif /* ! _PATH_VENDOR_CF */
#  ifndef _PATH_SENDMAILPID
#   define _PATH_SENDMAILPID	"/etc/mail/sendmail.pid"
#  endif /* ! _PATH_SENDMAILPID */
#  ifndef _PATH_HOSTS
#   define _PATH_HOSTS		"/etc/inet/hosts"
#  endif /* ! _PATH_HOSTS */
#  ifndef SYSLOG_BUFSIZE
#   define SYSLOG_BUFSIZE	1024	/* allow full size syslog buffer */
#  endif /* ! SYSLOG_BUFSIZE */
#  ifndef TZ_TYPE
#   define TZ_TYPE	TZ_TZNAME
#  endif /* ! TZ_TYPE */
#  if SOLARIS >= 20300 || (SOLARIS < 10000 && SOLARIS >= 203)
#   define USESETEUID	1		/* seteuid works as of 2.3 */
#  endif /* SOLARIS >= 20300 || (SOLARIS < 10000 && SOLARIS >= 203) */
#  if SOLARIS >= 20500 || (SOLARIS < 10000 && SOLARIS >= 205)
#   define HASSETREUID	1		/* setreuid works as of 2.5 */
#   if SOLARIS < 207 || (SOLARIS > 10000 && SOLARIS < 20700)
#    ifndef LA_TYPE
#     define LA_TYPE	LA_KSTAT	/* use kstat(3k) -- may work in < 2.5 */
#    endif /* ! LA_TYPE */
#    ifndef RANDOMSHIFT		/* random() doesn't work well (sometimes) */
#     define RANDOMSHIFT	8
#    endif /* RANDOMSHIFT */
#   endif /* SOLARIS < 207 || (SOLARIS > 10000 && SOLARIS < 20700) */
#  else /* SOLARIS >= 20500 || (SOLARIS < 10000 && SOLARIS >= 205) */
#   ifndef HASRANDOM
#    define HASRANDOM	0		/* doesn't have random(3) */
#   endif /* ! HASRANDOM */
#  endif /* SOLARIS >= 20500 || (SOLARIS < 10000 && SOLARIS >= 205) */
#  if SOLARIS >= 20600 || (SOLARIS < 10000 && SOLARIS >= 206)
#   define HASSNPRINTF	1		/* has snprintf starting in 2.6 */
#  else /* SOLARIS >= 20600 || (SOLARIS < 10000 && SOLARIS >= 206) */
    typedef int int32_t;
#  endif /* SOLARIS >= 20600 || (SOLARIS < 10000 && SOLARIS >= 206) */
#  if SOLARIS >= 20700 || (SOLARIS < 10000 && SOLARIS >= 207)
#   ifndef LA_TYPE
#    include <sys/loadavg.h>
#    define LA_TYPE	LA_SUBR		/* getloadavg(3c) appears in 2.7 */
#   endif /* ! LA_TYPE */
#   define HASGETUSERSHELL 1	/* getusershell(3c) bug fixed in 2.7 */
#  endif /* SOLARIS >= 20700 || (SOLARIS < 10000 && SOLARIS >= 207) */
#  if SOLARIS >= 20800 || (SOLARIS < 10000 && SOLARIS >= 208)
#   define HASSTRL	1	/* str*(3) added in 2.8 */
#   undef _PATH_SENDMAILPID	/* tmpfs /var/run added in 2.8 */
#   define _PATH_SENDMAILPID	"/var/run/sendmail.pid"
#  endif /* SOLARIS >= 20800 || (SOLARIS < 10000 && SOLARIS >= 208) */
#  ifndef HASGETUSERSHELL
#   define HASGETUSERSHELL 0	/* getusershell(3) causes core dumps pre-2.7 */
#  endif /* ! HASGETUSERSHELL */

# else /* SOLARIS */
			/* SunOS 4.0.3 or 4.1.x */
#  define HASGETUSERSHELL 1	/* DOES have getusershell(3) call in libc */
#  define HASSETREUID	1	/* has setreuid(2) call */
#  ifndef HASFLOCK
#   define HASFLOCK	1	/* has flock(2) call */
#  endif /* ! HASFLOCK */
#  define SFS_TYPE	SFS_VFS	/* use <sys/vfs.h> statfs() implementation */
#  define TZ_TYPE	TZ_TM_ZONE	/* use tm->tm_zone */
#  include <memory.h>
#  include <vfork.h>
#  ifdef __GNUC__
#   define strtoul	strtol	/* gcc library bogosity */
#  endif /* __GNUC__ */
#  define memmove(d, s, l)	(bcopy((s), (d), (l)))

#  ifdef SUNOS403
			/* special tweaking for SunOS 4.0.3 */
#   include <malloc.h>
#   define BSD4_3	1	/* 4.3 BSD-based */
#   define NEEDSTRSTR	1	/* need emulation of strstr(3) routine */
#   define WAITUNION	1	/* use "union wait" as wait argument type */
#   undef WIFEXITED
#   undef WEXITSTATUS
#   undef HASUNAME
#   define setpgid	setpgrp
#   define MODE_T	int
typedef int		pid_t;
extern char		*getenv();

#  else /* SUNOS403 */
			/* 4.1.x specifics */
#   define HASSETSID	1	/* has Posix setsid(2) call */
#   define HASSETVBUF	1	/* we have setvbuf(3) in libc */

#  endif /* SUNOS403 */
# endif /* SOLARIS */

# ifndef LA_TYPE
#  define LA_TYPE	LA_INT
# endif /* ! LA_TYPE */

#endif /* defined(sun) && !defined(BSD) */

/*
**  DG/UX
**
**	Tested on 5.4.2 and 5.4.3.  Use DGUX_5_4_2 to get the
**	older support.
**	5.4.3 changes from Mark T. Robinson <mtr@ornl.gov>.
*/

#ifdef DGUX_5_4_2
# define DGUX		1
#endif /* DGUX_5_4_2 */

#ifdef DGUX
# define SYSTEM5	1
# define LA_TYPE	LA_DGUX
# define HASSETREUID	1	/* has setreuid(2) call */
# define HASUNAME	1	/* use System V uname(2) system call */
# define HASSETSID	1	/* has Posix setsid(2) call */
# define HASINITGROUPS	1	/* has initgroups(3) call */
# define IP_SRCROUTE	0	/* does not have <netinet/ip_var.h> */
# define HASGETUSERSHELL 0	/* does not have getusershell(3) */
# define HASSNPRINTF	1	/* has snprintf(3) */
# ifndef IDENTPROTO
#  define IDENTPROTO	0	/* TCP/IP implementation is broken */
# endif /* ! IDENTPROTO */
# define SPT_TYPE	SPT_NONE	/* don't use setproctitle */
# define SFS_TYPE	SFS_4ARGS	/* four argument statfs() call */

/* these include files must be included early on DG/UX */
# include <netinet/in.h>
# include <arpa/inet.h>

/* compiler doesn't understand const? */
# define const

# ifdef DGUX_5_4_2
#  define inet_addr	dgux_inet_addr
extern long	dgux_inet_addr();
# endif /* DGUX_5_4_2 */
#endif /* DGUX */


/*
**  Digital Ultrix 4.2A or 4.3
**
**	Apparently, fcntl locking is broken on 4.2A, in that locks are
**	not dropped when the process exits.  This causes major problems,
**	so flock is the only alternative.
*/

#ifdef ultrix
# define HASSETREUID	1	/* has setreuid(2) call */
# define HASUNSETENV	1	/* has unsetenv(3) call */
# define HASINITGROUPS	1	/* has initgroups(3) call */
# define HASUNAME	1	/* use System V uname(2) system call */
# define HASFCHMOD	1	/* has fchmod(2) syscall */
# define HASFCHOWN	1	/* has fchown(2) syscall */
# ifndef HASFLOCK
#  define HASFLOCK	1	/* has flock(2) call */
# endif /* ! HASFLOCK */
# define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
# ifndef BROKEN_RES_SEARCH
#  define BROKEN_RES_SEARCH 1	/* res_search(unknown) returns h_errno=0 */
# endif /* ! BROKEN_RES_SEARCH */
# if !defined(NEEDLOCAL_HOSTNAME_LENGTH) && NAMED_BIND && __RES >= 19931104 && __RES < 19950621
#  define NEEDLOCAL_HOSTNAME_LENGTH	1	/* see sendmail/README */
# endif /* !defined(NEEDLOCAL_HOSTNAME_LENGTH) && NAMED_BIND && __RES >= 19931104 && __RES < 19950621 */
# ifdef vax
#  define LA_TYPE	LA_FLOAT
# else /* vax */
#  define LA_TYPE	LA_INT
#  define LA_AVENRUN	"avenrun"
# endif /* vax */
# define SFS_TYPE	SFS_MOUNT	/* use <sys/mount.h> statfs() impl */
# ifndef IDENTPROTO
#  define IDENTPROTO	0	/* pre-4.4 TCP/IP implementation is broken */
# endif /* ! IDENTPROTO */
# define SYSLOG_BUFSIZE	256
#endif /* ultrix */


/*
**  OSF/1 for KSR.
**
**	Contributed by Todd C. Miller <Todd.Miller@cs.colorado.edu>
*/

#ifdef __ksr__
# define __osf__	1	/* get OSF/1 defines below */
# ifndef TZ_TYPE
#  define TZ_TYPE	TZ_TZNAME	/* use tzname[] vector */
# endif /* ! TZ_TYPE */
#endif /* __ksr__ */


/*
**  OSF/1 for Intel Paragon.
**
**	Contributed by Jeff A. Earickson <jeff@ssd.intel.com>
**	of Intel Scalable Systems Divison.
*/

#ifdef __PARAGON__
# define __osf__	1	/* get OSF/1 defines below */
# ifndef TZ_TYPE
#  define TZ_TYPE	TZ_TZNAME	/* use tzname[] vector */
# endif /* ! TZ_TYPE */
# define GIDSET_T	gid_t
# define MAXNAMLEN	NAME_MAX
#endif /* __PARAGON__ */


/*
**  Tru64 UNIX, formerly known as Digital UNIX, formerly known as DEC OSF/1
**
**	Tested for 3.2 and 4.0.
*/

#ifdef __osf__
# define HASUNAME	1	/* has uname(2) call */
# define HASUNSETENV	1	/* has unsetenv(3) call */
# define USESETEUID	1	/* has usable seteuid(2) call */
# define HASINITGROUPS	1	/* has initgroups(3) call */
# define HASFCHMOD	1	/* has fchmod(2) syscall */
# define HASFCHOWN	1	/* has fchown(2) syscall */
# define HASSETLOGIN	1	/* has setlogin(2) */
# define IP_SRCROUTE	1	/* can check IP source routing */
# define HAS_ST_GEN	1	/* has st_gen field in stat struct */
# define GIDSET_T	gid_t
# if _FFR_MILTER
#  define SM_INT32	int	/* 32bit integer */
# endif /* _FFR_MILTER */
# ifndef HASFLOCK
#  define HASFLOCK	1	/* has flock(2) call */
# endif /* ! HASFLOCK */
# define LA_TYPE	LA_ALPHAOSF
# define SFS_TYPE	SFS_STATVFS	/* use <sys/statvfs.h> statfs() impl */
# ifndef _PATH_VENDOR_CF
#  define _PATH_VENDOR_CF	"/var/adm/sendmail/sendmail.cf"
# endif /* ! _PATH_VENDOR_CF */
# ifndef _PATH_SENDMAILPID
#  define _PATH_SENDMAILPID	"/var/run/sendmail.pid"
# endif /* ! _PATH_SENDMAILPID */
#endif /* __osf__ */


/*
**  NeXTstep
*/

#ifdef NeXT
# define HASINITGROUPS	1	/* has initgroups(3) call */
# define NEEDPUTENV	2	/* need putenv(3) call; no setenv(3) call */
# ifndef HASFLOCK
#  define HASFLOCK	1	/* has flock(2) call */
# endif /* ! HASFLOCK */
# define NEEDGETOPT	1	/* need a replacement for getopt(3) */
# define WAITUNION	1	/* use "union wait" as wait argument type */
# define UID_T		int	/* compiler gripes on uid_t */
# define GID_T		int	/* ditto for gid_t */
# define MODE_T		int	/* and mode_t */
# define setpgid	setpgrp
# ifndef NOT_SENDMAIL
#  define sleep		sleepX
# endif /* ! NOT_SENDMAIL */
# ifndef LA_TYPE
#  define LA_TYPE	LA_MACH
# endif /* ! LA_TYPE */
# define SFS_TYPE	SFS_VFS	/* use <sys/vfs.h> statfs() implementation */
# ifndef _POSIX_SOURCE
typedef int		pid_t;
#  undef WEXITSTATUS
#  undef WIFEXITED
#  undef WIFSTOPPED
#  undef WTERMSIG
# endif /* ! _POSIX_SOURCE */

⌨️ 快捷键说明

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