This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

gcc-2.95.1 successfully installs on SunOS 4.1.3


cdp[/re/tmp/src/cdp/gcc]-2079# gcc-2.95.1/config.guess
sparc-sun-sunos4.1.3
cdp[/re/tmp/src/cdp/gcc]-2080# gcc --version
2.95.1

But I had to apply the following patch to make sure /usr/include/utime.h was
fixed.

-scott
=============================================================================
Date: Fri, 20 Aug 1999 17:57:13 -0700 (PDT)
Message-Id: <199908210057.RAA24115@igce.igc.org>
From: Scott Weikart <scott@igc.apc.org>
To: gcc-bugs@gcc.gnu.org
CC: scott@igc.org
Subject: bug in fix-header for SunOS 4.1.3

I got a coredump when fix-header tried to fix utime.h; here's my gdb session:

gdb fix-header
(gdb) Breakpoint 2 at 0xda80: file ../gcc-2.95.1/gcc/fix-header.c, line 1140.
(gdb) run utime.h /usr/include/utime.h /re/tmp/src/cdp/gcc/gcc/include/utime.h -D__STDC__=0 -D__cplusplus -I/re/tmp/src/cdp/gcc/gcc/include -I/usr/include


Breakpoint 2, main (argc=8, argv=0xeffff02c)
    at ../gcc-2.95.1/gcc/fix-header.c:1140
(gdb) p entry[0]
$1 = {name = 0x99d8 "utime.h", flags = 0, names = 0x99d0 "utime"}
(gdb) p entry[1]
$2 = {name = 0x0, flags = 0, names = 0x30a88 ""}

Here's the code fragment in question:

      for (entry = include_entry; ;)
	{
=>	  if (entry->flags)
	    add_symbols (entry->flags, entry->names);
	  entry++;
	  if (strcmp (entry->name, CONTINUED) != 0)
	    break;
	}

Since I don't really know what's going on, I used this brute-force patch to
make it work:

--- gcc-2.95.1/gcc/fix-header.c~	Mon Aug  2 00:38:04 1999
+++ gcc-2.95.1/gcc/fix-header.c	Fri Aug 20 17:42:37 1999
@@ -1140,7 +1140,7 @@
 	  if (entry->flags)
 	    add_symbols (entry->flags, entry->names);
 	  entry++;
-	  if (strcmp (entry->name, CONTINUED) != 0)
+	  if (!entry->name || strcmp (entry->name, CONTINUED) != 0)
 	    break;
 	}
     }

And here's the fixed file that was generated.

-scott
=============================================================================
/*	@(#)utime.h 1.3 89/06/25 SMI; from S5R2 1.1	*/

#ifndef	__utime_h
#ifndef _PARAMS
#if defined(__STDC__) || defined(__cplusplus)
#define _PARAMS(ARGS) ARGS
#else
#define _PARAMS(ARGS) ()
#endif
#endif /* _PARAMS */
#define	__utime_h

#include <sys/stdtypes.h>

/*
 * POSIX utime.h, utime() calls utimes()
 */

struct	utimbuf {
	time_t	actime;		/* set the access time */
	time_t	modtime;	/* set the modification time */
};

int	utime _PARAMS((const char *, const struct utimbuf *));

#endif	/* !__utime_h */

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]