[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: looking into smail and unaligned accesses



On Thu, 3 Dec 1998, Oscar Levi wrote:

> I am looking into smail, trying to eliminate the unaligned accesses I
> am finding in it.  What is odd is that the version I built on my
> machine is worse than the version that is packaged for slink.  Are
> there additional patches to the smail sources for alpha?  The version
> numbers don't suggest this.  Also, the size of the version I built is
> different from the slink/main/binary-alpha/mail version.

Yes.  I've submitted them, but so far, they haven't been incorporated.
I'll attach them below....

C

diff -ruN smail-3.2.0.100/conf/EDITME smail.work/conf/EDITME
--- smail-3.2.0.100/conf/EDITME	Thu Jan 22 14:32:50 1998
+++ smail.work/conf/EDITME	Thu Jan 22 13:22:01 1998
@@ -70,7 +70,8 @@
 #OS_TYPE=irix4.0			# SGI IRIX version 4.0
 #OS_TYPE=irix5				# SGI IRIX version 5 (5.2)
 #OS_TYPE=isc2.2.1			# Interactive release 2.2.1
-OS_TYPE=linux				# Linux-based GNU systems
+#OS_TYPE=linux				# Linux-based GNU systems
+OS_TYPE=linux-alpha			# Linux-based GNU Alpha systems
 #OS_TYPE=mips-bsd4.3			# MIPS Risc/OS in bsd universe
 #OS_TYPE=next2.0			# NeXT NeXTstep 2.x (and 3.x)
 #OS_TYPE=posix				# Any P1003.1/X3J11-conformant system
diff -ruN smail-3.2.0.100/conf/os/linux-alpha smail.work/conf/os/linux-alpha
--- smail-3.2.0.100/conf/os/linux-alpha	Wed Dec 31 19:00:00 1969
+++ smail.work/conf/os/linux-alpha	Thu Jan 22 13:20:41 1998
@@ -0,0 +1,73 @@
+#ident	"@(#)smail/conf/os:RELEASE-3_2:linux,v 1.4 1996/06/14 18:49:53 woods Exp"
+#
+# linux - describe characteristics of Linux
+#
+# Original by Ian Jackson <iwj10@cus.cam.ac.uk> for Debian GNU/Linux
+
+. $ROOT/conf/os/posix
+
+# lie through our teeth....
+OSNAMES=LINUX:UNIX:$OSNAMES
+
+# ARCH_TYPE - this is true for the DEC Alpha port, but not any other AFAIK...
+ARCH_TYPE=64bit
+
+LOCKING_PROTOCOL="\
+#include <unistd.h>
+#include <sys/file.h>
+#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)
+"
+
+#LOCK_BY_NAME=TRUE
+#FLOCK_MAILBOX=TRUE
+
+MAILBOX_DIR=/var/spool/mail
+
+OSLIBS=-ldb
+
+DRIVER_CONFIGURATION=arpa-network		# includes BIND/DNS router
+
+RANLIB=ranlib				# Behavior compatible with BSD
+
+# OS_HAVE - name the capabilities of this operating system
+HAVE=BIND:BSD_NETWORKING:COMSAT:FSYNC:FTRUNCATE\
+:GETHOSTNAME:HASH_BANG:NDBM:RENAME:RLIMIT\
+:SETGROUPS:SYSEXITS:ULIMIT:MEMMOVE:HDB_UUCP:$HAVE
+
+# NOTE:  Linux systems seem to have a <regexp.h> that's compatible
+# with the old SysV stuff, so the user might want to add USE_REGEXP_H
+# to the MISC_DEFINES in their EDITME.  Some Linux systems also seem
+# to have a P1003.2 <regex.h> too, and this should be used if it
+# works, and will be tried since none of the UNIX_SYS5* are on (nor
+# should be on) by default.
+
+MISC_DEFINES=INET_NTOA_USE_STRUCT
+
+: 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 */
+'
+
+: SOCKET_INCLUDES='
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <netdb.h>
+#ifdef HAVE_BIND
+# undef NOERROR		/* remove conflict in SVR4 header files */
+# include <arpa/nameser.h>
+# include <resolv.h>
+#endif
+'
+
+NOBODY=nobody		# BSD and SunOS-like systems
+SECURE_PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+COMPRESS=gzip
+COMP_FLAG=-9f
+DOT_Z=.gz
+UNCOMPRESS=gunzip
+ZCAT=zcat
diff -ruN smail-3.2.0.100/src/string.c smail.work/src/string.c
--- smail-3.2.0.100/src/string.c	Tue Nov 26 16:01:01 1996
+++ smail.work/src/string.c	Thu Jan 22 13:38:40 1998
@@ -222,11 +222,13 @@
     int errnum;
 {
     static char misc_err[50];		/* used when sprintf must be used */
+#if !defined(__GLIBC__) && !defined(__alpha)
 #if 0
     extern const char *const sys_errlist[];	/* 4.4BSD */
 #else
     extern char *sys_errlist[];		/* list of error strings */
 #endif
+#endif /* __GLIBC__ && __alpha */
     extern int sys_nerr;		/* number of entries in sys_errlist */
 
     if (errnum > sys_nerr || errnum < 0) {



Reply to: