From: andreas@knobel.GUN.de (Andreas Klemm)
Newsgroups: comp.unix.bsd
Subject: [386bsd] ELM-2.4.20 DIFFs, BILL JOLITZ, please read this
Summary: elm diffs for 386bsd
Keywords: 386bsd elm diffs
Date: 10 Jan 93 14:16:56 GMT
Organization: Andreas Klemm, 4040 Neuss, Germany

Hello world !

[ Bill an Lynne Jolitz: Please read this, thank you ! ]

I didn't get elm 2.4 PL 20 compiled and running correctly under
386bsd. Since Syd Weinstein didn't want to include my fixes, because
386bsd is in the change, I'm posting it to this newsgroup in the
hope it will be useful. Another reason is that some things should
be fixed in 386bsd, not in elm !

HOW TO PATCH:

Apply my patches in elm's source directory _AFTER_ you ran Configure.
That's important, because the file config.h in elm's top level
directory, which is being build by the Configure script, has
to be patched, too.

Then run:
	patch -p -N < Thisfile

Here a summary of my fixes:

lib/opt_utils.c:
	386bsd's ld is a bit rigid. It chokes on multiple defined
	library functions. toupper and tolower are already included
	in libc.a.
	BTW: in PL58 all problems with toupper and tolower are fixed.
	
	Is ld's behaviour fixed in 386bsd 0.2 ?

lib/posixsig.c:
	SIG_ERR isn't defined in 386bsd's header files.
	Therefore '-1' used instead.
	This define should be added in 386bsd's header files.

src/editmsg.c:
	Configure (I think) found out, that this system has POSIX
	signals. That's only partially true. in <setjump.h> there
	are some comments, that sigsetjump, ... aren't already
	supportet. Maybe in 0.2.
	For this file (posixsig) POSIX_SIGNALS has to be undefined
	and all seems to be ok.

config.h:
	After running Configure you have to undefine TZNAME 
	or you get a large negative number in the mailheader 
	insted of the correct date.

Have fun with elm,

Bye

	Andreas
	
+-------------------------------------------------------

*** ./lib/opt_utils.c.orig	Wed Dec 30 00:13:50 1992
--- ./lib/opt_utils.c	Wed Dec 30 00:14:22 1992
***************
*** 205,211 ****
  
  #endif
  
! #if defined(BSD) && !defined(_POSIX_SOURCE)
  
  /** some supplementary string functions for Berkeley Unix systems **/
  
--- 205,211 ----
  
  #endif
  
! #if defined(BSD) && !defined(_POSIX_SOURCE) && !defined(____386BSD____)
  
  /** some supplementary string functions for Berkeley Unix systems **/
  
*** ./lib/posixsig.c.orig	Tue Dec 29 23:54:18 1992
--- ./lib/posixsig.c	Tue Dec 29 23:56:39 1992
***************
*** 73,79 ****
--- 73,83 ----
  	sigemptyset(&oact.sa_mask);
  	if(sigaction(signo, &act, &oact))
  		/* If sigaction failed return -1 */
+ #if defined(____386BSD____)
+ 	    return(-1);
+ #else
  	    return(SIG_ERR);
+ #endif
  	else
          	/* use the previous signal handler as a return value */
  	    return(oact.sa_handler);
*** ./src/editmsg.c.orig	Wed Dec 30 00:24:16 1992
--- ./src/editmsg.c	Wed Dec 30 00:30:58 1992
***************
*** 57,65 ****
  #include "s_elm.h"
  #include <errno.h>
  #ifndef BSD
! /* BSD has already included setjmp.h in headers.h */
! #include <setjmp.h>
  #endif /* BSD */
  #include <ctype.h>
  
  #ifdef POSIX_SIGNALS
--- 57,71 ----
  #include "s_elm.h"
  #include <errno.h>
  #ifndef BSD
! #  include <setjmp.h>	/* BSD has already included setjmp.h in headers.h */
  #endif /* BSD */
+ 
+ #ifdef ____386BSD____
+ #   include <setjmp.h>
+ #   undef POSIX_SIGNALS	/* read comments in <setjmp.h>: sigsetjmp,...	*/
+ 			/* are unsupported				*/
+ #endif	/* 386BSD */
+ 
  #include <ctype.h>
  
  #ifdef POSIX_SIGNALS
*** config.h.orig	Sun Jan 10 14:11:11 1993
--- config.h	Sun Jan 10 14:11:50 1993
***************
*** 464,470 ****
   */
  #define	TZ_MINUTESWEST 	/**/
  
! #define	TZNAME	/**/
  
  /* USE_EMBEDDED_ADDRESSES:
   *	This symbol, if defined, indicates that replyto: and from:
--- 464,470 ----
   */
  #define	TZ_MINUTESWEST 	/**/
  
! /*#define	TZNAME	/**/
  
  /* USE_EMBEDDED_ADDRESSES:
   *	This symbol, if defined, indicates that replyto: and from:

#EOF -- This file isn't truncated
-- 
////// Andreas Klemm \\\\\\     /////// andreas@knobel.GUN.de \\\\\\\
private : +49 2137 12609        D-4040 Neuss 21 (Norf), Germany
at work : +49 2173 3964 165     Wiechers & Partner   Datentechnik GmbH
Telefax : +49 2173 3964 222     Abteilung Unix Support, D-4019 Monheim
Newsgroups: comp.unix.bsd