*BSD News Article 22698


Return to BSD News archive

Xref: sserve comp.os.386bsd.misc:1309 comp.os.386bsd.apps:564
Newsgroups: comp.os.386bsd.misc,comp.os.386bsd.apps
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!haven.umd.edu!darwin.sura.net!howland.reston.ans.net!xlink.net!pilhuhn!hwr
From: hwr@pilhuhn.sub.org (Heiko W.Rupp)
Subject: [NetBSD 0.9] smail 3.1.28 - os/netbsd0.9 (source)
Date: Thu, 21 Oct 1993 14:04:39 GMT
Organization: The home of the Pilhuhn
Message-ID: <CF933s.4Ep@pilhuhn.sub.org>
Lines: 99


Ok, here is my os-File for smail 3.1.28 and NetBSD0.9. It works well
for me. If anyone has a better version, I'd be glad to hear about it.

Below is also the fix for mkdefs.sh.


----------------------------------------------------------------------
# @(#)conf/os/netbsd0.9
#
# netbsd0.9 - define the characteristics of NetBSD0.9

# OSNAMES - Names defining this operating system
OSNAMES=UNIX_NETBSD0_9:UNIX_BSD4_3:UNIX_BSD4_2:UNIX_BSD:UNIX

# LOCKING_PROTOCOL - macros for efficient file locking
LOCKING_PROTOCOL="\
#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)
"

# FLOCK_MAILBOX - should mailbox files be locked with lock_fd_wait
FLOCK_MAILBOX=yes

# MAILBOX_DIR - in which directory are user mailbox files
MAILBOX_DIR=/var/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>
#define index strchr
#define rindex strrchr
"

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

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

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

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

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

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

# MISC_DEFINES - miscellaneous definitions
#
# 4.3BSD has utime(), but does not have a header file containing the
# utimbuf structure, so declare it ourselves.
MISC_DEFINES=DECLARE_UTIMBUF:INET_NTOA_USE_STRUCT

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

------------------------------------------------------------------------

for mkdefs.sh:

Insert the following lines 
-------------------------------
# There is a bug in /bin/sh which produces empty defines
mv defs.sh defs.sh.bad
grep -v '^=' defs.sh.bad > defs.sh

mv defs.h defs.h.bad
grep -v '^#define $' defs.h.bad > defs.h
------------------------------

before the closing 

echo "done." 1>&2
exit 0

in ./conf/lib/mkdefs.hs

Without these lines, mkdefs.sh produces output like

=y 

-- 
Heiko W.Rupp        Gerwigstr.5        D-76131  Karlsruhe    +49 721 9661521
Email or post, it doesn't matter to me.
I'm not paying for the bandwidth.
                 -- Charlie Reiman