diff -2rcwN make-3.64/Makefile amiga-make-3.64/Makefile
*** make-3.64/Makefile  Sun Apr 25 01:19:27 1993
--- amiga-make-3.64/Makefile    Sun Apr 25 00:54:08 1993
***************
*** 25,32 ****
  srcdir = $(VPATH)

! CC = gccv

! CFLAGS = -g
! LDFLAGS = -g -L/usr/local/lib

  # Define these for your system as follows:
--- 25,32 ----
  srcdir = $(VPATH)

! CC = gcc

! CFLAGS = -Wall #-g
! LDFLAGS = #-g -L/usr/local/lib

  # Define these for your system as follows:
***************
*** 38,46 ****
  #                             so beware.
  # NeXT 1.0a uses an old version of GCC, which required -D__inline=inline.
! defines = -DHAVE_CONFIG_H -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\"

  # Which flavor of remote job execution support to use.
  # The code is found in `remote-$(REMOTE).c'.
! REMOTE = cstms

  # If you are using the GNU C library, or have the GNU getopt functions in
--- 38,46 ----
  #                             so beware.
  # NeXT 1.0a uses an old version of GCC, which required -D__inline=inline.
! defines = -DHAVE_CONFIG_H #-DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\"

  # Which flavor of remote job execution support to use.
  # The code is found in `remote-$(REMOTE).c'.
! REMOTE = stub#cstms

  # If you are using the GNU C library, or have the GNU getopt functions in
***************
*** 59,63 ****
  # If your system doesn't have alloca, or the one provided is bad, define this.
  ALLOCA =
! ALLOCA_SRC = $(srcdir)/alloca.c

  # If your system needs extra libraries loaded in, define them here.
--- 59,63 ----
  # If your system doesn't have alloca, or the one provided is bad, define this.
  ALLOCA =
! ALLOCA_SRC = #$(srcdir)/alloca.c

  # If your system needs extra libraries loaded in, define them here.
***************
*** 65,69 ****
  # libPW.a is broken on HP9000s300 and HP9000s400 machines.  Use
  # alloca.c instead on those machines.
! LOADLIBES =  /usr/local/lib/libgetloadavg.a libcustoms.a

  # Any extra object files your system needs.
--- 65,69 ----
  # libPW.a is broken on HP9000s300 and HP9000s400 machines.  Use
  # alloca.c instead on those machines.
! LOADLIBES =  #/usr/local/lib/libgetloadavg.a libcustoms.a

  # Any extra object files your system needs.
***************
*** 108,112 ****
  MAKEINFO = makeinfo
  # Program to format Texinfo source into DVI files.
! TEXI2DVI = texi2dvi

  # Programs to make tags files.
--- 108,112 ----
  MAKEINFO = makeinfo
  # Program to format Texinfo source into DVI files.
! TEXI2DVI = virtex #texi2dvi

  # Programs to make tags files.
***************
*** 213,222 ****
        cd glob; $(MAKE) $@

! Makefile: config.status $(srcdir)/Makefile.in
!       $(SHELL) config.status
! config.h: stamp-config ;
! stamp-config: config.status $(srcdir)/config.h.in
!       $(SHELL) config.status
!       touch stamp-config

  configure: configure.in
--- 213,222 ----
        cd glob; $(MAKE) $@

! #Makefile: config.status $(srcdir)/Makefile.in
! #      $(SHELL) config.status
! #config.h: stamp-config ;
! #stamp-config: config.status $(srcdir)/config.h.in
! #      $(SHELL) config.status
! #      touch stamp-config

  configure: configure.in
diff -2rcwN make-3.64/arscan.c amiga-make-3.64/arscan.c
*** make-3.64/arscan.c  Mon Apr 12 20:52:46 1993
--- amiga-make-3.64/arscan.c    Sun Apr 25 00:22:19 1993
***************
*** 24,27 ****
--- 24,31 ----
  #endif

+ #ifdef amigados
+ #include <stdlib.h>
+ #endif
+
  #ifndef NO_ARCHIVES
  
diff -2rcwN make-3.64/config.h amiga-make-3.64/config.h
*** make-3.64/config.h  Sun Apr 25 01:20:16 1993
--- amiga-make-3.64/config.h    Sun Apr 25 00:02:52 1993
***************
*** 6,13 ****

  /* Define if you have alloca.h and it should be used (not Ultrix).  */
! /* #undef HAVE_ALLOCA_H */

  /* Define if you have the strcoll function and it is properly defined.  */
! /* #undef HAVE_STRCOLL */

  /* Define if you have unistd.h.  */
--- 6,13 ----

  /* Define if you have alloca.h and it should be used (not Ultrix).  */
! #undef HAVE_ALLOCA_H

  /* Define if you have the strcoll function and it is properly defined.        */
! #undef HAVE_STRCOLL

  /* Define if you have unistd.h.  */
***************
*** 15,19 ****

  /* Define if you have vfork.h.  */
! /* #undef HAVE_VFORK_H */

  /* Define vfork as fork if vfork does not work.  */
--- 15,19 ----

  /* Define if you have vfork.h.        */
! #undef HAVE_VFORK_H

  /* Define vfork as fork if vfork does not work.  */
***************
*** 21,25 ****

  /* Define if your struct nlist has an n_un member.  */
! /* #undef NLIST_NAME_UNION */

  /* Define if you have nlist.h.  */
--- 21,25 ----

  /* Define if your struct nlist has an n_un member.  */
! #undef NLIST_NAME_UNION

  /* Define if you have nlist.h.        */
***************
*** 27,31 ****

  /* Define if your C compiler doesn't accept -c and -o together.  */
! #define NO_MINUS_C_MINUS_O 1

  /* Define as the return type of signal handlers (int or void).  */
--- 27,31 ----

  /* Define if your C compiler doesn't accept -c and -o together.  */
! #undef NO_MINUS_C_MINUS_O

  /* Define as the return type of signal handlers (int or void).  */
***************
*** 35,54 ****
     argument and the buffer pointer as the third, as on System V
     before release 3.  */
! #define SETVBUF_REVERSED 1

  /* Define if you have the ANSI C header files.  */
! /* #undef STDC_HEADERS */

  /* Define if you don't have dirent.h, but have sys/dir.h.  */
! /* #undef SYSDIR */

  /* Define if you don't have dirent.h, but have sys/ndir.h.  */
! /* #undef SYSNDIR */

  /* Define if you do not have strings.h, index, bzero, etc..  */
! /* #undef USG */

  /* Define if the closedir function returns void instead of int.  */
! /* #undef VOID_CLOSEDIR */

  /* Define if on AIX 3.
--- 35,54 ----
     argument and the buffer pointer as the third, as on System V
     before release 3.  */
! #undef SETVBUF_REVERSED

  /* Define if you have the ANSI C header files.        */
! #undef STDC_HEADERS

  /* Define if you don't have dirent.h, but have sys/dir.h.  */
! #undef SYSDIR

  /* Define if you don't have dirent.h, but have sys/ndir.h.  */
! #undef SYSNDIR

  /* Define if you do not have strings.h, index, bzero, etc..  */
! #undef USG

  /* Define if the closedir function returns void instead of int.  */
! #undef VOID_CLOSEDIR

  /* Define if on AIX 3.
***************
*** 56,80 ****
     We just want to avoid a redefinition error message.  */
  #ifndef _ALL_SOURCE
! /* #undef _ALL_SOURCE */
  #endif

  /* Define if on MINIX.  */
! /* #undef _MINIX */

  /* Define if on MINIX.  */
! /* #undef _POSIX_1_SOURCE */

  /* Define if you need to in order for stat and other things to work.  */
! /* #undef _POSIX_SOURCE */

  /* Define on System V Release 4.  */
! /* #undef SVR4 */

  /* Define for Encore UMAX.  */
! /* #undef UMAX */

  /* Define for Encore UMAX 4.3 that has <inq_status/cpustats.h>
     instead of <sys/cpustats.h>.  */
! /* #undef UMAX4_3 */

  /* Define to `int' if <sys/types.h> doesn't define.  */
--- 56,80 ----
     We just want to avoid a redefinition error message.        */
  #ifndef _ALL_SOURCE
! #undef _ALL_SOURCE
  #endif

  /* Define if on MINIX.        */
! #undef _MINIX

  /* Define if on MINIX.        */
! #undef _POSIX_1_SOURCE

  /* Define if you need to in order for stat and other things to work.  */
! #undef _POSIX_SOURCE

  /* Define on System V Release 4.  */
! #undef SVR4

  /* Define for Encore UMAX.  */
! #undef UMAX

  /* Define for Encore UMAX 4.3 that has <inq_status/cpustats.h>
     instead of <sys/cpustats.h>.  */
! #undef UMAX4_3

  /* Define to `int' if <sys/types.h> doesn't define.  */
***************
*** 87,100 ****

  /* Define for DGUX with <sys/dg_sys_info.h>.  */
! /* #undef DGUX */

  /* Define if the `getloadavg' function needs to be run setuid or setgid.  */
! /* #undef GETLOADAVG_PRIVILEGED */

  /* Define if `union wait' is the type of the first arg to wait functions.  */
! /* #undef HAVE_UNION_WAIT */

  /* Define if `sys_siglist' is declared by <signal.h>.  */
! /* #undef SYS_SIGLIST_DECLARED */

  /* If using the C implementation of alloca, define if you know the
--- 87,100 ----

  /* Define for DGUX with <sys/dg_sys_info.h>.  */
! #undef DGUX

  /* Define if the `getloadavg' function needs to be run setuid or setgid.  */
! #undef GETLOADAVG_PRIVILEGED

  /* Define if `union wait' is the type of the first arg to wait functions.  */
! #undef HAVE_UNION_WAIT

  /* Define if `sys_siglist' is declared by <signal.h>.  */
! #undef SYS_SIGLIST_DECLARED

  /* If using the C implementation of alloca, define if you know the
***************
*** 105,109 ****
        STACK_DIRECTION = 0 => direction of growth unknown
   */
! /* #undef STACK_DIRECTION */

  /* Define to the name of the SCCS `get' command.  */
--- 105,109 ----
        STACK_DIRECTION = 0 => direction of growth unknown
   */
! #undef STACK_DIRECTION

  /* Define to the name of the SCCS `get' command.  */
***************
*** 117,121 ****

  /* Define if you have _sys_siglist.  */
! /* #undef HAVE__SYS_SIGLIST */

  /* Define if you have psignal.  */
--- 117,121 ----

  /* Define if you have _sys_siglist.  */
! #undef HAVE__SYS_SIGLIST

  /* Define if you have psignal.        */
***************
*** 138,151 ****

  /* Define if you have setreuid.  */
! /* #undef HAVE_SETREUID */

  /* Define if you have setregid.  */
! /* #undef HAVE_SETREGID */

  /* Define if you have waitpid.  */
! /* #undef HAVE_WAITPID */

  /* Define if you have wait3.  */
! /* #undef HAVE_WAIT3 */

  /* Define if you have the <limits.h> header file.  */
--- 138,152 ----

  /* Define if you have setreuid.  */
! #undef HAVE_SETREUID

  /* Define if you have setregid.  */
! #undef HAVE_SETREGID

+ /* Only one of the following two is needed */
  /* Define if you have waitpid.        */
! #define HAVE_WAITPID 1

  /* Define if you have wait3.  */
! #undef HAVE_WAIT3

  /* Define if you have the <limits.h> header file.  */
diff -2rcwN make-3.64/dir.c amiga-make-3.64/dir.c
*** make-3.64/dir.c     Mon Apr 12 20:51:44 1993
--- amiga-make-3.64/dir.c       Sun Apr 25 00:00:13 1993
***************
*** 488,492 ****
--- 488,496 ----
  /* Hooks for globbing.        */

+ #ifndef amigados
  #include <glob.h>
+ #else
+ #include "glob.h"
+ #endif

  /* Structure describing state of iterating through a directory hash table.  */
diff -2rcwN make-3.64/function.c amiga-make-3.64/function.c
*** make-3.64/function.c        Thu Apr 15 22:29:47 1993
--- amiga-make-3.64/function.c  Sun Apr 25 00:47:07 1993
***************
*** 22,25 ****
--- 22,28 ----
  #include "commands.h"
  #include "job.h"
+ #ifdef amigados
+ #include <stdlib.h>
+ #endif

  static char *string_glob ();
diff -2rcwN make-3.64/getopt.c amiga-make-3.64/getopt.c
*** make-3.64/getopt.c  Fri Apr 16 16:17:04 1993
--- amiga-make-3.64/getopt.c    Sun Apr 25 00:31:17 1993
***************
*** 53,56 ****
--- 53,59 ----

  #include <stdio.h>
+ #ifdef amigados
+ #include <string.h>
+ #endif

  /* Comment out all this code if we are using the GNU C Library, and are not
diff -2rcwN make-3.64/job.c amiga-make-3.64/job.c
*** make-3.64/job.c     Wed Apr 14 17:22:35 1993
--- amiga-make-3.64/job.c       Sun Apr 25 00:43:48 1993
***************
*** 24,28 ****
--- 24,32 ----

  /* Default path to search for executables.  */
+ #ifndef amigados
  static char default_path[] = ":/bin:/usr/bin";
+ #else
+ static char default_path[] = ":/bin:/usr/local/bin:/c";
+ #endif

  /* Default shell to use.  */
***************
*** 967,971 ****
  #endif
        if (groups != 0 && ngroups == -1)
!       ngroups = getgroups (ngroups_max, groups);
  #endif        /* Have getgroups.  */

--- 971,975 ----
  #endif
        if (groups != 0 && ngroups == -1)
!       ngroups = getgroups (ngroups_max, (int *)groups);
  #endif        /* Have getgroups.  */

***************
*** 993,999 ****
              && S_ISREG (st.st_mode))
            {
!             if (st.st_uid == geteuid ())
                perm = (st.st_mode & 0100);
!             else if (st.st_gid == getegid ())
                perm = (st.st_mode & 0010);
              else
--- 997,1003 ----
              && S_ISREG (st.st_mode))
            {
!             if ((uid_t)st.st_uid == geteuid ())
                perm = (st.st_mode & 0100);
!             else if ((gid_t)st.st_gid == getegid ())
                perm = (st.st_mode & 0010);
              else
diff -2rcwN make-3.64/main.c amiga-make-3.64/main.c
*** make-3.64/main.c    Wed Apr 14 18:20:33 1993
--- amiga-make-3.64/main.c      Sun Apr 25 00:46:09 1993
***************
*** 23,27 ****
  #include "job.h"
  #include "getopt.h"
!

  extern char *version_string;
--- 23,29 ----
  #include "job.h"
  #include "getopt.h"
! #ifdef amigados
! #include <stdlib.h>
! #endif

  extern char *version_string;
diff -2rcwN make-3.64/read.c amiga-make-3.64/read.c
*** make-3.64/read.c    Thu Apr 15 22:30:01 1993
--- amiga-make-3.64/read.c      Sun Apr 25 00:04:43 1993
***************
*** 82,89 ****
--- 82,95 ----
  static char *default_include_directories[] =
    {
+ #ifndef amigados
      INCLUDEDIR,
      "/usr/gnu/include",
      "/usr/local/include",
      "/usr/include",
+ #else
+     "/gcc/include",
+     "/gcc/g++-include",
+     "/gcc/os-include",
+ #endif
      0
    };
diff -2rcwN make-3.64/remake.c amiga-make-3.64/remake.c
*** make-3.64/remake.c  Mon Apr 12 20:52:45 1993
--- amiga-make-3.64/remake.c    Sun Apr 25 00:06:13 1993
***************
*** 964,970 ****
--- 964,975 ----
    static char *dirs[] =
      {
+ #ifndef amigados
        "/lib",
        "/usr/lib",
        LIBDIR,                 /* Defined by configuration.  */
+ #else
+       "/gcc/lib",
+       "/gcc/blib",
+ #endif
        0
      };
***************
*** 974,978 ****
--- 979,987 ----

    /* Buffer to construct possible names in.  */
+ #ifndef amigados
    char *buf = xmalloc (sizeof (LIBDIR) + 8 + strlen (libname) + 4 + 2 + 1);
+ #else
+   char *buf = xmalloc (8 + strlen (libname) + 9 + 2 + 1);
+ #endif
    char *file, **dp;

