[comp.mail.misc] Deliver 2.0 Patch #4

chip@ateng.com (Chip Salzenberg) (12/16/89)

Changes in patch #4 to Deliver 2.0:

1.  Configuration of setvbuf() is now based on these definitions:
	SETVBUF_BUF_TYPE     setvbuf(.., buf, type, ..)
	SETVBUF_TYPE_BUF     setvbuf(.., type, buf, ..)
    If neither of these is defined, then setvbuf() is not called at all.
    This change is prompted by the occasional configuration mistakes that
    result in core dumps.

2.  The setlinebuf() and setvbuf() functions are no longer (re)defined in
    misc.h.  We now depend on <stdio.h>.  Since they return int, no danger.

3.  Timezone interpretation code has been modified for Ultrix, which
    doesn't define the DST_CAN macro.

This patch contains changes to the following files:
	patchlevel.h
	config.h
	misc.h
	unctime.y

Index: patchlevel.h
Prereq: 3
***************
*** 1,1 ****
! #define PATCHLEVEL 3
--- 1,1 ----
! #define PATCHLEVEL 4

Index: config.h
***************
*** 1,3 ****
! /* $Header: config.h,v 2.5 89/11/10 12:23:49 network Exp $
   *
   * Deliver configuration.
--- 1,3 ----
! /* $Header: config.h,v 2.6 89/12/14 17:42:25 network Exp $
   *
   * Deliver configuration.
***************
*** 4,7 ****
--- 4,10 ----
   *
   * $Log:	config.h,v $
+  * Revision 2.6  89/12/14  17:42:25  network
+  * Rework setvbuf() configuration to avoid errors.
+  * 
   * Revision 2.5  89/11/10  12:23:49  network
   * Handle recursion.
***************
*** 58,61 ****
--- 61,81 ----
  
  /*----------------------------------------------------------------------
+  * Argument order for setvbuf():
+  *     SETVBUF_BUF_TYPE     (.., buf, type, ..)         (Correct)
+  *     SETVBUF_TYPE_BUF     (.., type, buf, ..)         (Broken)
+  *
+  * Broken systems that need SETVBUF_TYPE_BUF include:
+  *     SCO Xenix development system 2.2
+  *     SysVR3.0 (Probably)
+  *     SysVR3.1 (Maybe)
+  *
+  * If neither is defined, then setvbuf() will not be called.
+  * >>> Be sure to get this one right, or the program will dump core. <<<
+  */
+ 
+ #define SETVBUF_BUF_TYPE
+ /* #define SETVBUF_TYPE_BUF */
+ 
+ /*----------------------------------------------------------------------
   * Signal function declaration.
   * Define this if your <signal.h> doesn't declare signal() correctly.
***************
*** 175,185 ****
  
  /*----------------------------------------------------------------------
-  * Is setvbuf() backwards?
-  * Note: this is true for SCO Xenix Development System 2.2.
-  */
- 
- /* #define REVERSE_SETVBUF */
- 
- /*----------------------------------------------------------------------
   * Name of shell used to execute delivery files.
   */
--- 195,198 ----

Index: misc.h
***************
*** 1,3 ****
! /* $Header: misc.h,v 2.2 89/10/02 10:36:43 network Exp $
   *
   * Miscellaneous definitions.
--- 1,3 ----
! /* $Header: misc.h,v 2.3 89/12/14 17:43:10 network Exp $
   *
   * Miscellaneous definitions.
***************
*** 4,7 ****
--- 4,10 ----
   *
   * $Log:	misc.h,v $
+  * Revision 2.3  89/12/14  17:43:10  network
+  * Rework setvbuf() configuration to avoid errors.
+  * 
   * Revision 2.2  89/10/02  10:36:43  network
   * Declare exit() as void.
***************
*** 119,128 ****
  #ifdef USG
  
! extern  int     setvbuf();
! 
! #ifdef REVERSE_SETVBUF
  #define Linebuf(f)      (void) setvbuf(f, _IOLBF, (char *)NULL, BUFSIZ)
  #else
! #define Linebuf(f)      (void) setvbuf(f, (char *)NULL, _IOLBF, BUFSIZ)
  #endif
  
--- 122,131 ----
  #ifdef USG
  
! #if   defined(SETVBUF_BUF_TYPE)
! #define Linebuf(f)      (void) setvbuf(f, (char *)NULL, _IOLBF, BUFSIZ)
! #elif defined(SETVBUF_TYPE_BUF)
  #define Linebuf(f)      (void) setvbuf(f, _IOLBF, (char *)NULL, BUFSIZ)
  #else
! #define Linebuf(f)      (void) setbuf(f, (char *)NULL)
  #endif
  
***************
*** 130,135 ****
  #ifdef BSD
  
- extern  int     setlinebuf();
- 
  #define Linebuf(f)      (void) setlinebuf(f)
  
--- 133,136 ----

Index: unctime.y
***************
*** 1,4 ****
  /*
!  * $Header: unctime.y,v 2.2 89/10/31 12:15:45 network Exp $
   *
   * Conversion of ctime-style date string back to a time_t.
--- 1,4 ----
  /*
!  * $Header: unctime.y,v 2.3 89/12/14 17:33:56 network Exp $
   *
   * Conversion of ctime-style date string back to a time_t.
***************
*** 7,10 ****
--- 7,13 ----
   *
   * $Log:	unctime.y,v $
+  * Revision 2.3  89/12/14  17:33:56  network
+  * Fix for Ultrix, which doesn't define DST_CAN.
+  * 
   * Revision 2.2  89/10/31  12:15:45  network
   * Fix erroneous cast in BSD-specific code.
***************
*** 348,351 ****
--- 351,355 ----
  
  /* Canada is same as US, except no early 70's insanity. */
+ #ifdef DST_CAN
  static struct dstinfo
  can_dst[] =
***************
*** 353,356 ****
--- 357,361 ----
    0, 119, 303
  };
+ #endif
  
  struct dst_rules
***************
*** 369,373 ****
--- 374,380 ----
    DST_MET, meur_dst, 60,
    DST_EET, meur_dst, 60,
+ #ifdef DST_CAN
    DST_CAN, can_dst, 60,
+ #endif
    -1, 0, 0
  };
-- 
You may redistribute this article only to those who may freely do likewise.
Chip Salzenberg at A T Engineering;  <chip@ateng.com> or <uunet!ateng!chip>
	  "The Usenet, in a very real sense, does not exist."