Smail3 on ESIX V.3.2

Robert B. Nelson robert at netsoft.wimsey.bc.ca
Thu May 30 21:45:14 AEST 1991


In <368 at fallst.UUCP> tkevans at fallst.UUCP (Tim Evans) writes:

>Smail3, patchlevel 18 (is there a later patchlevel?) fails to
>make on my ESIX V.3.2, Rev. D, with the breakdown coming on the
>linking of ldinfo.o--the error is that the library libsocket.a
>can't be found.  This error occurs whether DRIVER_CONFIGURATION
>is null or defined as unix-generic.

>Has anyone gotten smail3 working with ESIX?  If so, do you
>have patches and/or instructions?  Thanks.
>-- 
>UUCP:		{rutgers|ames|uunet}!mimsy!woodb!fallst!tkevans
>INTERNET:	tkevans%fallst at wb3ffv.ampr.org
>Tim Evans	2201 Brookhaven Ct, Fallston, MD 21047

Yes, I have version 3.1.20 running under ESIX 3.2d.  I had to make some changes
to make it work with ESIX's _unsupported_ socket interface.  I figure others
using ESIX will want the changes and they aren't that long so I'm posting them
here.  I have also forwarded them to the smail buglist so hopefully they will
be incorporated into the next version of smail.

I am also including the changes required to EDITME for ESIX.  You will have
to decide how you want to configure the other items in EDITME.

--------------------------------C-U-T---H-E-R-E--------------------------------
--- conf/EDITME-dist	Sat Feb 23 01:18:45 1991
+++ conf/EDITME	Thu May 30 02:38:14 1991
@@ -94,7 +95,7 @@
 # is available.
 
 #OS_TYPE=bsd4.2				# 4.2 BSD systems
-OS_TYPE=bsd4.3				# 4.3 BSD systems
+#OS_TYPE=bsd4.3				# 4.3 BSD systems
 #OS_TYPE=cpc3.0				# Counterpoint C-XIX Release 3.0
 #OS_TYPE=forpro				# fortune FOR:Pro 2.1 to 3.1
 #OS_TYPE=stride2.2			# UniStride release 2.2
@@ -110,6 +111,7 @@
 #OS_TYPE=uts2.0				# UTS/580 release 2.0 load0
 #OS_TYPE=xenix5				# SCO Xenix System V
 #OS_TYPE=posix				# Generic P1003.1 system
+OS_TYPE=esix5.3			# Esix System V Release 3.2
 
 
 # ARCH_TYPE - architecture type
--- ../smail3_1_20/./src/routers/gethost.c	Sat Feb 23 01:20:46 1991
+++ ./src/routers/gethost.c	Thu Apr 11 03:38:08 1991
@@ -83,15 +83,23 @@
 #else	/* not CMC */
 
 # include <sys/types.h>
-# ifdef UNIX_CPC
-#  include <h/types42.h>
-#  include <h/socket.h>
-# else	/* not UNIX_CPC */
-#  include <sys/socket.h>
-# endif	/* not UNIX_CPC */
-# include <netdb.h>
-# include <netinet/in.h>
-# include <arpa/inet.h>
+
+# ifdef ESIX
+#  include <lan/socket.h>
+#  include <lan/netdb.h>
+#  include <lan/in.h>
+#  include <lan/inet.h>
+# else /* not ESIX */
+#  ifdef UNIX_CPC
+#   include <h/types42.h>
+#   include <h/socket.h>
+#  else	/* not UNIX_CPC */
+#    include <sys/socket.h>
+#  endif	/* not UNIX_CPC */
+#  include <netdb.h>
+#  include <netinet/in.h>
+#  include <arpa/inet.h>
+# endif
 
 #endif	/* not CMC */
 
--- ../smail3_1_20/./src/transports/tcpsmtp.c	Sat Feb 23 01:21:01 1991
+++ ./src/transports/tcpsmtp.c	Thu May 30 00:10:26 1991
@@ -26,7 +26,12 @@
 # include <sys/CMC/in.h>
 
 #else	/* not CMC */
-
+#ifdef	ESIX
+# include <lan/netdb.h>
+# include <sys/types.h>
+# include <lan/socket.h>
+# include <lan/in.h>
+#else
 # include <netdb.h>
 # include <sys/types.h>
 # ifdef	UNIX_CPC
@@ -36,6 +41,7 @@
 #  include <sys/socket.h>
 # endif	/* not UNIX_CPC */
 # include <netinet/in.h>
+#endif	/* not ESIX */
 
 #endif	/* not CMC */
 
@@ -97,6 +103,12 @@
 
     s = tcpsmtp_connect(addr->next_host, service, &error_text);
     if (s >= 0) {
+#ifdef	ESIX
+# include <stropts.h>
+	if (ioctl(s, I_PUSH, "tirdwr") < 0) {
+	    perror("tirdwr");
+	}
+#endif
 	s2 = dup(s);
 	if (s2 < 0) {
 	    (void) close(s);
--- ../smail3_1_20/./src/modes.c	Sat Feb 23 01:20:38 1991
+++ ./src/modes.c	Wed May 29 23:56:32 1991
@@ -31,15 +31,23 @@
 #include <errno.h>
 #include "defs.h"
 #if	defined(HAVE_BSD_NETWORKING)
-# ifdef UNIX_CPC
-#  include <h/types42.h>
-#  include <h/socket.h>
+# ifdef ESIX
+#  include <lan/socket.h>
+#  include <lan/in.h>
+#  include <lan/netdb.h>
+#  include <tiuser.h>
+#  include <stropts.h>
 # else
-#  include <sys/socket.h>
-# endif	/* not UNIX_CPC */
-# include <netinet/in.h>
-# include <netdb.h>
-# include <fcntl.h>
+#  ifdef UNIX_CPC
+#   include <h/types42.h>
+#   include <h/socket.h>
+#  else
+#   include <sys/socket.h>
+#  endif	/* not UNIX_CPC */
+#  include <netinet/in.h>
+#  include <netdb.h>
+#  include <fcntl.h>
+# endif
 #endif
 #include "config.h"
 #include "smail.h"
@@ -787,15 +791,27 @@
     }
 
     /* loop processing connect requests or alarm signals */
+#ifndef	ESIX
     (void) listen(ls, 5);
+#endif
+
     for (;;) {
 	int len = sizeof(from);
 
+#ifdef	ESIX
+	struct	t_call	*pcallreq;	/* Call indication listen -> accept */
+#endif
+
 	DEBUG1(DBG_MAIN_MID, "listening on port %d...\n",
 	       smtp_service->s_port);
 
 	/* get connection */
+#ifdef	ESIX
+	(void) listen(ls, &pcallreq);
+	as = accept(ls, (struct sockaddr *)&from, &len, &pcallreq);
+#else
 	as = accept(ls, (struct sockaddr *)&from, &len);
+#endif
 	if (as < 0 && errno != EINTR) {
 	    write_log(LOG_PANIC, "accept failed: %s", strerrno());
 	    continue;
@@ -858,6 +874,11 @@
 
     DEBUG1(DBG_MAIN_LO, "connection request from [%s]\n",
 	   inet_ntoa(from->sin_addr));
+#ifdef	ESIX
+    if (ioctl(fd, I_PUSH, "tirdwr") < 0) {
+	perror("tirdwr");
+    }
+#endif
     fd2 = dup(fd);
     if (fd2 < 0) {
 	FILE *f = fdopen(fd, "w");
--- /dev/null	Mon Jun 11 15:54:01 1990
+++ conf/os/esix5.3	Thu May 30 03:28:10 1991
@@ -0,0 +1,60 @@
+# @(#)conf/os/esix5.3
+#
+# esix5.3 - define the characteristics of ESIX System V release 3.2d
+
+# OSNAMES - Names defining this operating system
+OSNAMES=ESIX:UNIX_SYS5_3:UNIX_SYS5:UNIX
+
+# LOCKING_PROTOCOL - macros for efficient file locking
+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/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 bzero(b,n)	(memset((b),'\0',(n)))
+#define bcopy(b1,b2,n)	(memcpy((b2),(b1),(n)))
+#define bcmp(b1,b2,n)	(memcmp((b1),(b2),(n)))
+#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="-lPW -lnet_s -lnsl_s -lc_s"	# use this to get regcmp/regex
+
+# DRIVER_CONFIGURATION - configuration file describing smail drivers
+DRIVER_CONFIGURATION=bsd-network
+
+# RANLIB - how do we organize an existing object archive library
+RANLIB=:
+
+# CHOWN - command to use for accessing the chown program
+CHOWN=chown
+
+# HAVE - what features should be used with this operating system
+HAVE=MKDIR:BSD_NETWORKING:BSTRING:SYS5_STRLIB:UNAME:READDIR:VFPRINTF:GETOPT:DUP2
+
+# UUCP_SYSTEM_FILE - path to UUCP file containing remote systems
+#
+# Most (all?) SVR3 systems seem to have HDB UUCP.  If yours does not,
+# then override UUCP_SYSTEM_FILE in the EDITME file.  Set it to
+# /usr/lib/uucp/L.sys.
+UUCP_SYSTEM_FILE=/usr/lib/uucp/Systems
--------------------------------C-U-T---H-E-R-E--------------------------------

-- 
Robert B. Nelson                               NetSoft Systems Inc
Phone: (604) 261-3652                          1102 West 48th Avenue
INTERNET: robert at netsoft.wimsey.bc.ca          Vancouver, BC, CANADA, V6M 2N5



More information about the Comp.unix.sysv386 mailing list