🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.utils.bug
Article #1367

patches to gnu diff to make it compile under SysV

#1367
From: Andy Fyfe
Date: Wed, 05 Oct 1988 14:08
60 lines
1815 bytes
diff -c ./diff.h ../diff.h
*** ./diff.h	Tue Oct  4 02:21:53 1988
--- ../diff.h	Tue Oct  4 02:32:35 1988
***************
*** 24,31 ****
--- 24,38 ----
  #include <sys/file.h>
  #include <sys/types.h>
  #include <sys/stat.h>
+ #ifdef USG
+ #include <time.h>
+ #include <ndir.h>
+ #include <fcntl.h>
+ #include "usg.h"
+ #else
  #include <sys/time.h>
  #include <sys/dir.h>
+ #endif
  #include <errno.h>
  
  /* Support old-fashioned C compilers.  */
diff -c ./regex.c ../regex.c
*** ./regex.c	Tue Oct  4 02:21:17 1988
--- ../regex.c	Tue Oct  4 02:40:06 1988
***************
*** 109,114 ****
--- 109,122 ----
   then reads a string and searches for it.  */
  
  
+ #ifdef USG
+ #include "usg.h"
+ #endif
+ 
+ #ifdef __GNUC__
+ #define alloca	__builtin_alloca
+ #endif
+ 
  #ifdef emacs
  
  /* The `emacs' switch turns on certain special matching commands
diff -c ./usg.h ../usg.h
*** ./usg.h	Tue Oct  4 03:28:52 1988
--- ../usg.h	Tue Oct  4 02:50:11 1988
***************
*** 0 ****
--- 1,13 ----
+ /*
+  * a place for all those standard #defines when moving from bsd to sysv
+  */
+ 
+ #define bcopy(s,d,n)	memcpy((d),(s),(n))
+ #define bcmp(s1,s2,n)	memcmp((s1),(s2),(n))
+ #define bzero(s,n)	memset((s),0,(n))
+ 
+ #define dup2(f,t)	(close(t),fcntl((f),F_DUPFD,(t)))
+ 
+ #define vfork	fork
+ #define index	strchr
+ #define rindex	strrchr
Technical Details
Message-ID: <8810051408.AA08451@csvax.caltech.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!uunet!bu-cs!bloom-beacon!tut.cis.ohio-state.edu!CSVAX.CALTECH.EDU!andy

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!uunet!bu-cs!bloom-beacon!tut.cis.ohio-state.edu!CSVAX.CALTECH.EDU!andy
From: andy@CSVAX.CALTECH.EDU (Andy Fyfe)
Newsgroups: gnu.utils.bug
Subject: patches to gnu diff to make it compile under SysV
Message-ID: <8810051408.AA08451@csvax.caltech.edu>
Date: 5 Oct 88 14:08:39 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 60