[net.news.b] bug in 2.10.2 news source under 4.2

phil@amd.UUCP (Phil Ngai) (07/27/84)

For reasons which are not clear to me, time.h was moved from
/usr/include to /usr/include/sys in 4.2BSD. The source for 2.10.2
news does not take this into account. The files params.h and getdate.y
need an ifdef for 4.2. I also made localize.sh add a -DBSD4_2 to
CFLAGS in Makefile and commented it out in defs.h. Here are the
diffs to params.h and getdate.y for the lazy.

*** /tmp/,RCSt1025354	Fri Jul 27 00:35:00 1984
--- params.h	Thu Jul 26 23:49:52 1984
***************
*** 11,16
  #include <pwd.h>
  #include <sys/stat.h>
  #include <ctype.h>
  #include <time.h>
  
  #include "defs.h"

--- 11,19 -----
  #include <pwd.h>
  #include <sys/stat.h>
  #include <ctype.h>
+ #ifdef BSD4_2
+ #include <sys/time.h>
+ #else
  #include <time.h>
  #endif BSD4_2
  #include "defs.h"
***************
*** 12,18
  #include <sys/stat.h>
  #include <ctype.h>
  #include <time.h>
! 
  #include "defs.h"
  
  #ifndef UNAME

--- 15,21 -----
  #include <sys/time.h>
  #else
  #include <time.h>
! #endif BSD4_2
  #include "defs.h"
  
  #ifndef UNAME
*** /tmp/,RCSt1025362	Fri Jul 27 00:35:37 1984
--- getdate.y	Fri Jul 27 00:02:15 1984
***************
*** 18,23
  #include <sys/timeb.h>
  #endif
  #include <ctype.h>
  #include <time.h>
  
  #define	NULL	0

--- 18,26 -----
  #include <sys/timeb.h>
  #endif
  #include <ctype.h>
+ #ifdef BSD4_2
+ #include <sys/time.h>
+ #else
  #include <time.h>
  #endif BSD4_2
  
***************
*** 19,24
  #endif
  #include <ctype.h>
  #include <time.h>
  
  #define	NULL	0
  #define daysec (24L*60L*60L)

--- 22,28 -----
  #include <sys/time.h>
  #else
  #include <time.h>
+ #endif BSD4_2
  
  #define	NULL	0
  #define daysec (24L*60L*60L)
-- 
 "amd70" is dead! long live "amd"!
 Phil Ngai (408) 982-6554
 UUCPnet: {ucbvax,decwrl,ihnp4,allegra,intelca}!amd!phil
 ARPAnet: amd!phil@decwrl.ARPA

mark@cbosgd.UUCP (Mark Horton) (07/28/84)

It's much easier just to do
	ln /usr/include/sys/time.h /usr/include/time.h
than to stick in ifdefs for a broken include file.

henry@utzoo.UUCP (Henry Spencer) (07/29/84)

> It's much easier just to do
> 	ln /usr/include/sys/time.h /usr/include/time.h
> than to stick in ifdefs for a broken include file.

It would also be socially useful, albeit more difficult, to find out
which Berkeley, uh, person made this gratuitous change and strangle him.
-- 
				Henry Spencer @ U of Toronto Zoology
				{allegra,ihnp4,linus,decvax}!utzoo!henry