*** make-3.62/Makefile	Wed Oct 30 02:04:27 1991
--- make-3.62/Makefile	Thu Feb  6 02:50:59 1992
***************
*** 19,26 ****
  #	Makefile for GNU Make
  #
  
! CFLAGS = $(defines) -g
! LDFLAGS = -g
  
  # Define these for your system as follows:
  # 	-DUSG			System V
--- 19,26 ----
  #	Makefile for GNU Make
  #
  
! CFLAGS = $(defines) -O	# -g -- got no debugger anyway (yet)
! LDFLAGS = 		# -g
  
  # Define these for your system as follows:
  # 	-DUSG			System V
***************
*** 38,44 ****
  #				without complaint but produce losing code,
  #				so beware.
  # NeXT 1.0a uses an old version of GCC, which required -D__inline=inline.
! defines =
  
  # Define these for your system as follows:
  #	-DUMAX		Encore UMAX
--- 38,44 ----
  #				without complaint but produce losing code,
  #				so beware.
  # NeXT 1.0a uses an old version of GCC, which required -D__inline=inline.
! defines = -DPOSIX -DNO_FLOAT -DLINUX
  
  # Define these for your system as follows:
  #	-DUMAX		Encore UMAX
***************
*** 52,58 ****
  # Define:
  #	-DNLIST_NAME_UNION	If `struct nlist' has a n_un member.
  #	-DNLIST_NAME_ARRAY	If `n_name' is an array.
! LOAD_AVG =
  
  # If you don't want archive support, comment these out.
  ARCHIVES = arscan.o ar.o
--- 52,58 ----
  # Define:
  #	-DNLIST_NAME_UNION	If `struct nlist' has a n_un member.
  #	-DNLIST_NAME_ARRAY	If `n_name' is an array.
! LOAD_AVG = -DNO_LDAV
  
  # If you don't want archive support, comment these out.
  ARCHIVES = arscan.o ar.o
*** make-3.62/commands.c	Tue Oct  8 20:20:30 1991
--- make-3.62/commands.c	Thu Feb  6 03:32:45 1992
***************
*** 342,348 ****
       int sig;
  {
    signal (sig, SIG_DFL);
! #ifndef USG
    (void) sigsetmask (0);
  #endif
  
--- 342,348 ----
       int sig;
  {
    signal (sig, SIG_DFL);
! #if	!defined(USG) && !defined(linux) && !defined(LINUX)
    (void) sigsetmask (0);
  #endif
  
*** make-3.62/glob/glob.c	Sat Oct 19 20:39:24 1991
--- make-3.62/glob/glob.c	Thu Feb  6 03:31:08 1992
***************
*** 18,23 ****
--- 18,24 ----
  
  /*  */
  
+ #include "make.h"
  #include <glob.h>
  #include <fnmatch.h>
  
***************
*** 108,117 ****
--- 109,121 ----
     If the declaration is omitted, everything works fine.  */
  #endif /* Not USG.  */
  
+ 
+ #if	!defined(LINUX) && !defined(linux)
  extern char *malloc();
  extern char *realloc();
  extern void free();
  extern void qsort();
+ #endif
  
  #ifdef	__GNUC__
  __inline
***************
*** 132,138 ****
  
  #endif /* Not STDC_HEADERS or __GNU_LIBRARY__.  */
  
! #ifndef	STDC_STRINGS
  #define	memcpy(d, s, n)	bcopy((s), (d), (n))
  #define	strrchr	rindex
  /* memset is only used for zero here, but let's be paranoid.  */
--- 136,142 ----
  
  #endif /* Not STDC_HEADERS or __GNU_LIBRARY__.  */
  
! #if	!defined(STDC_STRINGS) && !defined(linux) && !defined(LINUX)
  #define	memcpy(d, s, n)	bcopy((s), (d), (n))
  #define	strrchr	rindex
  /* memset is only used for zero here, but let's be paranoid.  */
*** make-3.62/job.c	Thu Oct 24 21:58:34 1991
--- make-3.62/job.c	Thu Feb  6 03:35:12 1992
***************
*** 117,123 ****
  extern int setgid (), getgid ();
  #endif	/* GNU C library.  */
  
! #ifndef USG
  extern int getdtablesize ();
  #else
  #include <sys/param.h>
--- 117,123 ----
  extern int setgid (), getgid ();
  #endif	/* GNU C library.  */
  
! #if	!defined(USG) && !defined(linux) && !defined(LINUX)
  extern int getdtablesize ();
  #else
  #include <sys/param.h>
***************
*** 129,135 ****
  extern int start_remote_job (), remote_status ();
  
  
! #if	(defined(USG) && !defined(HAVE_SIGLIST)) || defined(DGUX)
  static char *sys_siglist[NSIG];
  void init_siglist ();
  #else	/* Not (USG and HAVE_SIGLIST), or DGUX.  */
--- 129,135 ----
  extern int start_remote_job (), remote_status ();
  
  
! #if	(defined(USG) && !defined(HAVE_SIGLIST)) || defined(DGUX) || defined(linux) || defined(LINUX)
  static char *sys_siglist[NSIG];
  void init_siglist ();
  #else	/* Not (USG and HAVE_SIGLIST), or DGUX.  */
***************
*** 180,186 ****
  
  extern int fatal_signal_mask;
  
! #ifdef	USG
  /* Set nonzero in the interval when it's possible that we may see a dead
     child that's not in the `children' chain.  */
  static int unknown_children_possible = 0;
--- 180,186 ----
  
  extern int fatal_signal_mask;
  
! #if	defined(USG) || defined(linux) || defined(LINUX)
  /* Set nonzero in the interval when it's possible that we may see a dead
     child that's not in the `children' chain.  */
  static int unknown_children_possible = 0;
***************
*** 204,212 ****
--- 204,221 ----
  
  #else	/* Not USG.  */
  
+ #if defined(linux) || defined(LINUX)
+ 
+   unknown_children_possible = 1;
+   (void) SIGNAL (SIGCHLD, SIG_DFL);
+ 
+ #else
+ 
    /* Block the signals.  */
    (void) sigblock (fatal_signal_mask | sigmask (SIGCHLD));
  
+ #endif /* LINUX */
+ 
  #endif
  
    block_remote_children ();
***************
*** 225,232 ****
--- 234,248 ----
  
  #else	/* Not USG.  */
  
+ #if	defined(linux) || defined(LINUX)
+ 
+   (void) SIGNAL (SIGCHLD, child_handler);
+   unknown_children_possible = 0;
+ #else
+   
    /* Unblock the signals.  */
    (void) sigsetmask (sigblock (0) & ~(fatal_signal_mask | sigmask (SIGCHLD)));
+ #endif /* LINUX */
  
  #endif
  
*** make-3.62/main.c	Mon Sep  9 23:36:15 1991
--- make-3.62/main.c	Thu Feb  6 02:50:59 1992
***************
*** 321,329 ****
--- 321,333 ----
    FATAL_SIG (SIGDANGER);
  #endif
    FATAL_SIG (SIGFPE);
+ #ifdef	SIGBUS
    FATAL_SIG (SIGBUS);
+ #endif
    FATAL_SIG (SIGSEGV);
+ #ifdef	SIGSYS
    FATAL_SIG (SIGSYS);
+ #endif
    FATAL_SIG (SIGTERM);
  #ifdef SIGXCPU
    FATAL_SIG (SIGXCPU);
***************
*** 337,343 ****
    /* Make sure stdout is line-buffered.  */
  
  #if	(defined (USGr3) || defined (HPUX) || defined (hpux) \
! 	 || defined (M_XENIX) || defined (APOLLO))
    setvbuf (stdout, (char *) 0, _IOLBF, BUFSIZ);
  #else	/* Not USGr3 and not HPUX et al.  */
  #ifdef	USG
--- 341,347 ----
    /* Make sure stdout is line-buffered.  */
  
  #if	(defined (USGr3) || defined (HPUX) || defined (hpux) \
! 	 || defined (M_XENIX) || defined (APOLLO)) || defined(linux) || defined(LINUX)
    setvbuf (stdout, (char *) 0, _IOLBF, BUFSIZ);
  #else	/* Not USGr3 and not HPUX et al.  */
  #ifdef	USG
*** make-3.62/make.h	Sat Oct 26 21:19:59 1991
--- make-3.62/make.h	Thu Feb  6 03:26:58 1992
***************
*** 18,27 ****
--- 18,32 ----
  #define _GNU_SOURCE
  #include <sys/types.h>
  #include <sys/stat.h>
+ #include <sys/param.h>
  #include <signal.h>
  #include <stdio.h>
  #include <ctype.h>
  
+ #if	(defined(linux) || defined(LINUX)) && !defined(getdtablesize())
+ #define getdtablesize()	NOFILE
+ #endif
+ 
  #ifndef	isblank
  #define	isblank(c)	((c) == ' ' || (c) == '\t')
  #endif
***************
*** 129,134 ****
--- 134,140 ----
  #define bzero(s, n)	memset ((s), 0, (n))
  #define bcopy(s, d, n)	memcpy ((d), (s), (n))
  #endif
+ 
  #undef	ANSI_STRING
  
  
***************
*** 205,211 ****
  extern void user_access (), make_access (), child_access ();
  
  
! #if	defined(USG) && !defined(HAVE_VFORK)
  #define	vfork	fork
  #define	VFORK_NAME	"fork"
  #else	/* Have vfork or not USG.  */
--- 211,217 ----
  extern void user_access (), make_access (), child_access ();
  
  
! #if	( defined(USG) && !defined(HAVE_VFORK) ) || defined(LINUX) || defined(linux)
  #define	vfork	fork
  #define	VFORK_NAME	"fork"
  #else	/* Have vfork or not USG.  */
*** make-3.62/read.c	Thu Oct 10 20:20:55 1991
--- make-3.62/read.c	Thu Feb  6 03:08:53 1992
***************
*** 1477,1482 ****
--- 1477,1488 ----
  		}
  	      if (home_dir == 0 || home_dir[0] == '\0')
  		{
+ #if	defined(linux) || defined(LINUX)
+ 		  struct passwd *p = getpwuid(getuid());
+ 		  home_dir = 0;
+ 		  if (p != 0)
+ 		    home_dir = p->pw_dir;
+ #else
  		  extern char *getlogin ();
  		  char *name = getlogin ();
  		  home_dir = 0;
***************
*** 1486,1491 ****
--- 1492,1498 ----
  		      if (p != 0)
  			home_dir = p->pw_dir;
  		    }
+ #endif /* LINUX */
  		}
  	      if (home_dir != 0)
  		{
