This is the mail archive of the gcc-patches@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]

Patch to nuke POSIX and MAXPATHLEN from xm-*.h


This patch removes POSIX and MAXPATHLEN from the xm-*.h files.

Tested by configuring crosses on various targets and examining tconfig.h:

alpha-unknown-freebsd
i386-unknown-gnu
i386-unknown-linux-gnu
m88k-unknown-openbsd
vax-unknown-openbsd

Plus, bootstrap underway on solaris2.7.  Assuming that completes, okay
to install?

		Thanks,
		--Kaveh

2001-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* config/alpha/xm-alpha.h, config/arm/xm-arm.h,
	config/i386/xm-cygwin.h, config/ns32k/xm-pc532-min.h,
	config/we32k/xm-we32k.h, config/xm-linux.h: Delete references to
	the POSIX and MAXPATHLEN macros.

	* config/i386/xm-gnu.h, config/xm-gnu.h,
	config/alpha/xm-openbsd.h, config/i386/xm-openbsd.h,
	config/m68k/xm-openbsd.h, config/mips/xm-openbsd.h,
	config/sparc/xm-openbsd.h, config/xm-openbsd.h: Delete empty
	and/or unused files.

	* config.gcc: Define POSIX in xm_defines as appropriate in lieu of
	doing so in various xm-*.h files.

	* fixinc/fixlib.h: Don't define MAXPATHLEN.

	* system.h: Provide a global MAXPATHLEN default.

f:
	* com.c: Don't rely on the POSIX macro to define autoconf stuff.


diff -rup orig/egcs-CVS20010307/gcc/config/alpha/xm-alpha.h egcs-CVS20010307/gcc/config/alpha/xm-alpha.h
--- orig/egcs-CVS20010307/gcc/config/alpha/xm-alpha.h	Tue Mar  6 09:13:13 2001
+++ egcs-CVS20010307/gcc/config/alpha/xm-alpha.h	Wed Mar  7 23:22:55 2001
@@ -29,7 +29,3 @@ Boston, MA 02111-1307, USA.  */
 #ifndef __GNUC__
 #define ONLY_INT_FIELDS
 #endif
-
-/* OSF/1 is POSIX.1 compliant.  */
-
-#define POSIX
diff -rup orig/egcs-CVS20010307/gcc/config/alpha/xm-openbsd.h egcs-CVS20010307/gcc/config/alpha/xm-openbsd.h
--- orig/egcs-CVS20010307/gcc/config/alpha/xm-openbsd.h	Sat Feb 24 03:17:40 2001
+++ egcs-CVS20010307/gcc/config/alpha/xm-openbsd.h	Wed Mar  7 23:08:28 2001
@@ -1,22 +0,0 @@
-/* Configuration file for an host running alpha OpenBSD.
-   Copyright (C) 1999 Free Software Foundation, Inc.
-
-This file is part of GNU CC.
-
-GNU CC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU CC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING.  If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.  */
-
-#include <xm-openbsd.h>
-#include <alpha/xm-alpha.h>
diff -rup orig/egcs-CVS20010307/gcc/config/arm/xm-arm.h egcs-CVS20010307/gcc/config/arm/xm-arm.h
--- orig/egcs-CVS20010307/gcc/config/arm/xm-arm.h	Tue Mar  6 09:13:14 2001
+++ egcs-CVS20010307/gcc/config/arm/xm-arm.h	Wed Mar  7 23:23:27 2001
@@ -30,9 +30,3 @@ Boston, MA 02111-1307, USA.  */
 #define HOST_FLOAT_FORMAT IEEE_FLOAT_FORMAT
 
 #define HOST_FLOAT_WORDS_BIG_ENDIAN 1
-
-/* If we have defined POSIX, but are compiling in the BSD environment, then
-   we need to define getcwd in terms of getwd.  */
-#if defined (POSIX) && defined (_BSD_C)
-#define HAVE_GETWD 1
-#endif
diff -rup orig/egcs-CVS20010307/gcc/config/i386/xm-cygwin.h egcs-CVS20010307/gcc/config/i386/xm-cygwin.h
--- orig/egcs-CVS20010307/gcc/config/i386/xm-cygwin.h	Tue Dec 28 11:36:09 1999
+++ egcs-CVS20010307/gcc/config/i386/xm-cygwin.h	Wed Mar  7 23:01:49 2001
@@ -54,8 +54,3 @@ do {									\
 } while (0)
 
 #define PATH_SEPARATOR ':'
-
-/* This is needed so that protoize will compile.  */
-#ifndef POSIX
-#define POSIX
-#endif
diff -rup orig/egcs-CVS20010307/gcc/config/i386/xm-gnu.h egcs-CVS20010307/gcc/config/i386/xm-gnu.h
--- orig/egcs-CVS20010307/gcc/config/i386/xm-gnu.h	Sat Feb 24 03:17:40 2001
+++ egcs-CVS20010307/gcc/config/i386/xm-gnu.h	Wed Mar  7 23:14:02 2001
@@ -1,4 +0,0 @@
-/* Configuration for GCC for Intel i386 running GNU as host.  */
-
-#include <i386/xm-i386.h>
-#include <xm-gnu.h>
diff -rup orig/egcs-CVS20010307/gcc/config/i386/xm-openbsd.h egcs-CVS20010307/gcc/config/i386/xm-openbsd.h
--- orig/egcs-CVS20010307/gcc/config/i386/xm-openbsd.h	Sat Feb 24 03:17:40 2001
+++ egcs-CVS20010307/gcc/config/i386/xm-openbsd.h	Wed Mar  7 23:08:40 2001
@@ -1,22 +0,0 @@
-/* Configuration file for i386 hosts running OpenBSD.
-   Copyright (C) 1999 Free Software Foundation, Inc.
-
-This file is part of GNU CC.
-
-GNU CC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU CC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING.  If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.  */
-
-#include <xm-openbsd.h>
-#include <i386/xm-i386.h>
diff -rup orig/egcs-CVS20010307/gcc/config/m68k/xm-openbsd.h egcs-CVS20010307/gcc/config/m68k/xm-openbsd.h
--- orig/egcs-CVS20010307/gcc/config/m68k/xm-openbsd.h	Sat Feb 24 03:17:40 2001
+++ egcs-CVS20010307/gcc/config/m68k/xm-openbsd.h	Wed Mar  7 23:08:54 2001
@@ -1,22 +0,0 @@
-/* Configuration file for an host running m68k OpenBSD.
-   Copyright (C) 1999 Free Software Foundation, Inc.
-
-This file is part of GNU CC.
-
-GNU CC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU CC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING.  If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.  */
-
-#include <xm-openbsd.h>
-#include <m68k/xm-m68k.h>
diff -rup orig/egcs-CVS20010307/gcc/config/mips/xm-openbsd.h egcs-CVS20010307/gcc/config/mips/xm-openbsd.h
--- orig/egcs-CVS20010307/gcc/config/mips/xm-openbsd.h	Wed Mar  7 18:46:46 2001
+++ egcs-CVS20010307/gcc/config/mips/xm-openbsd.h	Wed Mar  7 23:09:08 2001
@@ -1,22 +0,0 @@
-/* Configuration file for an host running mips OpenBSD. 
-   Copyright (C) 1999 Free Software Foundation, Inc.
-
-This file is part of GNU CC.
-
-GNU CC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU CC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING.  If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.  */
-
-#include <xm-openbsd.h>
-#include <mips/xm-mips.h>
diff -rup orig/egcs-CVS20010307/gcc/config/ns32k/xm-pc532-min.h egcs-CVS20010307/gcc/config/ns32k/xm-pc532-min.h
--- orig/egcs-CVS20010307/gcc/config/ns32k/xm-pc532-min.h	Wed Dec 16 16:10:52 1998
+++ egcs-CVS20010307/gcc/config/ns32k/xm-pc532-min.h	Wed Mar  7 23:36:08 2001
@@ -1,7 +1,3 @@
 #ifndef HZ
 #define HZ 60
 #endif
-
-#ifndef MAXPATHLEN
-#define MAXPATHLEN 1024
-#endif
diff -rup orig/egcs-CVS20010307/gcc/config/sparc/xm-openbsd.h egcs-CVS20010307/gcc/config/sparc/xm-openbsd.h
--- orig/egcs-CVS20010307/gcc/config/sparc/xm-openbsd.h	Sat Feb 24 03:17:40 2001
+++ egcs-CVS20010307/gcc/config/sparc/xm-openbsd.h	Wed Mar  7 23:08:18 2001
@@ -1,22 +0,0 @@
-/* Configuration file for an host running sparc OpenBSD.
-   Copyright (C) 1999 Free Software Foundation, Inc.
-
-This file is part of GNU CC.
-
-GNU CC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU CC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING.  If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.  */
-
-#include <xm-openbsd.h>
-#include <sparc/xm-sparc.h>
diff -rup orig/egcs-CVS20010307/gcc/config/we32k/xm-we32k.h egcs-CVS20010307/gcc/config/we32k/xm-we32k.h
--- orig/egcs-CVS20010307/gcc/config/we32k/xm-we32k.h	Tue Mar  6 09:13:18 2001
+++ egcs-CVS20010307/gcc/config/we32k/xm-we32k.h	Wed Mar  7 23:36:36 2001
@@ -21,7 +21,3 @@ Boston, MA 02111-1307, USA.  */
 
 /* This describes the machine the compiler is hosted on.  */
 #define HOST_WORDS_BIG_ENDIAN
-
-#ifndef MAXPATHLEN
-#define MAXPATHLEN 512
-#endif
diff -rup orig/egcs-CVS20010307/gcc/config/xm-gnu.h egcs-CVS20010307/gcc/config/xm-gnu.h
--- orig/egcs-CVS20010307/gcc/config/xm-gnu.h	Fri Mar  2 22:32:00 2001
+++ egcs-CVS20010307/gcc/config/xm-gnu.h	Wed Mar  7 23:14:10 2001
@@ -1,26 +0,0 @@
-/* Configuration for GNU C-compiler for hosts running GNU.
-   Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
-
-This file is part of GNU CC.
-
-GNU CC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU CC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING.  If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.  */
-
-/* This file defines machine-independent things specific to a host
-   running GNU.  This file should not be specified as $xm_file itself;
-   instead $xm_file should be CPU/xm-gnu.h, which should include both
-   CPU/xm-CPU.h and this file xm-gnu.h.  */
-
-#define POSIX			/* GNU complies to POSIX.1.  */
diff -rup orig/egcs-CVS20010307/gcc/config/xm-linux.h egcs-CVS20010307/gcc/config/xm-linux.h
--- orig/egcs-CVS20010307/gcc/config/xm-linux.h	Tue Apr 18 18:34:10 2000
+++ egcs-CVS20010307/gcc/config/xm-linux.h	Wed Mar  7 23:19:22 2001
@@ -19,9 +19,6 @@ along with GNU CC; see the file COPYING.
 the Free Software Foundation, 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
-#undef  POSIX
-#define POSIX
-
 /* We do have one, but I'd like to use the one come with gcc since
    we have been doing that for a long time with USG defined.  H.J. */
 #undef HAVE_STAB_H
diff -rup orig/egcs-CVS20010307/gcc/config/xm-openbsd.h egcs-CVS20010307/gcc/config/xm-openbsd.h
--- orig/egcs-CVS20010307/gcc/config/xm-openbsd.h	Tue Mar  6 08:41:36 2001
+++ egcs-CVS20010307/gcc/config/xm-openbsd.h	Wed Mar  7 23:03:06 2001
@@ -1,29 +0,0 @@
-/* Configuration fragment for hosts running a version of OpenBSD.
-   Copyright (C) 1999 Free Software Foundation, Inc.
-
-This file is part of GNU CC.
-
-GNU CC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU CC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING.  If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.  */
-
-/* This file gets included by all architectures. It holds stuff
-   that ought to be defined when hosting a compiler on an OpenBSD
-   machine, independently of the architecture. It's included by
-   ${cpu_type}/xm-openbsd.h, not included directly.  */
-
-/* OpenBSD is trying to be POSIX-compliant, to the point of fixing
-   problems that may occur with gcc's interpretation.  */
-#undef POSIX
-#define POSIX
diff -rup orig/egcs-CVS20010307/gcc/config.gcc egcs-CVS20010307/gcc/config.gcc
--- orig/egcs-CVS20010307/gcc/config.gcc	Wed Mar  7 18:46:50 2001
+++ egcs-CVS20010307/gcc/config.gcc	Wed Mar  7 23:22:05 2001
@@ -264,7 +264,7 @@ case $machine in
 	# On the Hurd, the setup is just about the same on
 	# each different CPU.  The specific machines that we
 	# support are matched above and just set $cpu_type.
-	xm_file="xm-gnu.h ${xm_file}"
+	xm_defines=POSIX
 	tm_file="${cpu_type}/gnu.h"
 	extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
 	# GNU always uses ELF.
@@ -288,8 +288,7 @@ case $machine in
 *-*-openbsd*)
 	tm_file=${cpu_type}/openbsd.h
 	tmake_file="t-libc-ok t-openbsd"
-	# avoid surprises, always provide an xm-openbsd file 
-	xm_file=${cpu_type}/xm-openbsd.h
+	xm_defines=POSIX
 	# don't depend on processor x-fragments as well
 	xmake_file=none
 	if test x$enable_threads = xyes; then
@@ -371,6 +370,7 @@ alpha-*-interix)
 	#local_prefix='$$INTERIX_ROOT'/usr/contrib
 	;;
 alpha*-*-linux*ecoff*)
+	xm_defines=POSIX
 	tm_file="${tm_file} alpha/linux-ecoff.h alpha/linux.h"
 	target_cpu_default="MASK_GAS"
 	tmake_file="alpha/t-alpha alpha/t-ieee"
@@ -401,6 +401,7 @@ alpha*-*-linux*)
 	fi
 	;;
 alpha*-*-freebsd*)
+	xm_defines=POSIX
 	tm_file="${tm_file} freebsd.h alpha/elf.h alpha/freebsd.h"
 	target_cpu_default="MASK_GAS"
 	tmake_file="t-freebsd alpha/t-crtbe alpha/t-alpha alpha/t-ieee"
@@ -416,6 +417,7 @@ alpha*-*-freebsd*)
 	esac
 	;;
 alpha*-*-netbsd*)
+	xm_defines=POSIX
 	tm_file="${tm_file} alpha/elf.h alpha/netbsd.h alpha/netbsd-elf.h"
 	target_cpu_default="MASK_GAS"
 	tmake_file="alpha/t-crtbe alpha/t-alpha alpha/t-ieee"
@@ -431,6 +433,7 @@ alpha*-*-openbsd*)
 	;;
 	
 alpha*-dec-osf*)
+	xm_defines=POSIX
 	if test x$stabs = xyes
 	then
 		tm_file="${tm_file} dbx.h"
@@ -469,6 +472,7 @@ alpha*-dec-osf*)
 	esac
 	;;
 alpha*-*-vxworks*)
+	xm_defines=POSIX
 	tm_file="${tm_file} dbx.h alpha/vxworks.h"
 	tmake_file="alpha/t-alpha alpha/t-ieee"
 	if [ x$gas != xyes ]
@@ -479,6 +483,7 @@ alpha*-*-vxworks*)
 	thread_file='vxworks'
 	;;
 alpha*-dec-vms*)
+	xm_defines=POSIX
 	tm_file=alpha/vms.h
 	xm_file="${xm_file} alpha/xm-vms.h"
 	tmake_file="alpha/t-alpha alpha/t-vms alpha/t-ieee"
@@ -1417,6 +1422,7 @@ i386-*-vsta)			# Intel 80386's running V
 	xmake_file=i386/x-vsta
 	;;
 i[34567]86-*-win32)
+	xm_defines=POSIX
 	xm_file="${xm_file} i386/xm-cygwin.h"
 	float_format=i386
 	tmake_file=i386/t-cygwin
@@ -1429,6 +1435,7 @@ i[34567]86-*-win32)
 	exeext=.exe
 	;;
 i[34567]86-*-pe | i[34567]86-*-cygwin*)
+	xm_defines=POSIX
 	xm_file="${xm_file} i386/xm-cygwin.h"
 	float_format=i386
 	tmake_file=i386/t-cygwin
@@ -2092,7 +2099,6 @@ m88k-*-luna*)
 m88k-*-openbsd*)
 	tmake_file="${tmake_file} m88k/t-luna-gas"
 	tm_file="m88k/aout-dbx.h aoutos.h m88k/m88k.h openbsd.h ${tm_file}"
-	xm_file='m88k/xm-m88k.h xm-openbsd.h'
 	;;
 m88k-*-sysv3*)
 	xm_defines=USG
@@ -2749,7 +2755,7 @@ powerpc-*-rtems*)
 	;;
 powerpc-*-linux*libc1)
 	tm_file="${tm_file} svr4.h rs6000/sysv4.h rs6000/linux.h"
-	xm_defines=USG
+	xm_defines='USG POSIX'
 	xm_file=rs6000/xm-sysv4.h
 	out_file=rs6000/rs6000.c
 	tmake_file="rs6000/t-ppcos t-linux t-linux-gnulibc1 rs6000/t-ppccomm"
@@ -3284,7 +3290,6 @@ vax-*-netbsd*)
 vax-*-openbsd*)
 	tmake_file="${tmake_file} vax/t-openbsd"
 	tm_file="vax/vax.h vax/openbsd1.h openbsd.h ${tm_file}"
-	xm_file="xm-openbsd.h vax/xm-vax.h"
 	float_format=vax
 	use_collect2=yes
 	;;
diff -rup orig/egcs-CVS20010307/gcc/f/com.c egcs-CVS20010307/gcc/f/com.c
--- orig/egcs-CVS20010307/gcc/f/com.c	Thu Mar  1 20:51:02 2001
+++ egcs-CVS20010307/gcc/f/com.c	Wed Mar  7 22:57:44 2001
@@ -93,53 +93,6 @@ the Free Software Foundation, 59 Temple 
 
 #define FFECOM_GCC_INCLUDE 1	/* Enable -I. */
 
-/* BEGIN stuff from gcc/cccp.c.  */
-
-/* The following symbols should be autoconfigured:
-	HAVE_FCNTL_H
-	HAVE_STDLIB_H
-	HAVE_SYS_TIME_H
-	HAVE_UNISTD_H
-	TIME_WITH_SYS_TIME
-   In the mean time, we'll get by with approximations based
-   on existing GCC configuration symbols.  */
-
-#ifdef POSIX
-# ifndef HAVE_STDLIB_H
-# define HAVE_STDLIB_H 1
-# endif
-# ifndef HAVE_UNISTD_H
-# define HAVE_UNISTD_H 1
-# endif
-#endif /* defined (POSIX) */
-
-#if defined (POSIX) || (defined (USG) && !defined (VMS))
-# ifndef HAVE_FCNTL_H
-# define HAVE_FCNTL_H 1
-# endif
-#endif
-
-#ifdef RLIMIT_STACK
-# include <sys/resource.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-/* This defines "errno" properly for VMS, and gives us EACCES. */
-#include <errno.h>
-
-#if HAVE_STDLIB_H
-# include <stdlib.h>
-#else
-char *getenv ();
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
 /* VMS-specific definitions */
 #ifdef VMS
 #include <descrip.h>
@@ -164,12 +117,6 @@ typedef struct { unsigned :16, :16, :16;
 #define ino_t vms_ino_t
 #define INCLUDE_LEN_FUDGE 10	/* leave room for VMS syntax conversion */
 #endif /* VMS */
-
-#ifndef O_RDONLY
-#define O_RDONLY 0
-#endif
-
-/* END stuff from gcc/cccp.c.  */
 
 #define FFECOM_DETERMINE_TYPES 1 /* for com.h */
 #include "com.h"
diff -rup orig/egcs-CVS20010307/gcc/fixinc/fixlib.h egcs-CVS20010307/gcc/fixinc/fixlib.h
--- orig/egcs-CVS20010307/gcc/fixinc/fixlib.h	Sat Mar  3 14:05:00 2001
+++ egcs-CVS20010307/gcc/fixinc/fixlib.h	Wed Mar  7 23:35:11 2001
@@ -61,13 +61,6 @@ typedef int t_success;
 #define tCC  const char
 #define tSC  static char
 
-/* If this particular system's header files define the macro `MAXPATHLEN',
-   we happily take advantage of it; otherwise we use a value which ought
-   to be large enough.  */
-#ifndef MAXPATHLEN
-# define MAXPATHLEN     4096
-#endif
-
 #ifndef EXIT_SUCCESS
 # define EXIT_SUCCESS 0
 #endif
diff -rup orig/egcs-CVS20010307/gcc/system.h egcs-CVS20010307/gcc/system.h
--- orig/egcs-CVS20010307/gcc/system.h	Tue Mar  6 08:41:35 2001
+++ egcs-CVS20010307/gcc/system.h	Wed Mar  7 23:32:08 2001
@@ -145,6 +145,14 @@ extern int errno;
 # include <limits.h>
 #endif
 
+#ifndef MAXPATHLEN
+# ifdef PATH_MAX
+#  define MAXPATHLEN PATH_MAX
+# else
+#  define MAXPATHLEN 512
+# endif
+#endif /* ! MAXPATHLEN */
+
 /* Find HOST_WIDEST_INT and set its bit size, type and print macros.
    It will be the largest integer mode supported by the host which may
    (or may not) be larger than HOST_WIDE_INT.  This must appear after


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