🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.utils.bug
Article #228

Patches to GNU make for AIX & Concentrix

#228
From: Michael A. Cooper
Date: Sat, 08 Aug 1992 02:39
183 lines
5064 bytes
Below are diffs to get make 3.62 to compile and run under AIX 3.2
on the RS6000 and Concentrix2800 2.2 on the Alliant 2800.  There
seems to be duplicate header information in arscan.c and glob/glob.c
that appears in make.h, as I discovered when I made the fixes below.

	mike

*** arscan.c.ORIG	Fri Aug  7 18:37:11 1992
--- arscan.c	Fri Aug  7 18:38:05 1992
***************
*** 70,77 ****
--- 70,81 ----
  #endif	/* Standard headers.  */
  
  #ifdef	ANSI_STRING
+ #ifndef index
  #define	index(s, c)	strchr((s), (c))
+ #endif
+ #ifndef rindex
  #define	rindex(s, c)	strrchr((s), (c))
+ #endif
  
  #define bcmp(s1, s2, n)	memcmp ((s1), (s2), (n))
  #define bzero(s, n)	memset ((s), 0, (n))
*** make.h.ORIG	Fri Aug  7 18:34:43 1992
--- make.h	Fri Aug  7 19:28:25 1992
***************
*** 122,129 ****
--- 122,133 ----
  #endif	/* Standard headers.  */
  
  #ifdef	ANSI_STRING
+ #ifndef index
  #define	index(s, c)	strchr((s), (c))
+ #endif
+ #ifndef rindex
  #define	rindex(s, c)	strrchr((s), (c))
+ #endif
  
  #define bcmp(s1, s2, n)	memcmp ((s1), (s2), (n))
  #define bzero(s, n)	memset ((s), 0, (n))
***************
*** 139,145 ****
--- 143,153 ----
  #ifdef	sparc
  #include <alloca.h>
  #else	/* Not sparc.  */
+ #ifdef	_AIX
+ #pragma alloca
+ #else	/* Not _AIX.  */
  extern char *alloca ();
+ #endif	/* _AIX.  */
  #endif	/* sparc.  */
  #endif	/* GCC.  */
  
***************
*** 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.  */
--- 213,219 ----
  extern void user_access (), make_access (), child_access ();
  
  
! #if	(defined(USG) || defined(_AIX)) && !defined(HAVE_VFORK)
  #define	vfork	fork
  #define	VFORK_NAME	"fork"
  #else	/* Have vfork or not USG.  */
***************
*** 232,238 ****
  extern char *ctime ();
  #endif	/* GNU C library or POSIX.  */
  
! #if	defined(USG) || defined(POSIX) && !defined(__GNU_LIBRARY__)
  extern char *getcwd ();
  #ifdef	PATH_MAX
  #define	getwd(buf)	getcwd (buf, PATH_MAX - 2)
--- 240,246 ----
  extern char *ctime ();
  #endif	/* GNU C library or POSIX.  */
  
! #if	defined(USG) || defined(POSIX) && (!defined(__GNU_LIBRARY__) && !defined(HAVE_GETWD))
  extern char *getcwd ();
  #ifdef	PATH_MAX
  #define	getwd(buf)	getcwd (buf, PATH_MAX - 2)
*** glob/glob.c.ORIG	Fri Aug  7 18:38:14 1992
--- glob/glob.c	Fri Aug  7 19:04:50 1992
***************
*** 113,131 ****
  extern void free();
  extern void qsort();
  
- #ifdef	__GNUC__
- __inline
- #endif
- static char *
- my_realloc(p, n)
-      char *p;
-      unsigned int n;
- {
-   if (p == NULL)
-     return malloc(n);
-   return realloc(p, n);
- }
- 
  #define	realloc	my_realloc
  
  #define	strcoll	strcmp
--- 113,118 ----
***************
*** 133,144 ****
--- 120,137 ----
  #endif /* Not STDC_HEADERS or __GNU_LIBRARY__.  */
  
  #ifndef	STDC_STRINGS
+ #ifndef memcpy
  #define	memcpy(d, s, n)	bcopy((s), (d), (n))
+ #endif
+ #ifndef strrchr
  #define	strrchr	rindex
+ #endif
  /* memset is only used for zero here, but let's be paranoid.  */
+ #ifndef memset
  #define	memset(s, better_be_zero, n) \
    ((void) ((better_be_zero) == 0 ? (bzero((s), (n)), 0) : (abort(), 0)))
  #endif
+ #endif
  
  #if	!defined(__alloca) && !defined(__GNU_LIBRARY__)
  
***************
*** 148,154 ****
--- 141,151 ----
  #ifdef sparc
  #include <alloca.h>
  #else /* Not sparc.  */
+ #ifdef	_AIX
+ #pragma alloca
+ #else
  extern char *alloca();
+ #endif /* _AIX.  */
  #endif /* sparc.  */
  #endif /* GCC.  */
  
***************
*** 160,165 ****
--- 157,176 ----
  #undef	size_t
  #define	size_t	unsigned int
  #endif
+ 
+ #ifdef	__GNUC__
+ __inline
+ #endif
+ static char *
+ my_realloc(p, n)
+      char *p;
+      unsigned int n;
+ {
+   if (p == NULL)
+     return malloc(n);
+   return realloc(p, n);
+ }
+ 
  
  static int glob_pattern_p();
  static int glob_in_dir();
*** Makefile.ORIG	Thu Aug  6 14:02:08 1992
--- Makefile.ORIG.new	Fri Aug  7 19:36:15 1992
***************
*** 29,34 ****
--- 29,35 ----
  #	-DHAVE_SYS_WAIT		USG, but have <sys/wait.h> and wait3
  #	-DHAVE_SIGLIST		USG, but have sys_siglist
  #	-DHAVE_DUP2		USG and not USGr3, but have dup2
+ #	-DHAVE_GETWD		If your system really does have getwd()
  #	-DNO_MINUS_C_MINUS_O	cc can't handle "cc -c foo.c -o foo.o"
  #	-DPOSIX			A 1003.1 system (or trying to be)
  #	-DNO_ARCHIVES		To disable `ar' archive support.
Technical Details
Message-ID: <CMM.0.90.2.713241593.mcooper@acamar.usc.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!usc.edu!mcooper

Show Full Headers
Complete Article Headers
Newsgroups: gnu.utils.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!usc.edu!mcooper
From: mcooper@usc.edu (Michael A. Cooper)
Subject: Patches to GNU make for AIX & Concentrix
Message-ID: <CMM.0.90.2.713241593.mcooper@acamar.usc.edu>
Sender: gnulists@ai.mit.edu
Reply-To: mcooper@usc.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Sat, 8 Aug 1992 02:39:53 GMT
Approved: bug-gnu-utils@prep.ai.mit.edu
Lines: 184