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

📄 conf.h

📁 < linux网络编程工具>>配套源码
💻 H
📖 第 1 页 / 共 5 页
字号:
# define HASSETVBUF	1	/* we have setvbuf(3) in libc */
# define HASINITGROUPS	1	/* has initgroups(3) call */
# define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
# define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
# define SYS5SETPGRP	1	/* use System V setpgrp(2) syscall */
# define SFS_TYPE	SFS_4ARGS	/* four argument statfs() call */
# define MAXPATHLEN	PATH_MAX
extern struct passwd	*getpwent(), *getpwnam(), *getpwuid();
extern struct group	*getgrent(), *getgrnam(), *getgrgid();
# undef WIFEXITED
# undef WEXITSTATUS
#endif /* UMAXV */


/*
**  Stardent Titan 3000 running TitanOS 4.2.
**
**	Must be compiled in "cc -43" mode.
**
**	From Kate Hedstrom <kate@ahab.rutgers.edu>.
**
**	Note the tweaking below after the BSD defines are set.
*/

#ifdef titan
# define setpgid	setpgrp
typedef int		pid_t;
# undef WIFEXITED
# undef WEXITSTATUS
#endif /* titan */


/*
**  Sequent DYNIX 3.2.0
**
**	From Jim Davis <jdavis@cs.arizona.edu>.
*/

#ifdef sequent

# define BSD		1
# define HASUNSETENV	1
# define BSD4_3		1	/* to get signal() in conf.c */
# define WAITUNION	1
# define LA_TYPE	LA_FLOAT
# ifdef _POSIX_VERSION
#  undef _POSIX_VERSION		/* set in <unistd.h> */
# endif /* _POSIX_VERSION */
# undef HASSETVBUF		/* don't actually have setvbuf(3) */
# define setpgid	setpgrp

/* Have to redefine WIFEXITED to take an int, to work with waitfor() */
# undef	WIFEXITED
# define WIFEXITED(s)	(((union wait*)&(s))->w_stopval != WSTOPPED && \
			 ((union wait*)&(s))->w_termsig == 0)
# define WEXITSTATUS(s)	(((union wait*)&(s))->w_retcode)
typedef int		pid_t;
# define isgraph(c)	(isprint(c) && (c != ' '))

# ifndef IDENTPROTO
#  define IDENTPROTO	0	/* TCP/IP implementation is broken */
# endif /* ! IDENTPROTO */

# ifndef _PATH_UNIX
#  define _PATH_UNIX		"/dynix"
# endif /* ! _PATH_UNIX */
# ifndef _PATH_VENDOR_CF
#  define _PATH_VENDOR_CF	"/usr/lib/sendmail.cf"
# endif /* ! _PATH_VENDOR_CF */
#endif /* sequent */


/*
**  Sequent DYNIX/ptx v2.0 (and higher)
**
**	For DYNIX/ptx v1.x, undefine HASSETREUID.
**
**	From Tim Wright <timw@sequent.com>.
**	Update from Jack Woolley <jwoolley@sctcorp.com>, 26 Dec 1995,
**		for DYNIX/ptx 4.0.2.
*/

#ifdef _SEQUENT_
# include <sys/stream.h>
# define SYSTEM5	1	/* include all the System V defines */
# define HASSETSID	1	/* has POSIX setsid(2) call */
# define HASINITGROUPS	1	/* has initgroups(3) call */
# define HASSETREUID	1	/* has setreuid(2) call */
# define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
# define GIDSET_T	gid_t
# define LA_TYPE	LA_INT
# define SFS_TYPE	SFS_STATFS	/* use <sys/statfs.h> statfs() impl */
# define SPT_TYPE	SPT_NONE	/* don't use setproctitle */
# ifndef IDENTPROTO
#  define IDENTPROTO	0	/* TCP/IP implementation is broken */
# endif /* ! IDENTPROTO */
# 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 /* _SEQUENT_ */


/*
**  Cray Unicos
**
**	Ported by David L. Kensiski, Sterling Sofware <kensiski@nas.nasa.gov>
*/

#ifdef UNICOS
# define SYSTEM5	1	/* include all the System V defines */
# define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
# define MAXPATHLEN	PATHSIZE
# define LA_TYPE	LA_ZERO
# define SFS_TYPE	SFS_4ARGS	/* four argument statfs() call */
# define SFS_BAVAIL	f_bfree		/* alternate field name */
#endif /* UNICOS */


/*
**  Apollo DomainOS
**
**  From Todd Martin <tmartint@tus.ssi1.com> & Don Lewis <gdonl@gv.ssi1.com>
**
**  15 Jan 1994; updated 2 Aug 1995
**
*/

#ifdef apollo
# define HASSETREUID	1	/* has setreuid(2) call */
# define HASINITGROUPS	1	/* has initgroups(2) call */
# define IP_SRCROUTE	0	/* does not have <netinet/ip_var.h> */
# define SPT_TYPE	SPT_NONE	/* don't use setproctitle */
# define LA_TYPE	LA_SUBR		/* use getloadavg.c */
# define SFS_TYPE	SFS_4ARGS	/* four argument statfs() call */
# define SFS_BAVAIL	f_bfree		/* alternate field name */
# define TZ_TYPE	TZ_TZNAME
# 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 */
# undef	 S_IFSOCK		/* S_IFSOCK and S_IFIFO are the same */
# undef	 S_IFIFO
# define S_IFIFO	0010000
# ifndef IDENTPROTO
#  define IDENTPROTO	0	/* TCP/IP implementation is broken */
# endif /* ! IDENTPROTO */
# define RLIMIT_NEEDS_SYS_TIME_H	1
# if defined(NGROUPS_MAX) && !NGROUPS_MAX
#  undef NGROUPS_MAX
# endif /* defined(NGROUPS_MAX) && !NGROUPS_MAX */
#endif /* apollo */

/*
**  System V Rel 5.x (a.k.a Unixware7 w/o BSD-Compatibility Libs ie. native)
**
**	Contributed by Paul Gampe <paulg@apnic.net>
*/

#ifdef __svr5__
# include <sys/mkdev.h>
# define __svr4__
# define SYS5SIGNALS		1
# define HASSETSID		1
# define HASSETREUID		1
# define HASWAITPID		1
# define HASGETDTABLESIZE	1
# define GIDSET_T		gid_t
# define SOCKADDR_LEN_T		size_t
# define SOCKOPT_LEN_T		size_t
# ifndef _PATH_UNIX
#  define _PATH_UNIX		"/stand/unix"
# endif /* ! _PATH_UNIX */
# define SPT_PADCHAR		'\0'	/* pad process title with nulls */
# ifndef SYSLOG_BUFSIZE
#  define SYSLOG_BUFSIZE	1024	/* unsure */
# endif /* SYSLOG_BUFSIZE */
# ifndef _PATH_VENDOR_CF
#  define _PATH_VENDOR_CF	"/etc/sendmail.cf"
# endif /* ! _PATH_VENDOR_CF */
# ifndef _PATH_SENDMAILPID
#  define _PATH_SENDMAILPID	"/etc/sendmail.pid"
# endif /* ! _PATH_SENDMAILPID */
#endif /* __svr5__ */

/* ###################################################################### */

/*
**  UnixWare 2.x
*/

#ifdef UNIXWARE2
# define UNIXWARE	1
# define HASSNPRINTF	1	/* has snprintf(3) and vsnprintf(3) */
# undef offsetof		/* avoid stddefs.h, sys/sysmacros.h conflict */
#endif /* UNIXWARE2 */


/*
**  UnixWare 1.1.2.
**
**	Updated by Petr Lampa <lampa@fee.vutbr.cz>.
**	From Evan Champion <evanc@spatial.synapse.org>.
*/

#ifdef UNIXWARE
# include <sys/mkdev.h>
# define SYSTEM5		1
# define HASGETUSERSHELL	0	/* does not have getusershell(3) call */
# define HASSETREUID		1
# define HASSETSID		1
# define HASINITGROUPS		1
# define GIDSET_T		gid_t
# define SLEEP_T		unsigned
# define SFS_TYPE		SFS_STATVFS
# define LA_TYPE		LA_ZERO
# undef WIFEXITED
# undef WEXITSTATUS
# ifndef _PATH_UNIX
#  define _PATH_UNIX		"/unix"
# endif /* ! _PATH_UNIX */
# ifndef _PATH_VENDOR_CF
#  define _PATH_VENDOR_CF	"/usr/ucblib/sendmail.cf"
# endif /* ! _PATH_VENDOR_CF */
# ifndef _PATH_SENDMAILPID
#  define _PATH_SENDMAILPID	"/usr/ucblib/sendmail.pid"
# endif /* ! _PATH_SENDMAILPID */
# define SYSLOG_BUFSIZE	128
#endif /* UNIXWARE */


/*
**  Intergraph CLIX 3.1
**
**	From Paul Southworth <pauls@locust.cic.net>
*/

#ifdef CLIX
# define SYSTEM5	1	/* looks like System V */
# ifndef HASGETUSERSHELL
#  define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
# endif /* ! HASGETUSERSHELL */
# define DEV_BSIZE	512	/* device block size not defined */
# define GIDSET_T	gid_t
# undef LOG			/* syslog not available */
# define NEEDFSYNC	1	/* no fsync in system library */
# define GETSHORT	_getshort
#endif /* CLIX */


/*
**  NCR MP-RAS 2.x (SysVr4) with Wollongong TCP/IP
**
**	From Kevin Darcy <kevin@tech.mis.cfc.com>.
*/

#ifdef NCR_MP_RAS2
# include <sys/sockio.h>
# define __svr4__
# define IP_SRCROUTE	0	/* Something is broken with getsockopt() */
# define SYSLOG_BUFSIZE	1024
# define SPT_TYPE  SPT_NONE
#endif /* NCR_MP_RAS2 */


/*
**  NCR MP-RAS 3.x (SysVr4) with STREAMware TCP/IP
**
**	From Tom Moore <Tom.Moore@DaytonOH.NCR.COM>
*/

#ifdef NCR_MP_RAS3
# define __svr4__
# define HASFCHOWN	1	/* has fchown(2) call */
# define SIOCGIFNUM_IS_BROKEN	1	/* SIOCGIFNUM has non-std interface */
# define SO_REUSEADDR_IS_BROKEN	1	/* doesn't work if accept() fails */
# define SYSLOG_BUFSIZE	1024
# define SPT_TYPE	SPT_NONE
# ifndef _XOPEN_SOURCE
#  define _XOPEN_SOURCE
#  define _XOPEN_SOURCE_EXTENDED 1
#  include <sys/resource.h>
#  undef _XOPEN_SOURCE
#  undef _XOPEN_SOURCE_EXTENDED
# endif /* ! _XOPEN_SOURCE */
#endif /* NCR_MP_RAS3 */


/*
**  Tandem NonStop-UX SVR4
**
**	From Rick McCarty <mccarty@mpd.tandem.com>.
*/

#ifdef NonStop_UX_BXX
# define __svr4__
#endif /* NonStop_UX_BXX */


/*
**  Hitachi 3050R/3050RX and 3500 Workstations running HI-UX/WE2.
**
**	Tested for 1.04, 1.03
**	From Akihiro Hashimoto ("Hash") <hash@dominic.ipc.chiba-u.ac.jp>.
**
**	Tested for 4.02, 6.10 and 7.10
**	From Motonori NAKAMURA <motonori@media.kyoto-u.ac.jp>.
*/

#if !defined(__hpux) && (defined(_H3050R) || defined(_HIUX_SOURCE))
# define SYSTEM5	1	/* include all the System V defines */
# define HASINITGROUPS	1	/* has initgroups(3) call */
# define HASFCHMOD	1	/* has fchmod(2) syscall */
# define setreuid(r, e)	setresuid(r, e, -1)
# define LA_TYPE	LA_FLOAT
# define SPT_TYPE	SPT_PSTAT
# define SFS_TYPE	SFS_VFS	/* use <sys/vfs.h> statfs() implementation */
# ifndef HASSETVBUF
#  define HASSETVBUF	/* HI-UX has no setlinebuf */
# endif /* ! HASSETVBUF */
# ifndef GIDSET_T
#  define GIDSET_T	gid_t
# endif /* ! GIDSET_T */
# ifndef _PATH_UNIX
#  define _PATH_UNIX		"/HI-UX"
# endif /* ! _PATH_UNIX */
# 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 */
# ifndef HASGETUSERSHELL
#  define HASGETUSERSHELL 0	/* getusershell(3) causes core dumps */
# endif /* ! HASGETUSERSHELL */
# define FDSET_CAST	(int *)	/* cast for fd_set parameters to select */

/*
**  avoid m_flags conflict between Berkeley DB 1.85 db.h & sys/sysmacros.h
**  on HIUX 3050
*/
# undef m_flags

# ifdef __STDC__
extern int	syslog(int, char *, ...);
# else /* __STDC__ */
extern int	syslog();
# endif /* __STDC__ */

#endif /* !defined(__hpux) && (defined(_H3050R) || defined(_HIUX_SOURCE)) */


/*
**  Amdahl UTS System V 2.1.5 (SVr3-based)
**
**    From: Janet Jackson <janet@dialix.oz.au>.
*/

#ifdef _UTS
# include <sys/sysmacros.h>
# undef HASLSTAT		/* has symlinks, but they cause problems */
# define NEEDFSYNC	1	/* system fsync(2) fails on non-EFS filesys */
# define SYS5SIGNALS	1	/* System V signal semantics */
# define SYS5SETPGRP	1	/* use System V setpgrp(2) syscall */
# define HASUNAME	1	/* use System V uname(2) system call */
# define HASINITGROUPS	1	/* has initgroups(3) function */
# define HASSETVBUF	1	/* has setvbuf(3) function */
# ifndef HASGETUSERSHELL
#  define HASGETUSERSHELL 0	/* does not have getusershell(3) function */
# endif /* ! HASGETUSERSHELL */
# define GIDSET_T	gid_t	/* type of 2nd arg to getgroups(2) isn't int */
# define LA_TYPE	LA_ZERO		/* doesn't have load average */
# define SFS_TYPE	SFS_4ARGS	/* use 4-arg statfs() */
# define SFS_BAVAIL	f_bfree		/* alternate field name */
# define _PATH_UNIX		"/unix"
# ifndef _PATH_VENDOR_CF
#  define _PATH_VENDOR_CF	"/usr/lib/s

⌨️ 快捷键说明

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