[comp.mail.misc] Smail 3.1 and SCO UNIX 3.2.2

graham@netwrx1.NW1.COM (James M. Graham) (12/07/90)

Has anyone built Smail 3.1 on SCO UNIX/386 Release 3.2.2? If so, did you
have to make changes to the source or were you able to build it via the
EDITME definitions alone?

If you made changes, can I get your configuration files. Do you have a patch
available that I can get via ftp or uucp?

Thanks in advance.
Jim Graham

==============================================================================
  James M. Graham		Usenet:	  uunet!netwrx1!graham
  NetWorks One			Internet: graham%netwrx1@uunet.uu.net
  Vienna, Virginia		Voice:    (703) 827-7767

chip@tct.uucp (Chip Salzenberg) (12/08/90)

According to graham@netwrx1.NW1.COM (James M. Graham):
>Has anyone built Smail 3.1 on SCO UNIX/386 Release 3.2.2? If so, did you
>have to make changes to the source or were you able to build it via the
>EDITME definitions alone?

It needed its own configuration file.  The SCO Unix 3.2.0 rename()
call is broken, so we avoid it.  So you have to change the Smail
rename() function to take "const char *" instead of "char *"
parameters, for compatibility with system headers.

Here is my config file from the conf/os directory.

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of shell archive."
# Contents:  sco_unix3.2
# Wrapped by chip@tct on Fri Dec  7 16:28:27 1990
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'sco_unix3.2' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'sco_unix3.2'\"
else
echo shar: Extracting \"'sco_unix3.2'\" \(7821 characters\)
sed "s/^X//" >'sco_unix3.2' <<'END_OF_FILE'
X# @(#)sco_unix5.3.2
X#
X# sco_unix5.3.2 - define the characteristics of SCO Unix System V release 3.2
X
X# OS_DEFINES - Names defining this operating system
X#
X# This is a colon-separated list of names which generally, or specifically
X# define the operating system that smail will be executed under.
X#
X# The following names should be used where applicable:
X#
X#	UNIX_BSD4_1	- the 4.1 release of Berkeley UNIX
X#	UNIX_BSD4_2	- the 4.2 or 4.3 release of Berkeley UNIX
X#	UNIX_BSD4_3	- the 4.3 release of Berkeley UNIX
X#	UNIX_BSD	- any release of Berkeley UNIX after 4.1
X#	UNIX_SYS5_2	- release two of AT&T System V
X#	UNIX_SYS5_3	- release three of AT&T System V
X#	UNIX_SYS5	- any release of AT&T System V
X#	UNIX_SUN_OS_3	- SunOS 3.x, greater than 3.2 (also set 4.2BSD)
X#	UNIX_SUN_OS_4	- SunOS 4.x (also set 4.2 and 4.3BSD)
X#	UNIX_SUN_OS	- any release of SunOS
X#	UNIX_UTS_1	- Amdahl UTS/580 1.x
X#	UNIX_UTS_2	- Amdahl UTS/580 2.x
X#	UNIX_UTS	- Any release of UTS/580
X#	UNIX_SCO	- any release of SCO Unix
X#	UNIX_V7		- Bell Labs UNIX Release 7
X#	UNIX		- Any release of UNIX
X
XOS_DEFINES="UNIX_SYS5_3:UNIX_SYS5:UNIX_SCO:UNIX"
X
X
X# LOCKING_PROTOCOL - macros for efficient file locking
X#
X# Define macros for performing high-performance locking on files
X# These should include the following macros:
X#
X#	lock_fd		- given a file descriptor, either lock the
X#			  file for exclusive access without blocking
X#			  and return SUCCEED or fail to lock and
X#			  return FAIL.  This is used for locking spool
X#			  files.
X#
X#	lock_fd_wait	- given a file descriptor, lock it for
X#			  exclusive access and return SUCCEED or
X#			  return FAIL.  Blocking is permitted.  This
X#			  may be used for locking mailbox files.
X#
X#	unlock_fd	- given the file descriptor of a file locked
X#			  with the lock_fd macro, unlock that file.
X#			  This can be an expression cast to void.
X#
X#	unlock_fd_wait	- given the file descriptor of a file locked
X#			  with the lock_fd_wait macro, unlock that
X#			  file.  This can be an expression cast to
X#			  void.
X#
X#	lock_fd_rd_wait	- given a file descriptor, lock it for shared
X#			  access.  Blocking is permitted.  This is
X#			  used when reading forward files or mailing
X#			  list files.  Closing the file shoud be
X#			  sufficient for releasing the lock.  This
X#			  should return SUCCEED or FAIL.
X#
X# If no reasonable high-efficiency locking method is available for
X# your system, then do not define this macro, or set it to a null
X# string.
X#
X# If the locking protocol requires that the file being locked be
X# writable, define LOCK_REQUIRES_WRITE.
X#
X# To use the System V shared lock fcntl(), define USE_FCNTL_RD_LOCK,
X# and define lock_fd_rd_wait() to be (fcntl_rd_lock(fd)), and declare
X# fcntl_rd_lock() to be extern int.
X
XLOCKING_PROTOCOL="\
X#include <unistd.h>
X#define LOCK_REQUIRES_WRITE
X#define lock_fd(fd)		(lockf((fd), F_TLOCK, 0L) < 0? FAIL: SUCCEED)
X#define lock_fd_wait(fd)	(lockf((fd), F_LOCK, 0L) < 0? FAIL: SUCCEED)
X#define unlock_fd(fd)		((void) lockf((fd), F_ULOCK, 0L))
X#define unlock_fd_wait(fd)	((void) lockf((fd), F_ULOCK, 0L))
X#define USE_FCNTL_RD_LOCK
X#define lock_fd_rd_wait(fd)	(fcntl_rd_lock(fd))
Xextern int fcntl_rd_lock();
X"
X
X
X# LOCK_BY_NAME - should spool files use named lock-files for locking
X#
X# If no locking protocol is defined, or a site prefers to use named
X# lock files for locking spool files, LOCK_BY_NAME should be defined
X# to be "yes", otherwise it should not be defined.
X
X#LOCK_BY_NAME=yes
X
X
X# FLOCK_MAILBOX - should mailbox files be locked with lock_fd_wait
X#
X# Set this to "yes" if the lock_fd_wait macro should be used to lock
X# mailbox files.  This should be used only with cooperation from all
X# mail user agents.  Otherwise, do not set this.
X
X#FLOCK_MAILBOX=yes
X
X
X# MAILBOX_DIR - in which directory are user mailbox files
X#
X# Normally this is either /usr/spool/mail for a V7/BSD-derived system
X# or /usr/mail for a System V derived system.
X
XMAILBOX_DIR=/usr/spool/mail
X
X
X# CONSOLE - name of the console device file
X#
X# This pathname is used as a last resort in writing panic messages from
X# smail.  Normally, it is /dev/console.
X
XCONSOLE=/dev/console
X
X
X# DECLARE_STRINGS - declare string routines, using macros as needed
X#
X# The following function names are used by smail and should be
X# declared using the C code below:
X#
X#	strcat(s1,s2)	- concatenate string s2 onto the end of s1
X#	strncat(s1,s2,n)- concatenate s2 onto s1 with length constraint n
X#	strcmp(s1,s2)	- compare strings s1 and s2
X#	strncmp(s1,s2,n)- compare s1 and s2 with length constraint n
X#	strcpy(s1,s2)	- copy string s2 to s1
X#	strncpy(s1,s2,n)- copy string s2 to s1 for at most n bytes
X#	strlen(s1)	- return the length of string s1
X#	index(s,c)	- point to first occurance of c in string s
X#	rindex(s,c)	- point to last occurance of c in string s
X#	bzero(b,n)	- zero n bytes starting at location b
X#	bcopy(b1,b2,n)	- copy b1 to b2 for n bytes
X#	bcmp(b1,b2,n)	- compree n bytes of b1 and b2, returning 0 if equal
X#	memcpy(b1,b2,n)	- copy b2 to b1 for n bytes
X#	memcmp(b1,b2,n)	- compare n bytes of b1 and b2, returning 0 if equal
X#	strpbrk(s1,s2)	- point to first occurance in s1 of any char in s2
X#	strspn(s1,s2)	- count of chars at beginning of s1 not in s2
X
XDECLARE_STRINGS="\
X#include <string.h>
X#define bzero(b,n)	(memset((b),'\0',(n)))
X#define bcopy(b1,b2,n)	(memcpy((b2),(b1),(n)))
X#define bcmp(b1,b2,n)	(memcmp((b1),(b2),(n)))
X#define index	strchr
X#define rindex	strrchr
X"
X
X
X# LIBS - name any object libraries containing routines we will need
X#
X# In particular, if networking routines and dbm routines are in libraries
X# other than libc, these libraries should be named here.
X
XLIBS=-ldbm			# use this if dbm was added to your system
X
X
X# DRIVER_CONFIGURATION - configuration file describing smail drivers
X#
X# Name the configuration file in the conf/driver directory which defines
X# a suitable set of smail director, router and transport drivers for
X# this operating system.
X
XDRIVER_CONFIGURATION=unix-generic
X
X
X# RANLIB - how do we organize an existing object archive library
X#
X# RANLIB should define the base for a shell command which, given an
X# object file archive, will organize that library for the loader.
X# If no such command is appropriate, set RANLIB to ":", to prevent
X# it from doing anything interesting.
X
XRANLIB=:
X
X
X# CHOWN - command to use for accessing the chown program
X#
X# Under Berkeley UNIX, chown is under /etc.  On most other computer systems
X# chown is in a normal PATH.  The CHOWN variable should be set appropriately
X# for this operating system.
X
XCHOWN=chown
X
X
X# HAVE_xxx - tell what is available under this operating system
X#
X# Set any of the following macros to "yes" if they apply to your
X# operating system.  Otherwise do not define them.
X
X#HAVE_RENAME=yes	# does the rename(2) system call exist (SCO: broken)
XHAVE_MKDIR=yes		# does mkdir exist in libc
X#HAVE_BSD_NETWORKING=yes# does this system support BSD-style networking
X#HAVE_SYSEXITS=yes	# does this system have /usr/include/sysexits.h
XHAVE_DBM=yes		# does this system have the dbm(3x) library
X#HAVE_NDBM=yes		# does this system have the new ndbm(3) functions
X#HAVE_YP=yes		# does this system use the SunOS YP service
XHAVE_BSTRING=yes	# does this system have bstring or similar routines
XHAVE_SYS5_STRLIB=yes	# does this system have strspn and strpbrk
XHAVE_GETOPT=yes		# does this system have getopt(3) in libc
X#HAVE_GETHOSTNAME=yes	# does this system have gethostname(2), as in BSD
XHAVE_UNAME=yes		# does this system have uname(2), as in System V
X#HAVE_HASH_BANG=yes	# does this system use #!/bin/sh in shell scripts
X#HAVE_DUP2=yes		# does this system have dup2(2)
XHAVE_READDIR=yes	# does this system have readdir(3) functions
X#GETHOSTNAME_USE_PTR=yes# use this for Genix 4.1bsd
X#INET_ADDR_USE_STRUCT=yes# use this if inet_addr() returns struct in_addr
XHAVE_VFPRINTF=yes	# does this system have vfprintf(3)
END_OF_FILE
if test 7821 -ne `wc -c <'sco_unix3.2'`; then
    echo shar: \"'sco_unix3.2'\" unpacked with wrong size!
fi
# end of 'sco_unix3.2'
fi
echo shar: End of shell archive.
exit 0
-- 
Chip Salzenberg at Teltronics/TCT     <chip@tct.uucp>, <uunet!pdn!tct!chip>
      "I'm really sorry I feel this need to insult some people..."
            -- John F. Haugh II    (He thinks HE'S sorry?)