# @(#) $Id: sun_os4,v 1.12 1994/10/17 11:56:29 nm4 Exp $
#
# sun_os4 - define the characteristics of SunOS release 4.x

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

# LOCKING_PROTOCOL - macros for efficient file locking
# NOTE: the lockf calls work better than the flock calls over NFS
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();
"

# MAILBOX_DIR - in which directory are user mailbox files
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/ucb:/bin:/usr/bin

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

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

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

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

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

# UUCP_SYSTEM_FILE - path to UUCP file containing remote systems
UUCP_SYSTEM_FILE=/usr/lib/uucp/L.sys

# Smail does not compile correctly for SunOS, if /usr/5bin/cc is found
# in the path before /bin/cc.  To prevent this, use /bin/cc explicitly.
CC=/bin/cc

# 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:INCLUDE_UTIME_H:INET_NTOA_USE_STRUCT

# 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 */"
