Commit d02af173 by Zack Weinberg

ansidecl.h: All logic from gcc/gansidecl.h moved here.

include:
	* ansidecl.h: All logic from gcc/gansidecl.h moved here.
gcc:
	* gansidecl.h: Delete file.
	* configure.in: Change all refs to gansidecl.h to use
	ansidecl.h.  Adjust *_file_list so they know where ansidecl.h
	lives.
	* configure: Regenerate.

	* Makefile.in (intl.o): Don't depend on gansidecl.h.
	* defaults.h: s/gansidecl.h/ansidecl.h/ in comment.
	* ggc.h, config/fr30/fr30.h, config/mcore/mcore.c:
	Don't include gansidecl.h.
	* intl.c, main.c, version.c, fixinc/fixlib.h,
	fixinc/procopen.c, fixinc/server.c: Include ansidecl.h not
	gansidecl.h.
gcc/java:
	* Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
	on gansidecl.h.
	* buffer.c, jvgenmain.c: Don't include gansidecl.h.
libiberty:
	* make-temp-file.c (try): Inline.

From-SVN: r41069
parent 92788413
2001-04-03 Zack Weinberg <zackw@stanford.edu>
* gansidecl.h: Delete file.
* configure.in: Change all refs to gansidecl.h to use
ansidecl.h. Adjust *_file_list so they know where ansidecl.h
lives.
* configure: Regenerate.
* Makefile.in (intl.o): Don't depend on gansidecl.h.
* defaults.h: s/gansidecl.h/ansidecl.h/ in comment.
* ggc.h, config/fr30/fr30.h, config/mcore/mcore.c:
Don't include gansidecl.h.
* intl.c, main.c, version.c, fixinc/fixlib.h,
fixinc/procopen.c, fixinc/server.c: Include ansidecl.h not
gansidecl.h.
Tue Apr 3 19:41:21 CEST 2001 Jan Hubicka <jh@suse.cz> Tue Apr 3 19:41:21 CEST 2001 Jan Hubicka <jh@suse.cz>
* i386.c (ix86_force_to_memory, ix86_free_from_memory): * i386.c (ix86_force_to_memory, ix86_free_from_memory):
......
...@@ -1901,7 +1901,7 @@ $(HOST_PREFIX_1)ggc-none.o: ggc-none.c $(HCONFIG_H) $(SYSTEM_H) ...@@ -1901,7 +1901,7 @@ $(HOST_PREFIX_1)ggc-none.o: ggc-none.c $(HCONFIG_H) $(SYSTEM_H)
# #
# Remake internationalization support. # Remake internationalization support.
intl.o: intl.c intl.h gansidecl.h Makefile intl.o: intl.c intl.h Makefile
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
-DLOCALEDIR=\"$(localedir)\" \ -DLOCALEDIR=\"$(localedir)\" \
-c $(srcdir)/intl.c -c $(srcdir)/intl.c
......
...@@ -27,9 +27,6 @@ Boston, MA 02111-1307, USA. */ ...@@ -27,9 +27,6 @@ Boston, MA 02111-1307, USA. */
/* Set up System V.4 (aka ELF) defaults. */ /* Set up System V.4 (aka ELF) defaults. */
#include "svr4.h" #include "svr4.h"
/* Include prototyping macros */
#include "gansidecl.h"
/*}}}*/ /*}}}*/
/*{{{ Driver configuration. */ /*{{{ Driver configuration. */
......
...@@ -23,7 +23,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ ...@@ -23,7 +23,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "tree.h" #include "tree.h"
#include "tm_p.h" #include "tm_p.h"
#include "assert.h" #include "assert.h"
#include "gansidecl.h"
#include "mcore.h" #include "mcore.h"
#include "regs.h" #include "regs.h"
#include "hard-reg-set.h" #include "hard-reg-set.h"
......
...@@ -592,11 +592,11 @@ CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include" ...@@ -592,11 +592,11 @@ CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
gcc_AC_CHECK_DECLS(getenv atol sbrk abort atof getcwd getwd \ gcc_AC_CHECK_DECLS(getenv atol sbrk abort atof getcwd getwd \
strsignal putc_unlocked fputs_unlocked strstr environ \ strsignal putc_unlocked fputs_unlocked strstr environ \
malloc realloc calloc free basename getopt, , ,[ malloc realloc calloc free basename getopt, , ,[
#include "gansidecl.h" #include "ansidecl.h"
#include "system.h"]) #include "system.h"])
gcc_AC_CHECK_DECLS(getrlimit setrlimit getrusage, , ,[ gcc_AC_CHECK_DECLS(getrlimit setrlimit getrusage, , ,[
#include "gansidecl.h" #include "ansidecl.h"
#include "system.h" #include "system.h"
#ifdef HAVE_SYS_RESOURCE_H #ifdef HAVE_SYS_RESOURCE_H
#include <sys/resource.h> #include <sys/resource.h>
...@@ -802,9 +802,9 @@ else ...@@ -802,9 +802,9 @@ else
fi fi
tm_file="${tm_file} defaults.h" tm_file="${tm_file} defaults.h"
host_xm_file="auto-host.h gansidecl.h ${host_xm_file} ${tm_file}" host_xm_file="auto-host.h ansidecl.h ${host_xm_file} ${tm_file}"
build_xm_file="${build_auto} gansidecl.h ${build_xm_file} ${tm_file}" build_xm_file="${build_auto} ansidecl.h ${build_xm_file} ${tm_file}"
xm_file="gansidecl.h ${xm_file} ${tm_file}" xm_file="ansidecl.h ${xm_file} ${tm_file}"
# Truncate the target if necessary # Truncate the target if necessary
if test x$host_truncate_target != x; then if test x$host_truncate_target != x; then
...@@ -975,7 +975,9 @@ out_object_file=`basename $out_file .c`.o ...@@ -975,7 +975,9 @@ out_object_file=`basename $out_file .c`.o
tm_file_list= tm_file_list=
for f in $tm_file; do for f in $tm_file; do
case $f in case $f in
gansidecl.h | defaults.h ) ansidecl.h )
tm_file_list="${tm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
defaults.h )
tm_file_list="${tm_file_list} $f" ;; tm_file_list="${tm_file_list} $f" ;;
*) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;; *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;;
esac esac
...@@ -989,7 +991,9 @@ done ...@@ -989,7 +991,9 @@ done
host_xm_file_list= host_xm_file_list=
for f in $host_xm_file; do for f in $host_xm_file; do
case $f in case $f in
auto-host.h | gansidecl.h | defaults.h ) ansidecl.h )
host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
auto-host.h | defaults.h )
host_xm_file_list="${host_xm_file_list} $f" ;; host_xm_file_list="${host_xm_file_list} $f" ;;
*) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;; *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;;
esac esac
...@@ -998,7 +1002,9 @@ done ...@@ -998,7 +1002,9 @@ done
build_xm_file_list= build_xm_file_list=
for f in $build_xm_file; do for f in $build_xm_file; do
case $f in case $f in
auto-build.h | auto-host.h | gansidecl.h | defaults.h ) ansidecl.h )
build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;;
auto-build.h | auto-host.h | defaults.h )
build_xm_file_list="${build_xm_file_list} $f" ;; build_xm_file_list="${build_xm_file_list} $f" ;;
*) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;; *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;;
esac esac
......
...@@ -161,7 +161,7 @@ do { ASM_OUTPUT_LABEL(FILE,LABEL_ALTERNATE_NAME (INSN)); } while (0) ...@@ -161,7 +161,7 @@ do { ASM_OUTPUT_LABEL(FILE,LABEL_ALTERNATE_NAME (INSN)); } while (0)
/* If the target supports weak symbols, define TARGET_ATTRIBUTE_WEAK to /* If the target supports weak symbols, define TARGET_ATTRIBUTE_WEAK to
provide a weak attribute. Else define it to nothing. provide a weak attribute. Else define it to nothing.
This would normally belong in gansidecl.h, but SUPPORTS_WEAK is This would normally belong in ansidecl.h, but SUPPORTS_WEAK is
not available at that time. not available at that time.
Note, this is only for use by target files which we know are to be Note, this is only for use by target files which we know are to be
......
...@@ -26,7 +26,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -26,7 +26,7 @@ Boston, MA 02111-1307, USA. */
#define FIXINCLUDES_FIXLIB_H #define FIXINCLUDES_FIXLIB_H
#include "auto-host.h" #include "auto-host.h"
#include "gansidecl.h" #include "ansidecl.h"
#include "system.h" #include "system.h"
#include "gnu-regex.h" #include "gnu-regex.h"
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
* If you do not wish that, delete this exception notice. * If you do not wish that, delete this exception notice.
*/ */
#include "auto-host.h" #include "auto-host.h"
#include "gansidecl.h" #include "ansidecl.h"
#include "system.h" #include "system.h"
#include "server.h" #include "server.h"
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
*/ */
#include "auto-host.h" #include "auto-host.h"
#include "gansidecl.h" #include "ansidecl.h"
#include "system.h" #include "system.h"
#include <signal.h> #include <signal.h>
......
/* ANSI and traditional C compatibility macros.
Copyright (C) 1996, 1997, 1998, 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 mimics some of the support provided by include/ansidecl.h
in binutils and gdb releases.
??? Over time the two should be merged into one. */
#ifndef __GANSIDECL_H__
#define __GANSIDECL_H__
#include "ansidecl.h"
/* Autoconf will possibly define the `inline' or `const' keywords as
macros, however this is only valid for the stage1 compiler. If we
detect a modern version of gcc, unconditionally reset the values.
This makes sure the right thing happens in stage2 and later. We
need to do this very early; i.e. before any systems header files or
gcc header files in case they use these keywords. Otherwise
conflicts might occur. */
#if (GCC_VERSION >= 2007)
# ifdef __STDC__
# undef const
# endif
# undef inline
# define inline __inline__ /* Modern gcc can use `__inline__' freely. */
# ifndef HAVE_LONG_DOUBLE
# define HAVE_LONG_DOUBLE 1
# endif
#endif /* GCC >= 2.7 */
#ifndef NULL_PTR
#define NULL_PTR ((PTR) 0)
#endif
#endif /* __GANSIDECL_H__ */
...@@ -18,7 +18,6 @@ along with GNU CC; see the file COPYING. If not, write to the Free ...@@ -18,7 +18,6 @@ along with GNU CC; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */ 02111-1307, USA. */
#include "gansidecl.h"
#include "varray.h" #include "varray.h"
/* Symbols are marked with `ggc' for `gcc gc' so as not to interfere with /* Symbols are marked with `ggc' for `gcc gc' so as not to interfere with
......
/* intl.c - internationalization */ /* intl.c - internationalization */
#include "gansidecl.h" #include "ansidecl.h"
#include "intl.h" #include "intl.h"
const char localedir[] = LOCALEDIR; const char localedir[] = LOCALEDIR;
2001-04-03 Zack Weinberg <zackw@stanford.edu>
* Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
on gansidecl.h.
* buffer.c, jvgenmain.c: Don't include gansidecl.h.
2001-04-02 Zack Weinberg <zackw@stanford.edu> 2001-04-02 Zack Weinberg <zackw@stanford.edu>
* expr.c (pop_type_0): Save the result of the first * expr.c (pop_type_0): Save the result of the first
......
...@@ -242,12 +242,11 @@ java/gjavah.o: $(CONFIG_H) $(SYSTEM_H) $(JAVA_TREE_H) java/gjavah.c \ ...@@ -242,12 +242,11 @@ java/gjavah.o: $(CONFIG_H) $(SYSTEM_H) $(JAVA_TREE_H) java/gjavah.c \
java/jcf-reader.c java/jcf.h java/javaop.h version.h java/jcf-reader.c java/jcf.h java/javaop.h version.h
java/boehm.o: java/boehm.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(JAVA_TREE_H) \ java/boehm.o: java/boehm.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(JAVA_TREE_H) \
java/parse.h java/parse.h
java/buffer.o: java/buffer.c $(CONFIG_H) java/buffer.h gansidecl.h \ java/buffer.o: java/buffer.c $(CONFIG_H) java/buffer.h $(SYSTEM_H) toplev.h
$(SYSTEM_H) toplev.h java/check-init.o: java/check-init.c $(CONFIG_H) \
java/check-init.o: java/check-init.c $(CONFIG_H) gansidecl.h \
$(JAVA_TREE_H) $(SYSTEM_H) toplev.h $(JAVA_TREE_H) $(SYSTEM_H) toplev.h
java/class.o: java/class.c $(CONFIG_H) $(JAVA_TREE_H) $(RTL_H) java/jcf.h \ java/class.o: java/class.c $(CONFIG_H) $(JAVA_TREE_H) $(RTL_H) java/jcf.h \
java/parse.h gansidecl.h toplev.h $(SYSTEM_H) output.h $(GGC_H) java/parse.h toplev.h $(SYSTEM_H) output.h $(GGC_H)
java/constants.o: java/constants.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h \ java/constants.o: java/constants.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h \
toplev.h $(SYSTEM_H) $(GGC_H) toplev.h $(SYSTEM_H) $(GGC_H)
java/decl.o: java/decl.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h \ java/decl.o: java/decl.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h \
......
...@@ -22,7 +22,6 @@ Boston, MA 02111-1307, USA. */ ...@@ -22,7 +22,6 @@ Boston, MA 02111-1307, USA. */
#include "config.h" #include "config.h"
#include "system.h" #include "system.h"
#include "gansidecl.h"
#include "buffer.h" #include "buffer.h"
/* Grow BUFP so there is room for at least SIZE more bytes. */ /* Grow BUFP so there is room for at least SIZE more bytes. */
......
...@@ -27,7 +27,6 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */ ...@@ -27,7 +27,6 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "config.h" #include "config.h"
#include "system.h" #include "system.h"
#include "obstack.h" #include "obstack.h"
#include "gansidecl.h"
#include "jcf.h" #include "jcf.h"
#include "tree.h" #include "tree.h"
#include "java-tree.h" #include "java-tree.h"
......
...@@ -17,7 +17,7 @@ along with GNU CC; see the file COPYING. If not, write to ...@@ -17,7 +17,7 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
#include "gansidecl.h" #include "ansidecl.h"
#include "toplev.h" #include "toplev.h"
int main PARAMS ((int argc, char **argv)); int main PARAMS ((int argc, char **argv));
......
#include "gansidecl.h" #include "ansidecl.h"
#include "version.h" #include "version.h"
const char *const version_string = "3.1 20010403 (experimental)"; const char *const version_string = "3.1 20010403 (experimental)";
2001-04-03 Zack Weinberg <zackw@stanford.edu>
* ansidecl.h: All logic from gcc/gansidecl.h moved here.
2001-03-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2001-03-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* libiberty.h (alloca): Handle setting C_ALLOCA. * libiberty.h (alloca): Handle setting C_ALLOCA.
......
...@@ -161,6 +161,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ...@@ -161,6 +161,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#endif /* ANSI C. */ #endif /* ANSI C. */
/* This is for GCC, which has historically used typed null pointer
constants. It needs to be here so it is seen by headers included
by gcc's config.h.
FIXME: GCC probably doesn't need to use typed nulls anymore.
Clean it up, then remove this. Ware variable-argument functions. */
#ifdef IN_GCC
# define NULL_PTR ((PTR) 0)
#endif
/* Using MACRO(x,y) in cpp #if conditionals does not work with some /* Using MACRO(x,y) in cpp #if conditionals does not work with some
older preprocessors. Thus we can't define something like this: older preprocessors. Thus we can't define something like this:
...@@ -230,4 +239,23 @@ So instead we use the macro below and test it against specific values. */ ...@@ -230,4 +239,23 @@ So instead we use the macro below and test it against specific values. */
#define __extension__ #define __extension__
#endif #endif
/* Bootstrap support: Autoconf will possibly define the `inline' or
`const' keywords as macros, however this is only valid for the
stage1 compiler. If we detect a modern version of gcc,
unconditionally reset the values. This makes sure the right thing
happens in stage2 and later. We need to do this very early;
i.e. before any header files that might use these keywords.
Otherwise conflicts might occur. */
#if (GCC_VERSION >= 2007)
# ifdef __STDC__
# undef const
# endif
# undef inline
# define inline __inline__ /* __inline__ prevents -pedantic warnings */
# ifndef HAVE_LONG_DOUBLE
# define HAVE_LONG_DOUBLE 1
# endif
#endif /* GCC >= 2.7 */
#endif /* ansidecl.h */ #endif /* ansidecl.h */
2001-04-03 Zack Weinberg <zackw@stanford.edu>
* make-temp-file.c (try): Inline.
2001-02-28 Richard Henderson <rth@redhat.com> 2001-02-28 Richard Henderson <rth@redhat.com>
* Makefile.in (make-temp-file.o): Depend on config.h. * Makefile.in (make-temp-file.o): Depend on config.h.
......
...@@ -61,9 +61,9 @@ extern int mkstemps PARAMS ((char *, int)); ...@@ -61,9 +61,9 @@ extern int mkstemps PARAMS ((char *, int));
If success, DIR is returned. If success, DIR is returned.
Otherwise NULL is returned. */ Otherwise NULL is returned. */
static const char *try PARAMS ((const char *, const char *)); static inline const char *try PARAMS ((const char *, const char *));
static const char * static inline const char *
try (dir, base) try (dir, base)
const char *dir, *base; const char *dir, *base;
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment