#ident	"@(#)smail/conf/os:RELEASE-3_2_0_101:sun_os4,v 1.23 1997/12/16 22:21:59 woods Exp"
#
# sun_os4 - define the characteristics of SunOS release 4.x

# WARNING: this should be based on bsd4.2

# OSNAMES - Names defining this operating system
OSNAMES=UNIX_SUN_OS_4:UNIX_SUN_OS:UNIX_BSD4_2:UNIX_BSD:UNIX

# ARCH_TYPE - mc68k & sparc
ARCH_TYPE=32bit

# LOCKING_PROTOCOL - macros for efficient file locking
# NOTE: the lockf calls work better than the flock calls over NFS
#
#	WARNING:  DO NOT USE NFS FOR SPOOL FILE DIRECTORIES!!!!!!
#
LOCKING_PROTOCOL="\
#include <unistd.h>
#define LOCK_REQUIRES_WRITE
#define lock_fd(fd)		(lockf((fd), F_TLOCK, 0L) < 0? FAIL: SUCCEED)
#define lock_fd_wait(fd)	(lockf((fd), F_LOCK, 0L) < 0? FAIL: SUCCEED)
#define unlock_fd(fd)		((void) lockf((fd), F_ULOCK, 0L))
#define unlock_fd_wait(fd)	((void) lockf((fd), F_ULOCK, 0L))
#define USE_FCNTL_RD_LOCK
#define lock_fd_rd_wait(fd)	(fcntl_rd_lock(fd))
extern int fcntl_rd_lock();
"

# FLOCK_MAILBOX - should mailbox files be locked with lock_fd_wait
# /usr/ucb/Mail does this (from trace(1)):
#	open ("/usr/spool/mail/root", 0, 0) = 4
#	flock (4, 02) = 0
#	open ("/usr/spool/mail/root", 01, 0) = 5
#	close (5) = 0
# unfortunately from lockf(3):
# BUGS
#      lockf() locks do not interact in any way with locks  granted
#      by  flock(),  but  are  compatible  with  locks  granted  by
#      fcntl().
# Worse, from flock(2):
# BUGS
#      Locks obtained through the flock() mechanism are known  only
#      within the system on which they were placed.
# So, luckily /usr/ucb/Mail and /usr/bin/mail both do dot locking!
FLOCK_MAILBOX=yes

# MAILBOX_DIR - in which directory are user mailbox files
# NOTICE: this may actually be /var/spool/mail on 4.0?
MAILBOX_DIR=/usr/spool/mail

# CONSOLE - name of the console device file
CONSOLE=/dev/console

# DECLARE_STRINGS - declare string routines, using macros as needed
DECLARE_STRINGS="\
#include <string.h>
#include <memory.h>
#define index	strchr
#define rindex	strrchr
"

# SECURE_PATH - directories containing system-supplied user programs
SECURE_PATH=/usr/etc:/usr/bin:/usr/ucb

# OSLIBS - name any object libraries containing routines we will need
OSLIBS="-ldbm -lresolv"

# USE_SYMLINKS - safer to install this way if possible....
USE_SYMLINKS=yes

# DRIVER_CONFIGURATION - configuration file describing smail drivers
DRIVER_CONFIGURATION=arpa-network

# SMAIL_NOBODY - the default user with no privs
SMAIL_NOBODY=nobody

# RANLIB - how do we organize an existing object archive library
RANLIB=ranlib

# CHOWN - command to use for accessing the chown program
CHOWN=/usr/etc/chown

# HAVE - what features should be used with this operating system
HAVE=RENAME:MKDIR:BSD_NETWORKING:SYSEXITS:NDBM:YP:BSTRING:SYS5_STRLIB:GETOPT
HAVE=$HAVE:GETHOSTNAME:HASH_BANG:DUP2:READDIR:VFPRINTF:FSYNC:COMSAT:BIND
HAVE=$HAVE:SETGROUPS:FGETPWENT:SYS_INTERPRETER:UTIME_H

# UUCP_SYSTEM_FILE - path to UUCP file containing remote systems
# NOTICE: this may actually be /etc/uucp/Systems on 4.0?
UUCP_SYSTEM_FILE=/usr/lib/uucp/L.sys

# NOTICE:  This may not be correct for old SunOS-4.0.x
ALIASES_FILE=/etc/aliases
ALIASES_TYPE=dbm

# SunOS ships with compress (override with gzip in EDITME if desired)
#
COMPRESS=compress
COMP_FLAG="-f"
UNCOMPRESS=uncompress
ZCAT=zcat
DOT_Z=".Z"

# MAN1 - where smail user command man pages are to be installed
# MAN5 - where smail file format man pages are to be installed
# MAN8 - where smail administrator man pages should be installed
# MAN1_EXT - file extension for user command man pages
# MAN5_EXT - file extension for file format man pages
# MAN8_EXT - file extension for adminstrator man pages
#
MAN1_EXT=1
MAN1=/usr/share/man/man1
MAN5_EXT=5
MAN5=/usr/share/man/man5
MAN8_EXT=8
MAN8=/usr/share/man/man8

# MISC_DEFINES - miscellaneous defines
# Include <vfork.h> when using vfork().  Otherwise, smail may dump
# core due to stack corruption on Sun 4's.
MISC_DEFINES=INCLUDE_VFORK_H:INET_NTOA_USE_STRUCT:USE_REGEXP_H
# The global 'tzname' is only in /usr/5lib/libc and deprecated in favour
# of (struct tm *)->tm_zone.  Note that in SunOS-5 they retracted the
# deprecation to conform to POSIX and tm_zone is only available in the
# broken /usr/ucblib.
MISC_DEFINES=$MISC_DEFINES:USE_TM_ZONE

# MISC_C_DEFINES - miscellaneous #defines
# Define data and stack resource limits, to prevent an rlimit of
# "infinity" from closing all gaps in the process address space.
MISC_C_DEFINES='
#define DATA_RLIMIT     (8192 * 1024)   /* limit to 8Mb of data space */
#define STACK_RLIMIT    (1024 * 1024)   /* limit to 1Mb of stack space */
'

# SMAIL_BIN_DIR - location for uupath, etc.
SMAIL_BIN_DIR=/usr/bin

# SMAIL_NAME - to replace sendmail completely
SMAIL_NAME=/usr/lib/sendmail

# OTHER_SMAIL_NAMES - to replace sendmail completely
OTHER_SMAIL_NAMES=/usr/ucb/mailq

# NEWALIASES - to replace sendmail completely
NEWALIASES=/usr/ucb/newaliases

# LIB_DIR - config files
LIB_DIR=/etc/smail

# UTIL_BIN_DIR - programs
UTIL_BIN_DIR=/usr/lib/smail

# SPOOL_DIRS - doesn't use mqueue ala sendmail (too confusing)
SPOOL_DIRS=/var/spool/smail

# LOG_DIR - would be better to use just /var/log with better names?
LOG_DIR=/var/log/smail

# TMP_DIR - secure tmp space
TMP_DIR=$SPOOL_DIRS/tmp
