#ident	"@(#)smail/conf/os:RELEASE-3_2_0_114:linux,v 1.12 2000/09/10 21:41:44 woods Exp"
#
#	linux - describe characteristics of Linux-based GNU systems
#
# Original by Ian Jackson <iwj10@cus.cam.ac.uk> for Debian GNU/Linux

# Richard Stallman <rms@gnu.ai.mit.edu> writes:
#
# Linux is a kernel; the system as a whole is a variant of the GNU
# system.
#
# When people call these GNU systems just "Linux", that isn't really
# accurate.  It also undermines the spreading of the philosophy that
# encourages people to write more free software (since the name "Linux"
# has become associated with a different philosophy).  So if you could
# avoid doing this, it would be useful.

. $ROOT/conf/os/posix

# lie through our teeth....
OSNAMES=LINUX:UNIX:$OSNAMES

# ARCH_TYPE - this is likely true except for the DEC Alpha port...
ARCH_TYPE=32bit

# According to dan@gasboy.com (Dan Wilder) the libc-4.7.6 version of
# flock() needs the file opened in write mode....  If you have this
# older version of the libc, you may need to add:
#	#define LOCK_REQUIRES_WRITE
# (between the #include's).
#
LOCKING_PROTOCOL="\
#include <unistd.h>
#include <sys/file.h>
#define lock_fd(fd)	      (flock((fd), LOCK_EX|LOCK_NB) < 0? FAIL: SUCCEED)
#define lock_fd_wait(fd)	(flock((fd), LOCK_EX) < 0? FAIL: SUCCEED)
#define unlock_fd(fd)		((void) flock((fd), LOCK_UN))
#define unlock_fd_wait(fd)	((void) flock((fd), LOCK_UN))
#define lock_fd_rd_wait(fd)	(flock((fd), LOCK_SH) < 0? FAIL: SUCCEED)
"

#LOCK_BY_NAME=TRUE
#FLOCK_MAILBOX=TRUE

MAILBOX_DIR=/var/spool/mail

DRIVER_CONFIGURATION=arpa-network		# includes BIND/DNS router

RANLIB=ranlib				# Behavior compatible with BSD

# According to Johannes Stille <johannes@titan.westfalen.de>
# RedHat 3.0.4 with libc 5.3.12 has all of these....
#
# We choose NDBM in assumption 4.4BSD db(3) with ndbm.h emulation is
# available in libc.a.  Most GNU/Linux systems have GDBM too, but so
# far as I know it's bigger and slower than db -- even sdbm may be
# better.  If your ndbm.h doesn't include db.h, then this won't work
# and you should look at EDITME-dist for further hints.
#
# OS_HAVE - name the capabilities of this operating system
HAVE=BIND:BSD_NETWORKING:COMSAT:FSYNC:FTRUNCATE\
:FGETPWENT:GETHOSTNAME:HASH_BANG:NDBM:RENAME:RLIMIT\
:SETGROUPS:SYSEXITS:STRERROR:ULIMIT:MEMMOVE:HDB_UUCP:$HAVE

# NO_HAVE - what features are not available on this operating system
#[[ this is because of the db(3) emulation of ndbm ]]
NO_HAVE=DBM_PAGFNO

# NOTE:  GNU/Linux systems seem to have a <regexp.h> that's compatible
# with the old SysV stuff, so the user might want to add USE_REGEXP_H
# to the MISC_DEFINES in their EDITME.  Some GNU/Linux systems also
# seem to have a P1003.2 <regex.h> too, and this should be used if it
# works, and will be tried since none of the UNIX_SYS5* are on (nor
# should be on) by default.
#
#MISC_DEFINES=USE_REGEXP_H
#
MISC_DEFINES=$MISC_DEFINES:DATA_RLIMIT=8388608:STACK_RLIMIT=1048576

: SOCKET_INCLUDES='
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#ifdef HAVE_BIND
# undef NOERROR		/* remove conflict in SVR4 header files */
# include <arpa/nameser.h>
# include <resolv.h>
#endif
'

SMAIL_NOBODY=nobody		# BSD and SunOS-like systems
SECURE_PATH=/bin:/usr/bin:/sbin:/usr/sbin

COMPRESS=gzip
COMP_FLAG=-9f
DOT_Z=.gz
UNCOMPRESS=gunzip
ZCAT=zcat
