Commit 4f4e53dd by Paolo Bonzini Committed by Paolo Bonzini

Makefile.def (host_modules): add libcpp.

ChangeLog:

2004-05-23  Paolo Bonzini  <bonzini@gnu.org>

	* Makefile.def (host_modules): add libcpp.
	* Makefile.tpl: Add dependencies on and for libcpp.
	* Makefile.in: Regenerate.
	* configure.in: Add libcpp host module.
	* configure: Regenerate.

config/ChangeLog:

2004-05-23  Paolo Bonzini  <bonzini@gnu.org>

	* acx.m4 (ACX_HEADER_STDBOOL, ACX_HEADER_STRING):
	From gcc.

gcc/ChangeLog:

2004-05-23  Paolo Bonzini  <bonzini@gnu.org>

	Move libcpp to the toplevel.
	* Makefile.in: Remove references to libcpp files,
	use CPPLIBS instead of libcpp.a.  Define SYMTAB_H
	and change hashtable.h to that.
	* aclocal.m4 (gcc_AC_HEADER_STDBOOL,
	gcc_AC_HEADER_STRING, gcc_AC_C__BOOL): Remove.
	* configure.ac (gcc_AC_C__BOOL, HAVE_UCHAR): Remove tests.
	* configure: Regenerate.
	* config.in: Regenerate.
	* c-ppoutput.c: Include ../libcpp/internal.h instead of cpphash.h.
	* cppcharset.c: Removed.
	* cpperror.c: Removed.
	* cppexp.c: Removed.
	* cppfiles.c: Removed.
	* cpphash.c: Removed.
	* cpphash.h: Removed.
	* cppinit.c: Removed.
	* cpplex.c: Removed.
	* cpplib.c: Removed.
	* cpplib.h: Removed.
	* cppmacro.c: Removed.
	* cpppch.c: Removed.
	* cpptrad.c: Removed.
	* cppucnid.h: Removed.
	* cppucnid.pl: Removed.
	* cppucnid.tab: Removed.
	* hashtable.c: Removed.
	* hashtable.h: Removed.
	* line-map.c: Removed.
	* line-map.h: Removed.
	* mkdeps.c: Removed.
	* mkdeps.h: Removed.
	* stringpool.h: Include symtab.h instead of hashtable.h.
	* tree.h: Include symtab.h instead of hashtable.h.
	* system.h (O_NONBLOCK, O_NOCTTY): Do not define.

gcc/cp/ChangeLog:

2004-05-23  Paolo Bonzini  <bonzini@gnu.org>

	* Make-lang.in: No need to specify $(LIBCPP).

gcc/java/ChangeLog:

2004-05-23  Paolo Bonzini  <bonzini@gnu.org>

	* Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.

libcpp/ChangeLog:

2004-05-23  Paolo Bonzini  <bonzini@gnu.org>

	Moved libcpp from the gcc subdirectory to the toplevel.
	* Makefile.am: New file.
	* Makefile.in: Regenerate.
	* configure.ac: New file.
	* configure: Regenerate.
	* config.in: Regenerate.
	* charset.c: Moved from gcc/cppcharset.c.  Add note about
	brokenness of input charset detection.  Adjust for change
	in name of cppucnid.h.
	* errors.c: Moved from gcc/cpperror.c.  Do not include intl.h.
	* expr.c: Moved from gcc/cppexp.c.
	* files.c: Moved from gcc/cppfiles.c.  Do not include intl.h.
	Remove #define of O_BINARY, it is in system.h.
	* identifiers.c: Moved from gcc/cpphash.c.
	* internal.h: Moved from gcc/cpphash.h.  Change header
	guard name.  All other files adjusted to match name change.
	* init.c: Moved from gcc/cppinit.c.
	(init_library) [ENABLE_NLS]: Call bindtextdomain.
	* lex.c: Moved from gcc/cpplex.c.
	* directives.c: Moved from gcc/cpplib.c.
	* macro.c: Moved from gcc/cppmacro.c.
	* pch.c: Moved from gcc/cpppch.c.  Do not include intl.h.
	* traditional.c: Moved from gcc/cpptrad.c.
	* ucnid.h: Moved from gcc/cppucnid.h.  Change header
	guard name.
	* ucnid.pl: Moved from gcc/cppucnid.pl.
	* ucnid.tab: Moved from gcc/cppucnid.tab.  Change header
	guard name.
	* symtab.c: Moved from gcc/hashtable.c.
	* line-map.c: Moved from gcc.  Do not include intl.h.
	* mkdeps.c: Moved from gcc.
	* system.h: New file.

libcpp/include/ChangeLog:

2004-05-23  Paolo Bonzini  <bonzini@gnu.org>

	* cpplib.h: Moved from gcc.  Change header guard name.
	* line-map.h: Moved from gcc.  Change header guard name.
	* mkdeps.h: Moved from gcc.  Change header guard name.
	* symtab.h: Moved from gcc/hashtable.h.  Change header
	guard name.

libcpp/po/ChangeLog:

2004-05-23  Paolo Bonzini  <bonzini@gnu.org>

	* be.po: Extracted from gcc/po/be.po.
	* ca.po: Extracted from gcc/po/ca.po.
	* da.po: Extracted from gcc/po/da.po.
	* de.po: Extracted from gcc/po/de.po.
	* el.po: Extracted from gcc/po/el.po.
	* es.po: Extracted from gcc/po/es.po.
	* fr.po: Extracted from gcc/po/fr.po.
	* ja.po: Extracted from gcc/po/ja.po.
	* nl.po: Extracted from gcc/po/nl.po.
	* sv.po: Extracted from gcc/po/sv.po.
	* tr.po: Extracted from gcc/po/tr.po.

From-SVN: r82199
parent b1c5b5a0
2004-05-23 Paolo Bonzini <bonzini@gnu.org>
* Makefile.def (host_modules): add libcpp.
* Makefile.tpl: Add dependencies on and for libcpp.
* Makefile.in: Regenerate.
* configure.in: Add libcpp host module.
* configure: Regenerate.
2004-05-21 Paolo Bonzini <bonzini@gnu.org>
* Makefile.tpl: Whenever a recursive target is defined, wrap
......
......@@ -59,6 +59,7 @@ host_modules= { module= tcl;
missing=mostlyclean; };
host_modules= { module= itcl; };
host_modules= { module= ld; bootstrap=true; };
host_modules= { module= libcpp; bootstrap=true; };
host_modules= { module= libgui; };
host_modules= { module= libbanshee; bootstrap=true; no_install=true; };
host_modules= { module= libiberty; bootstrap=true; };
......
......@@ -1660,10 +1660,12 @@ new-restage3: all-stage2-gcc
# GCC needs to identify certain tools.
# GCC also needs the information exported by the intl configure script.
configure-gcc: maybe-configure-intl maybe-configure-binutils maybe-configure-gas maybe-configure-ld maybe-configure-bison maybe-configure-flex
all-gcc: maybe-all-libiberty maybe-all-intl maybe-all-bison maybe-all-byacc maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib maybe-all-libbanshee
all-gcc: maybe-all-libiberty maybe-all-intl maybe-all-bison maybe-all-byacc maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib maybe-all-libbanshee maybe-all-libcpp
configure-libcpp: maybe-configure-libiberty maybe-configure-intl
all-libcpp: maybe-all-libiberty maybe-all-intl
# This is a slightly kludgy method of getting dependencies on
# all-build-libiberty correct; it would be better to build it every time.
all-gcc: maybe-all-build-libiberty maybe-all-libbanshee
all-gcc: maybe-all-build-libiberty
all-bootstrap: [+ FOR host_modules +][+ IF bootstrap +]maybe-all-[+module+] [+ ENDIF bootstrap +][+ ENDFOR host_modules +]
# Host modules specific to gdb.
......
2004-05-23 Paolo Bonzini <bonzini@gnu.org>
* acx.m4 (ACX_HEADER_STDBOOL, ACX_HEADER_STRING):
From gcc.
2004-04-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* acx.m4 (ACX_PROG_GNAT): Check if ${CC} produces object file for
......
......@@ -224,3 +224,37 @@ AC_DEFUN([ACX_PROG_CMP_IGNORE_INITIAL],
do_compare="$gcc_cv_prog_cmp_skip"
AC_SUBST(do_compare)
])
dnl See whether we can include both string.h and strings.h.
AC_DEFUN([ACX_HEADER_STRING],
[AC_CACHE_CHECK([whether string.h and strings.h may both be included],
gcc_cv_header_string,
[AC_TRY_COMPILE([#include <string.h>
#include <strings.h>], , gcc_cv_header_string=yes, gcc_cv_header_string=no)])
if test $gcc_cv_header_string = yes; then
AC_DEFINE(STRING_WITH_STRINGS, 1, [Define if you can safely include both <string.h> and <strings.h>.])
fi
])
dnl See if stdbool.h properly defines bool and true/false.
dnl Check whether _Bool is built-in.
AC_DEFUN([ACX_HEADER_STDBOOL],
[AC_CACHE_CHECK([for working stdbool.h],
ac_cv_header_stdbool_h,
[AC_TRY_COMPILE([#include <stdbool.h>],
[bool foo = false;],
ac_cv_header_stdbool_h=yes, ac_cv_header_stdbool_h=no)])
if test $ac_cv_header_stdbool_h = yes; then
AC_DEFINE(HAVE_STDBOOL_H, 1,
[Define if you have a working <stdbool.h> header file.])
fi
AC_CACHE_CHECK(for built-in _Bool, gcc_cv_c__bool,
[AC_TRY_COMPILE(,
[_Bool foo;],
gcc_cv_c__bool=yes, gcc_cv_c__bool=no)
])
if test $gcc_cv_c__bool = yes; then
AC_DEFINE(HAVE__BOOL, 1, [Define if the \`_Bool' type is built-in.])
fi
])
......@@ -126,7 +126,7 @@ fi
# these libraries are used by various programs built for the host environment
#
host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl tix libgui zlib libbanshee"
host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl tix libgui zlib libbanshee libcpp"
# these tools are built for the host environment
# Note, the powerpc-eabi build depends on sim occurring before gdb in order to
......
2004-05-23 Paolo Bonzini <bonzini@gnu.org>
Move libcpp to the toplevel.
* Makefile.in: Remove references to libcpp files,
use CPPLIBS instead of libcpp.a. Define SYMTAB_H
and change hashtable.h to that.
* aclocal.m4 (gcc_AC_HEADER_STDBOOL,
gcc_AC_HEADER_STRING, gcc_AC_C__BOOL): Remove.
* configure.ac (gcc_AC_C__BOOL, HAVE_UCHAR): Remove tests.
* configure: Regenerate.
* config.in: Regenerate.
* c-ppoutput.c: Include ../libcpp/internal.h instead of cpphash.h.
* cppcharset.c: Removed.
* cpperror.c: Removed.
* cppexp.c: Removed.
* cppfiles.c: Removed.
* cpphash.c: Removed.
* cpphash.h: Removed.
* cppinit.c: Removed.
* cpplex.c: Removed.
* cpplib.c: Removed.
* cpplib.h: Removed.
* cppmacro.c: Removed.
* cpppch.c: Removed.
* cpptrad.c: Removed.
* cppucnid.h: Removed.
* cppucnid.pl: Removed.
* cppucnid.tab: Removed.
* hashtable.c: Removed.
* hashtable.h: Removed.
* line-map.c: Removed.
* line-map.h: Removed.
* mkdeps.c: Removed.
* mkdeps.h: Removed.
* stringpool.h: Include symtab.h instead of hashtable.h.
* tree.h: Include symtab.h instead of hashtable.h.
* system.h (O_NONBLOCK, O_NOCTTY): Do not define.
2004-05-23 Paolo Bonzini <bonzini@gnu.org>
* gcc.c (struct prefix_list): Add forward declaration.
......
......@@ -284,6 +284,10 @@ GMPINC = @GMPINC@
BANSHEELIB = @BANSHEELIB@
BANSHEEINC = @BANSHEEINC@
CPPLIBS = ../libcpp/libcpp.a
CPPINC = -I$(srcdir)/../libcpp/include
# Substitution type for target's getgroups 2nd arg.
TARGET_GETGROUPS_T = @TARGET_GETGROUPS_T@
......@@ -699,7 +703,9 @@ C_COMMON_H = c-common.h $(SPLAY_TREE_H) $(CPPLIB_H)
C_TREE_H = c-tree.h $(C_COMMON_H)
SYSTEM_H = system.h hwint.h $(srcdir)/../include/libiberty.h
PREDICT_H = predict.h predict.def
CPPLIB_H = cpplib.h line-map.h
CPPLIB_H = $(srcdir)/../libcpp/include/cpplib.h \
$(srcdir)/../libcpp/include/line-map.h
SYMTAB_H = $(srcdir)/../libcpp/include/symtab.h
TREE_DUMP_H = tree-dump.h $(SPLAY_TREE_H)
TREE_GIMPLE_H = tree-gimple.h tree-iterator.h
TREE_FLOW_H = tree-flow.h tree-flow-inline.h tree-ssa-operands.h \
......@@ -731,7 +737,7 @@ LIBIBERTY = ../libiberty/libiberty.a
BUILD_LIBIBERTY = @FORBUILD@/libiberty/libiberty.a
# Dependencies on the intl and portability libraries.
LIBDEPS= $(LIBIBERTY) $(LIBINTL_DEP) $(LIBICONV_DEP) libcpp.a $(BANSHEELIB)
LIBDEPS= $(LIBIBERTY) $(LIBINTL_DEP) $(LIBICONV_DEP) $(CPPLIB) $(BANSHEELIB)
# Likewise, for use in the tools that must run on this machine
# even if we are cross-building GCC.
......@@ -739,7 +745,7 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY)
# How to link with both our special library facilities
# and the system's installed libraries.
LIBS = @LIBS@ libcpp.a $(LIBIBERTY) $(LIBINTL) $(LIBICONV) $(BANSHEELIB)
LIBS = @LIBS@ $(LIBIBERTY) $(LIBINTL) $(LIBICONV) $(CPPLIB) $(BANSHEELIB)
# Any system libraries needed just for GNAT.
SYSLIBS = @GNAT_LIBEXC@
......@@ -769,7 +775,7 @@ BUILD_VARRAY = $(BUILD_PREFIX)varray.o
# libintl.h will be found in ../intl if we are using the included libintl.
INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \
-I$(srcdir)/../include @INCINTL@ \
$(BANSHEEINC) $(GMPINC)
$(CPPINC) $(BANSHEEINC) $(GMPINC)
.c.o:
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
......@@ -898,14 +904,14 @@ OBJS-common = \
rtl-profile.o tree-profile.o
OBJS-md = $(out_object_file)
OBJS-archive = $(EXTRA_OBJS) $(host_hook_obj) hashtable.o tree-inline.o \
OBJS-archive = $(EXTRA_OBJS) $(host_hook_obj) tree-inline.o \
cgraph.o cgraphunit.o tree-nomudflap.o
OBJS = $(OBJS-common) $(out_object_file) $(OBJS-archive)
OBJS-onestep = libbackend.o $(OBJS-archive)
BACKEND = main.o @TREEBROWSER@ libbackend.a
BACKEND = main.o @TREEBROWSER@ libbackend.a $(CPPLIBS)
# Files to be copied away after each stage in building.
STAGESTUFF = *$(objext) insn-flags.h insn-config.h insn-codes.h \
......@@ -927,7 +933,7 @@ STAGESTUFF = *$(objext) insn-flags.h insn-config.h insn-codes.h \
protoize$(exeext) unprotoize$(exeext) \
$(SPECS) collect2$(exeext) \
gcov-iov$(build_exeext) gcov$(exeext) gcov-dump$(exeext) \
*.[0-9][0-9].* *.[si] libcpp.a libbackend.a libgcc.mk \
*.[0-9][0-9].* *.[si] libbackend.a libgcc.mk \
$(LANG_STAGESTUFF)
# Defined in libgcc2.c, included only in the static library.
......@@ -1121,7 +1127,7 @@ rest.cross: $(LIBGCC) specs
# This is used only if the user explicitly asks for it.
compilations: $(BACKEND)
# Like libcpp.a, this archive is strictly for the host.
# This archive is strictly for the host.
libbackend.a: $(OBJS@onestep@)
-rm -rf libbackend.a
$(AR) $(AR_FLAGS) libbackend.a $(OBJS@onestep@)
......@@ -1351,7 +1357,7 @@ c-lex.o : c-lex.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
c-pragma.h input.h intl.h flags.h toplev.h output.h \
$(CPPLIB_H) $(EXPR_H) $(TM_P_H)
c-ppoutput.o : c-ppoutput.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(C_COMMON_H) $(TREE_H) $(CPPLIB_H) cpphash.h $(TM_P_H) c-pragma.h
$(C_COMMON_H) $(TREE_H) $(CPPLIB_H) $(srcdir)/../libcpp/internal.h $(TM_P_H) c-pragma.h
c-objc-common.o : c-objc-common.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
$(C_TREE_H) $(RTL_H) insn-config.h $(INTEGRATE_H) $(EXPR_H) $(C_TREE_H) \
flags.h toplev.h tree-inline.h $(DIAGNOSTIC_H) $(VARRAY_H) \
......@@ -2258,10 +2264,11 @@ s-preds: genpreds$(build_exeext)
$(SHELL) $(srcdir)/../move-if-change tmp-preds.h tm-preds.h
$(STAMP) s-preds
GTFILES = $(srcdir)/input.h $(srcdir)/coretypes.h $(srcdir)/cpplib.h \
$(host_xm_file_list) $(tm_file_list) $(HASHTAB_H) $(SPLAY_TREE_H) \
$(srcdir)/bitmap.h $(srcdir)/coverage.c $(srcdir)/function.h $(srcdir)/rtl.h \
$(srcdir)/optabs.h $(srcdir)/tree.h $(srcdir)/libfuncs.h $(srcdir)/hashtable.h \
GTFILES = $(srcdir)/input.h $(srcdir)/coretypes.h \
$(srcdir)/../libcpp/include/cpplib.h $(host_xm_file_list) \
$(tm_file_list) $(HASHTAB_H) $(SPLAY_TREE_H) $(srcdir)/bitmap.h \
$(srcdir)/coverage.c $(srcdir)/function.h $(srcdir)/rtl.h \
$(srcdir)/optabs.h $(srcdir)/tree.h $(srcdir)/libfuncs.h $(SYMTAB_H) \
$(srcdir)/real.h $(srcdir)/varray.h $(srcdir)/insn-addr.h $(srcdir)/hwint.h \
$(srcdir)/cselib.h $(srcdir)/basic-block.h $(srcdir)/cgraph.h \
$(srcdir)/c-common.h $(srcdir)/c-tree.h $(srcdir)/reload.h \
......@@ -2550,42 +2557,12 @@ PREPROCESSOR_DEFINES = \
-DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \
@TARGET_SYSTEM_ROOT_DEFINE@
LIBCPP_OBJS = cpplib.o cpplex.o cppmacro.o cppexp.o cppfiles.o cpptrad.o \
cpphash.o cpperror.o cppinit.o cppcharset.o \
hashtable.o line-map.o mkdeps.o cpppch.o
LIBCPP_DEPS = $(CPPLIB_H) cpphash.h line-map.h hashtable.h intl.h \
$(OBSTACK_H) $(CONFIG_H) $(SYSTEM_H)
# Most of the other archives built/used by this makefile are for
# targets. This one is strictly for the host.
libcpp.a: $(LIBCPP_OBJS)
-rm -rf libcpp.a
$(AR) $(AR_FLAGS) libcpp.a $(LIBCPP_OBJS)
-$(RANLIB) libcpp.a
cppcharset.o: cppcharset.c $(LIBCPP_DEPS) cppucnid.h
cpperror.o: cpperror.c $(LIBCPP_DEPS)
cppexp.o: cppexp.c $(LIBCPP_DEPS)
cpplex.o: cpplex.c $(LIBCPP_DEPS)
cppmacro.o: cppmacro.c $(LIBCPP_DEPS)
cpplib.o: cpplib.c $(LIBCPP_DEPS)
cpphash.o: cpphash.c $(LIBCPP_DEPS)
cpptrad.o: cpptrad.c $(LIBCPP_DEPS)
cppfiles.o: cppfiles.c $(LIBCPP_DEPS) $(HASHTAB_H) $(MD5_H) mkdeps.h
cppinit.o: cppinit.c $(LIBCPP_DEPS) mkdeps.h
cpppch.o: cpppch.c $(LIBCPP_DEPS) mkdeps.h
cppdefault.o: cppdefault.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
cppdefault.h Makefile
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
$(PREPROCESSOR_DEFINES) \
-c $(srcdir)/cppdefault.c $(OUTPUT_OPTION)
mkdeps.o: mkdeps.c $(CONFIG_H) $(SYSTEM_H) mkdeps.h
hashtable.o: hashtable.c hashtable.h $(CONFIG_H) $(SYSTEM_H) $(OBSTACK_H)
line-map.o: line-map.c line-map.h intl.h $(CONFIG_H) $(SYSTEM_H)
# Note for the stamp targets, we run the program `true' instead of
# having an empty command (nothing following the semicolon).
......@@ -2799,7 +2776,7 @@ xsys-protos.h: $(GCC_PASSES) $(srcdir)/sys-protos.h deduced.h gen-protos$(build_
# This is nominally a 'build' program, but it's run only when host==build,
# so we can (indeed, must) use $(LIBDEPS) and $(LIBS).
fix-header$(build_exeext): fix-header.o scan-decls.o scan.o xsys-protos.h \
c-incpath.o cppdefault.o prefix.o $(LIBDEPS) libcpp.a
c-incpath.o cppdefault.o prefix.o $(LIBDEPS)
$(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o $@ fix-header.o \
c-incpath.o cppdefault.o scan-decls.o prefix.o scan.o $(LIBS)
......@@ -3537,7 +3514,7 @@ TAGS: lang.tags
# ------------------------------------------------------
# A list of files to be destroyed during "lean" builds.
VOL_FILES=`echo $(BACKEND) $(OBJS) $(C_OBJS) $(LIBCPP_OBJS) *.c *.h gen*`
VOL_FILES=`echo $(BACKEND) $(OBJS) $(C_OBJS) *.c *.h gen*`
# Flags to pass to stage2 and later recursive makes. Note that the
# WARN_CFLAGS setting can't be to the expansion of GCC_WARN_CFLAGS in
......
......@@ -3,30 +3,6 @@ sinclude(../config/accross.m4)
sinclude(../config/gettext.m4)
sinclude(../config/progtest.m4)
dnl See if stdbool.h properly defines bool and true/false.
AC_DEFUN([gcc_AC_HEADER_STDBOOL],
[AC_CACHE_CHECK([for working stdbool.h],
ac_cv_header_stdbool_h,
[AC_TRY_COMPILE([#include <stdbool.h>],
[bool foo = false;],
ac_cv_header_stdbool_h=yes, ac_cv_header_stdbool_h=no)])
if test $ac_cv_header_stdbool_h = yes; then
AC_DEFINE(HAVE_STDBOOL_H, 1,
[Define if you have a working <stdbool.h> header file.])
fi
])
dnl See whether we can include both string.h and strings.h.
AC_DEFUN([gcc_AC_HEADER_STRING],
[AC_CACHE_CHECK([whether string.h and strings.h may both be included],
gcc_cv_header_string,
[AC_TRY_COMPILE([#include <string.h>
#include <strings.h>], , gcc_cv_header_string=yes, gcc_cv_header_string=no)])
if test $gcc_cv_header_string = yes; then
AC_DEFINE(STRING_WITH_STRINGS, 1, [Define if you can safely include both <string.h> and <strings.h>.])
fi
])
dnl See whether we need a declaration for a function.
dnl The result is highly dependent on the INCLUDES passed in, so make sure
dnl to use a different cache variable name in this macro if it is invoked
......@@ -198,18 +174,6 @@ fi
AC_SUBST(LN)dnl
])
dnl Check whether _Bool is built-in.
AC_DEFUN([gcc_AC_C__BOOL],
[AC_CACHE_CHECK(for built-in _Bool, gcc_cv_c__bool,
[AC_TRY_COMPILE(,
[_Bool foo;],
gcc_cv_c__bool=yes, gcc_cv_c__bool=no)
])
if test $gcc_cv_c__bool = yes; then
AC_DEFINE(HAVE__BOOL, 1, [Define if the \`_Bool' type is built-in.])
fi
])
dnl Define MKDIR_TAKES_ONE_ARG if mkdir accepts only one argument instead
dnl of the usual 2.
AC_DEFUN([gcc_AC_FUNC_MKDIR_TAKES_ONE_ARG],
......
......@@ -22,7 +22,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "coretypes.h"
#include "tm.h"
#include "cpplib.h"
#include "cpphash.h"
#include "../libcpp/internal.h"
#include "tree.h"
#include "c-common.h" /* For flags. */
#include "c-pragma.h" /* For parse_in. */
......
......@@ -278,7 +278,6 @@ AC_PROG_CPP
AC_C_INLINE
gcc_AC_C_LONG_LONG
gcc_AC_C__BOOL
# sizeof(char) is 1 by definition.
AC_COMPILE_CHECK_SIZEOF(void *)
......@@ -806,8 +805,8 @@ AC_PROG_CPP_WERROR
AC_HEADER_STDC
AC_HEADER_TIME
gcc_AC_HEADER_STDBOOL
gcc_AC_HEADER_STRING
ACX_HEADER_STDBOOL
ACX_HEADER_STRING
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h time.h \
fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
......@@ -1039,19 +1038,6 @@ if test $gcc_cv_type_clock_t = yes; then
[Define if <time.h> defines clock_t.])
fi
AC_CACHE_CHECK(for uchar, gcc_cv_type_uchar,
[AC_TRY_COMPILE([
#include "ansidecl.h"
#include "system.h"
],
[if ((uchar *)0) return 0;
if (sizeof(uchar)) return 0;],
ac_cv_type_uchar=yes, ac_cv_type_uchar=no)])
if test $ac_cv_type_uchar = yes; then
AC_DEFINE(HAVE_UCHAR, 1,
[Define if <sys/types.h> defines \`uchar'.])
fi
# Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
CFLAGS="$saved_CFLAGS"
......
2004-05-23 Paolo Bonzini <bonzini@gnu.org>
* Make-lang.in: No need to specify $(LIBCPP).
2004-05-23 Mark Mitchell <mark@codesourcery.com>
PR c++/15044
......
......@@ -88,9 +88,9 @@ CXX_OBJS = cp/call.o cp/decl.o cp/expr.o cp/pt.o cp/typeck2.o \
cp-warn = $(STRICT_WARN) $(WERROR)
cc1plus$(exeext): $(CXX_OBJS) $(CXX_C_OBJS) $(BACKEND) \
libcpp.a $(LIBDEPS)
$(LIBDEPS)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
$(CXX_OBJS) $(CXX_C_OBJS) $(BACKEND) libcpp.a $(LIBS)
$(CXX_OBJS) $(CXX_C_OBJS) $(BACKEND) $(LIBS)
# Special build rules.
$(srcdir)/cp/cfns.h: $(srcdir)/cp/cfns.gperf
......
2004-05-23 Paolo Bonzini <bonzini@gnu.org>
* Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
2004-05-21 Mark Wielaard <mark@klomp.org>
* gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
......
......@@ -105,16 +105,16 @@ JAVA_OBJS = java/parse.o java/class.o java/decl.o java/expr.o \
java/zextract.o java/jcf-io.o java/win32-host.o java/jcf-parse.o java/mangle.o \
java/mangle_name.o java/builtins.o java/resource.o \
java/jcf-write.o java/buffer.o java/check-init.o java/jcf-depend.o \
java/jcf-path.o java/xref.o java/boehm.o java/java-gimplify.o mkdeps.o
java/jcf-path.o java/xref.o java/boehm.o java/java-gimplify.o
GCJH_OBJS = java/gjavah.o java/jcf-io.o java/jcf-depend.o java/jcf-path.o \
java/win32-host.o java/zextract.o version.o mkdeps.o errors.o ggc-none.o \
java/win32-host.o java/zextract.o version.o errors.o ggc-none.o \
intl.o
JVSCAN_OBJS = java/parse-scan.o java/jv-scan.o version.o intl.o
JCFDUMP_OBJS = java/jcf-dump.o java/jcf-io.o java/jcf-depend.o java/jcf-path.o \
java/win32-host.o java/zextract.o errors.o version.o mkdeps.o ggc-none.o intl.o
java/win32-host.o java/zextract.o errors.o version.o ggc-none.o intl.o
JVGENMAIN_OBJS = java/jvgenmain.o java/mangle_name.o errors.o intl.o
......@@ -130,7 +130,7 @@ jc1$(exeext): $(JAVA_OBJS) $(BACKEND) $(LIBDEPS)
gcjh$(exeext): $(GCJH_OBJS) $(LIBDEPS)
rm -f $@
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(GCJH_OBJS) $(ZLIB) $(LIBS)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(GCJH_OBJS) $(CPPLIBS) $(ZLIB) $(LIBS)
jv-scan$(exeext): $(JVSCAN_OBJS) $(LIBDEPS)
rm -f $@
......@@ -139,7 +139,7 @@ jv-scan$(exeext): $(JVSCAN_OBJS) $(LIBDEPS)
jcf-dump$(exeext): $(JCFDUMP_OBJS) $(LIBDEPS)
rm -f $@
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JCFDUMP_OBJS) \
$(ZLIB) $(LDEXP_LIB) $(LIBS)
$(CPPLIBS) $(ZLIB) $(LDEXP_LIB) $(LIBS)
jvgenmain$(exeext): $(JVGENMAIN_OBJS) $(LIBDEPS)
rm -f $@
......
......@@ -22,7 +22,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
allocated by ggc_alloc_string are stored in an obstack which is
never shrunk. Identifiers are uniquely stored in a hash table.
We have our own private hash table implementation. libiberty's
We use cpplib's hash table implementation. libiberty's
hashtab.c is not used because it requires 100% average space
overhead per string, which is unacceptable. Also, this algorithm
is faster. */
......@@ -33,7 +33,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "tm.h"
#include "ggc.h"
#include "tree.h"
#include "hashtable.h"
#include "symtab.h"
#include "cpplib.h"
/* The "" allocated string. */
......
......@@ -421,16 +421,6 @@ extern int snprintf (char *, size_t, const char *, ...);
# endif
#endif
/* Approximate O_NONBLOCK. */
#ifndef O_NONBLOCK
#define O_NONBLOCK O_NDELAY
#endif
/* Approximate O_NOCTTY. */
#ifndef O_NOCTTY
#define O_NOCTTY 0
#endif
/* Define well known filenos if the system does not define them. */
#ifndef STDIN_FILENO
# define STDIN_FILENO 0
......
......@@ -957,7 +957,7 @@ struct tree_vector GTY(())
tree elements;
};
#include "hashtable.h"
#include "symtab.h"
/* Define fields and accessors for some special-purpose tree nodes. */
......
2004-05-23 Paolo Bonzini <bonzini@gnu.org>
Moved libcpp from the gcc subdirectory to the toplevel.
* Makefile.am: New file.
* Makefile.in: Regenerate.
* configure.ac: New file.
* configure: Regenerate.
* config.in: Regenerate.
* charset.c: Moved from gcc/cppcharset.c. Add note about
brokenness of input charset detection. Adjust for change
in name of cppucnid.h.
* errors.c: Moved from gcc/cpperror.c. Do not include intl.h.
* expr.c: Moved from gcc/cppexp.c.
* files.c: Moved from gcc/cppfiles.c. Do not include intl.h.
Remove #define of O_BINARY, it is in system.h.
* identifiers.c: Moved from gcc/cpphash.c.
* internal.h: Moved from gcc/cpphash.h. Change header
guard name. All other files adjusted to match name change.
* init.c: Moved from gcc/cppinit.c.
(init_library) [ENABLE_NLS]: Call bindtextdomain.
* lex.c: Moved from gcc/cpplex.c.
* directives.c: Moved from gcc/cpplib.c.
* macro.c: Moved from gcc/cppmacro.c.
* pch.c: Moved from gcc/cpppch.c. Do not include intl.h.
* traditional.c: Moved from gcc/cpptrad.c.
* ucnid.h: Moved from gcc/cppucnid.h. Change header
guard name.
* ucnid.pl: Moved from gcc/cppucnid.pl.
* ucnid.tab: Moved from gcc/cppucnid.tab. Change header
guard name.
* symtab.c: Moved from gcc/hashtable.c.
* line-map.c: Moved from gcc. Do not include intl.h.
* mkdeps.c: Moved from gcc.
* system.h: New file.
localedir = $(datadir)/locale
ACLOCAL_AMFLAGS = -I ../config
AM_CPPFLAGS = -I$(srcdir)/../include -I$(srcdir) -I$(srcdir)/../intl \
-I$(srcdir)/include -DLOCALEDIR="\"$(localedir)\""
noinst_LIBRARIES = libcpp.a
libcpp_a_SOURCES = \
charset.c directives.c errors.c expr.c files.c \
identifiers.c init.c lex.c line-map.c macro.c mkdeps.c \
pch.c symtab.c traditional.c
noinst_HEADERS = \
include/cpplib.h include/line-map.h include/mkdeps.h \
include/symtab.h internal.h system.h ucnid.h
XGETTEXT = @XGETTEXT@
GMSGFMT = @GMSGFMT@
MSGMERGE = msgmerge
CATALOGS = @CATALOGS@
if ENABLE_NLS
build-po: $(CATALOGS)
update-po: $(CATALOGS:.gmo=.pox)
else
build-po:
update-po:
endif
# N.B. We do not attempt to copy these into $(srcdir).
.po.gmo:
-test -d po || mkdir po
$(GMSGFMT) --statistics -o $@ $<
# The new .po has to be gone over by hand, so we deposit it into
# build/po with a different extension.
# If build/po/$(PACKAGE).pot exists, use it (it was just created),
# else use the one in srcdir.
.po.pox:
-test -d po || mkdir po
$(MSGMERGE) $< `if test -f po/$(PACKAGE).pot; \
then echo po/$(PACKAGE).pot; \
else echo $(srcdir)/po/$(PACKAGE).pot; fi` -o $@
# This rule has to look for .gmo modules in both srcdir and
# the cwd, and has to check that we actually have a catalog
# for each language, in case they weren't built or included
# with the distribution.
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(datadir)
cats="$(CATALOGS)"; for cat in $$cats; do \
lang=`basename $$cat | sed 's/\.gmo$$//'`; \
if [ -f $$cat ]; then :; \
elif [ -f $(srcdir)/$$cat ]; then cat=$(srcdir)/$$cat; \
else continue; \
fi; \
dir=$(localedir)/$$lang/LC_MESSAGES; \
echo $(mkinstalldirs) $(DESTDIR)$$dir; \
$(mkinstalldirs) $(DESTDIR)$$dir || exit 1; \
echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
$(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
done
# Rule for regenerating the message template (gcc.pot).
# Instead of forcing everyone to edit POTFILES.in, which proved impractical,
# this rule has no dependencies and always regenerates libcpp.pot. This is
# relatively harmless since the .po files do not directly depend on it.
.PHONY: po/$(PACKAGE).pot
po/$(PACKAGE).pot: $(libcpp_a_SOURCES) $(noinst_HEADERS)
-test -d $(srcdir)/po || mkdir $(srcdir)/po
$(XGETTEXT) --default-domain=$(PACKAGE) \
--keyword=cpp_error,3 --keyword=cpp_errno,3 \
--keyword=cpp_error_with_line,5 \
--copyright-holder="Free Software Foundation, Inc." \
--msgid-bugs-address="http://gcc.gnu.org/bugs.html" \
--language=c -o po/$(PACKAGE).pot $^
......@@ -21,8 +21,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "config.h"
#include "system.h"
#include "cpplib.h"
#include "cpphash.h"
#include "cppucnid.h"
#include "internal.h"
#include "ucnid.h"
/* Character set handling for C-family languages.
......@@ -1400,7 +1400,25 @@ _cpp_default_encoding (void)
{
const char *current_encoding = NULL;
#if defined (HAVE_LOCALE_H) && defined (HAVE_LANGINFO_CODESET)
/* We disable this because the default codeset is 7-bit ASCII on
most platforms, and this causes conversion failures on every
file in GCC that happens to have one of the upper 128 characters
in it -- most likely, as part of the name of a contributor.
We should definitely recognize in-band markers of file encoding,
like:
- the appropriate Unicode byte-order mark (FE FF) to recognize
UTF16 and UCS4 (in both big-endian and little-endian flavors)
and UTF8
- a "#i", "#d", "/*", "//", " #p" or "#p" (for #pragma) to
distinguish ASCII and EBCDIC.
- now we can parse something like "#pragma GCC encoding <xyz>
on the first line, or even Emacs/VIM's mode line tags (there's
a problem here in that VIM uses the last line, and Emacs has
its more elaborate "Local variables:" convention).
- investigate whether Java has another common convention, which
would be friendly to support.
(Zack Weinberg and Paolo Bonzini, May 20th 2004) */
#if defined (HAVE_LOCALE_H) && defined (HAVE_LANGINFO_CODESET) && 0
setlocale (LC_CTYPE, "");
current_encoding = nl_langinfo (CODESET);
#endif
......
/* config.in. Generated from configure.ac by autoheader. */
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
systems. This function is required for `alloca.c' support on those systems.
*/
#undef CRAY_STACKSEG_END
/* Define to 1 if using `alloca.c'. */
#undef C_ALLOCA
/* Define if you want more run-time sanity checks. */
#undef ENABLE_CHECKING
/* Define to 1 if translation of program messages to the user's native
language is requested. */
#undef ENABLE_NLS
/* Define to 1 if you have `alloca', as a function or macro. */
#undef HAVE_ALLOCA
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
*/
#undef HAVE_ALLOCA_H
/* Define to 1 if you have the declaration of `abort', and to 0 if you don't.
*/
#undef HAVE_DECL_ABORT
/* Define to 1 if you have the declaration of `errno', and to 0 if you don't.
*/
#undef HAVE_DECL_ERRNO
/* Define to 1 if you have the declaration of `fprintf_unlocked', and to 0 if
you don't. */
#undef HAVE_DECL_FPRINTF_UNLOCKED
/* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 if
you don't. */
#undef HAVE_DECL_FPUTC_UNLOCKED
/* Define to 1 if you have the declaration of `fputs_unlocked', and to 0 if
you don't. */
#undef HAVE_DECL_FPUTS_UNLOCKED
/* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if
you don't. */
#undef HAVE_DECL_FWRITE_UNLOCKED
/* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you
don't. */
#undef HAVE_DECL_PUTC_UNLOCKED
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
/* Define to 1 if you have the `fprintf_unlocked' function. */
#undef HAVE_FPRINTF_UNLOCKED
/* Define to 1 if you have the `fputc_unlocked' function. */
#undef HAVE_FPUTC_UNLOCKED
/* Define to 1 if you have the `fputs_unlocked' function. */
#undef HAVE_FPUTS_UNLOCKED
/* Define to 1 if you have the `fwrite_unlocked' function. */
#undef HAVE_FWRITE_UNLOCKED
/* Define if you have the iconv() function. */
#undef HAVE_ICONV
/* Define to 1 if you have the <iconv.h> header file. */
#undef HAVE_ICONV_H
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
#undef HAVE_LANGINFO_CODESET
/* Define to 1 if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
/* Define to 1 if you have the <locale.h> header file. */
#undef HAVE_LOCALE_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if libc includes obstacks. */
#undef HAVE_OBSTACK
/* Define to 1 if you have the `putc_unlocked' function. */
#undef HAVE_PUTC_UNLOCKED
/* Define if you have a working <stdbool.h> header file. */
#undef HAVE_STDBOOL_H
/* Define to 1 if you have the <stddef.h> header file. */
#undef HAVE_STDDEF_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/file.h> header file. */
#undef HAVE_SYS_FILE_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define if <sys/types.h> defines \`uchar'. */
#undef HAVE_UCHAR
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define if the \`_Bool' type is built-in. */
#undef HAVE__BOOL
/* Define to the widest efficient host integer type at least as wide as the
target's size_t type. */
#undef HOST_WIDE_INT
/* Define as const if the declaration of iconv() needs const. */
#undef ICONV_CONST
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* The size of a `int', as computed by sizeof. */
#undef SIZEOF_INT
/* The size of a `long', as computed by sizeof. */
#undef SIZEOF_LONG
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
#undef STACK_DIRECTION
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define if you can safely include both <string.h> and <strings.h>. */
#undef STRING_WITH_STRINGS
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
#undef TM_IN_SYS_TIME
/* Version number of package */
#undef VERSION
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
#undef inline
#endif
/* Define to `long' if <sys/types.h> does not define. */
#undef off_t
/* Define to `unsigned' if <sys/types.h> does not define. */
#undef size_t
This source diff could not be displayed because it is too large. You can view the blob instead.
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.57)
AC_INIT(cpplib, [ ], gcc-bugs@gcc.gnu.org, cpplib)
AC_CONFIG_SRCDIR(ucnid.h)
AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE(foreign)
AM_MAINTAINER_MODE
# Checks for programs.
AC_PROG_CC
AC_PROG_RANLIB
# Checks for header files.
AC_HEADER_TIME
ACX_HEADER_STRING
ACX_HEADER_STDBOOL
AC_CHECK_HEADERS(iconv.h locale.h fcntl.h limits.h stddef.h \
stdlib.h strings.h string.h sys/file.h unistd.h)
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_FUNC_OBSTACK
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
AC_STRUCT_TM
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
AC_CHECK_FUNCS(putc_unlocked fputc_unlocked fputs_unlocked \
fwrite_unlocked fprintf_unlocked)
AC_CHECK_DECLS([abort, errno, putc_unlocked, fputc_unlocked,
fputs_unlocked, fwrite_unlocked, fprintf_unlocked])
# Checks for library functions.
AC_FUNC_ALLOCA
AC_HEADER_STDC
AM_LANGINFO_CODESET
ZW_GNU_GETTEXT_SISTER_DIR
AC_CACHE_CHECK(for uchar, gcc_cv_type_uchar,
[AC_TRY_COMPILE([
#include "ansidecl.h"
#include "system.h"
],
[if ((uchar *)0) return 0;
if (sizeof(uchar)) return 0;],
ac_cv_type_uchar=yes, ac_cv_type_uchar=no)])
if test $ac_cv_type_uchar = yes; then
AC_DEFINE(HAVE_UCHAR, 1,
[Define if <sys/types.h> defines \`uchar'.])
fi
AM_ICONV
AM_CONDITIONAL(ENABLE_NLS, [test "x$enable_nls" != xno])
AC_ARG_ENABLE(checking,
[ --enable-checking enable expensive run-time checks],,
enable_checking=no)
if test $enable_checking != no ; then
AC_DEFINE(ENABLE_CHECKING, 1,
[Define if you want more run-time sanity checks.])
fi
case $target in
alpha*-*-* | \
x86_64-*-* | \
ia64-*-* | \
hppa*64*-*-* | parisc*64*-*-* | \
mips*-*-* | \
mmix-*-* | \
powerpc*-*-* | \
rs6000*-*-* | \
s390*-*-* | \
sparc64*-*-* | ultrasparc-*-freebsd* | \
sparcv9-*-solaris2* | \
sparc-*-solaris2.[789] | sparc-*-solaris2.1[0-9] | \
sh[123456789l]*-*-*)
need_64bit_hwint=yes ;;
*)
need_64bit_hwint=no ;;
esac
case $need_64bit_hwint:$ac_cv_sizeof_long in
*:8 | no:*) host_wide_int=long ;;
*) host_wide_int='long long' ;;
esac
AC_DEFINE_UNQUOTED(HOST_WIDE_INT, $host_wide_int,
[Define to the widest efficient host integer type at least
as wide as the target's size_t type.])
AC_CONFIG_HEADERS(config.h:config.in)
AC_CONFIG_FILES(Makefile)
AC_OUTPUT
......@@ -22,7 +22,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "config.h"
#include "system.h"
#include "cpplib.h"
#include "cpphash.h"
#include "internal.h"
#include "obstack.h"
/* Chained list of answers to an assertion. */
......
......@@ -26,8 +26,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "config.h"
#include "system.h"
#include "cpplib.h"
#include "cpphash.h"
#include "intl.h"
#include "internal.h"
static void print_location (cpp_reader *, source_location, unsigned int);
......
......@@ -21,7 +21,7 @@ Boston, MA 02111-1307, USA. */
#include "config.h"
#include "system.h"
#include "cpplib.h"
#include "cpphash.h"
#include "internal.h"
#define PART_PRECISION (sizeof (cpp_num_part) * CHAR_BIT)
#define HALF_MASK (~(cpp_num_part) 0 >> (PART_PRECISION / 2))
......
......@@ -24,8 +24,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "config.h"
#include "system.h"
#include "cpplib.h"
#include "cpphash.h"
#include "intl.h"
#include "internal.h"
#include "mkdeps.h"
#include "hashtab.h"
#include "md5.h"
......@@ -48,10 +47,6 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
# define set_stdin_to_binary_mode() /* Nothing */
#endif
#ifndef O_BINARY
# define O_BINARY 0
#endif
/* This structure represents a file searched for by CPP, whether it
exists or not. An instance may be pointed to by more than one
file_hash_entry; at present no reference count is kept. */
......
......@@ -26,7 +26,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "config.h"
#include "system.h"
#include "cpplib.h"
#include "cpphash.h"
#include "internal.h"
static cpp_hashnode *alloc_node (hash_table *);
......
2004-05-23 Paolo Bonzini <bonzini@gnu.org>
* cpplib.h: Moved from gcc. Change header guard name.
* line-map.h: Moved from gcc. Change header guard name.
* mkdeps.h: Moved from gcc. Change header guard name.
* symtab.h: Moved from gcc/hashtable.h. Change header
guard name.
......@@ -20,11 +20,11 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
In other words, you are welcome to use, share and improve this program.
You are forbidden to forbid anyone else to use, share and improve
what you give them. Help stamp out software-hoarding! */
#ifndef GCC_CPPLIB_H
#define GCC_CPPLIB_H
#ifndef LIBCPP_CPPLIB_H
#define LIBCPP_CPPLIB_H
#include <sys/types.h>
#include "hashtable.h"
#include "symtab.h"
#include "line-map.h"
#ifdef __cplusplus
......@@ -770,4 +770,4 @@ extern int cpp_read_state (cpp_reader *, const char *, FILE *,
}
#endif
#endif /* ! GCC_CPPLIB_H */
#endif /* ! LIBCPP_CPPLIB_H */
......@@ -20,8 +20,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
You are forbidden to forbid anyone else to use, share and improve
what you give them. Help stamp out software-hoarding! */
#ifndef GCC_LINE_MAP_H
#define GCC_LINE_MAP_H
#ifndef LIBCPP_LINE_MAP_H
#define LIBCPP_LINE_MAP_H
/* Reason for adding a line change with add_line_map (). LC_ENTER is
when including a new file, e.g. a #include directive in C.
......@@ -179,4 +179,4 @@ extern void linemap_print_containing_files (struct line_maps *,
extern source_location
linemap_position_for_column (struct line_maps *set, unsigned int to_column);
#endif /* !GCC_LINE_MAP_H */
#endif /* !LIBCPP_LINE_MAP_H */
......@@ -20,8 +20,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
You are forbidden to forbid anyone else to use, share and improve
what you give them. Help stamp out software-hoarding! */
#ifndef GCC_MKDEPS_H
#define GCC_MKDEPS_H
#ifndef LIBCPP_MKDEPS_H
#define LIBCPP_MKDEPS_H
/* This is the data structure used by all the functions in mkdeps.c.
It's quite straightforward, but should be treated as opaque. */
......@@ -69,4 +69,4 @@ extern int deps_restore (struct deps *, FILE *, const char *);
automatic dependency schemes. */
extern void deps_phony_targets (const struct deps *, FILE *);
#endif /* ! GCC_MKDEPS_H */
#endif /* ! LIBCPP_MKDEPS_H */
......@@ -15,8 +15,8 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef GCC_HASHTABLE_H
#define GCC_HASHTABLE_H
#ifndef LIBCPP_SYMTAB_H
#define LIBCPP_SYMTAB_H
#include "obstack.h"
#define GTY(x) /* nothing */
......@@ -78,4 +78,4 @@ extern void ht_forall (hash_table *, ht_cb, const void *);
/* Dump allocation statistics to stderr. */
extern void ht_dump_statistics (hash_table *);
#endif /* GCC_HASHTABLE_H */
#endif /* LIBCPP_SYMTAB_H */
......@@ -22,7 +22,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "config.h"
#include "system.h"
#include "cpplib.h"
#include "cpphash.h"
#include "internal.h"
#include "mkdeps.h"
static void init_library (void);
......@@ -119,6 +119,10 @@ init_library (void)
we were compiled with a compiler that supports C99 designated
initializers. */
init_trigraph_map ();
#ifdef ENABLE_NLS
(void) bindtextdomain ("gcc", LOCALEDIR);
#endif
}
}
......
......@@ -17,13 +17,13 @@ along with this program; if not, write to the Free Software
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* This header defines all the internal data structures and functions
that need to be visible across files. It's called cpphash.h for
historical reasons. */
that need to be visible across files. It should not be used outside
cpplib. */
#ifndef GCC_CPPHASH_H
#define GCC_CPPHASH_H
#ifndef LIBCPP_INTERNAL_H
#define LIBCPP_INTERNAL_H
#include "hashtable.h"
#include "symtab.h"
#if defined HAVE_ICONV_H && defined HAVE_ICONV
#include <iconv.h>
......@@ -648,4 +648,4 @@ ufputs (const uchar *s, FILE *f)
return fputs ((const char *)s, f);
}
#endif /* ! GCC_CPPHASH_H */
#endif /* ! LIBCPP_INTERNAL_H */
......@@ -22,7 +22,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "config.h"
#include "system.h"
#include "cpplib.h"
#include "cpphash.h"
#include "internal.h"
enum spell_type
{
......
......@@ -23,7 +23,6 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "config.h"
#include "system.h"
#include "line-map.h"
#include "intl.h"
static void trace_include (const struct line_maps *, const struct line_map *);
......
......@@ -26,7 +26,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "config.h"
#include "system.h"
#include "cpplib.h"
#include "cpphash.h"
#include "internal.h"
typedef struct macro_arg macro_arg;
struct macro_arg
......
......@@ -18,8 +18,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "config.h"
#include "system.h"
#include "cpplib.h"
#include "cpphash.h"
#include "intl.h"
#include "internal.h"
#include "hashtab.h"
#include "mkdeps.h"
......
2004-05-23 Paolo Bonzini <bonzini@gnu.org>
* be.po: Extracted from gcc/po/be.po.
* ca.po: Extracted from gcc/po/ca.po.
* da.po: Extracted from gcc/po/da.po.
* de.po: Extracted from gcc/po/de.po.
* el.po: Extracted from gcc/po/el.po.
* es.po: Extracted from gcc/po/es.po.
* fr.po: Extracted from gcc/po/fr.po.
* ja.po: Extracted from gcc/po/ja.po.
* nl.po: Extracted from gcc/po/nl.po.
* sv.po: Extracted from gcc/po/sv.po.
* tr.po: Extracted from gcc/po/tr.po.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
......@@ -21,7 +21,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "config.h"
#include "system.h"
#include "hashtable.h"
#include "symtab.h"
/* The code below is a specialization of Vladimir Makarov's expandable
hash tables (see libiberty/hashtab.c). The abstraction penalty was
......
/* Get common system includes and various definitions and declarations based
on autoconf macros.
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of libcpp (aka cpplib).
GCC 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.
GCC 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 GCC; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
#ifndef LIBCPP_SYSTEM_H
#define LIBCPP_SYSTEM_H
/* We must include stdarg.h before stdio.h. */
#include <stdarg.h>
#ifdef HAVE_STDDEF_H
# include <stddef.h>
#endif
#include <stdio.h>
/* Define a generic NULL if one hasn't already been defined. */
#ifndef NULL
#define NULL 0
#endif
/* The compiler is not a multi-threaded application and therefore we
do not have to use the locking functions. In fact, using the locking
functions can cause the compiler to be significantly slower under
I/O bound conditions (such as -g -O0 on very large source files).
HAVE_DECL_PUTC_UNLOCKED actually indicates whether or not the stdio
code is multi-thread safe by default. If it is set to 0, then do
not worry about using the _unlocked functions.
fputs_unlocked, fwrite_unlocked, and fprintf_unlocked are
extensions and need to be prototyped by hand (since we do not
define _GNU_SOURCE). */
#if defined HAVE_DECL_PUTC_UNLOCKED && HAVE_DECL_PUTC_UNLOCKED
# ifdef HAVE_PUTC_UNLOCKED
# undef putc
# define putc(C, Stream) putc_unlocked (C, Stream)
# endif
# ifdef HAVE_FPUTC_UNLOCKED
# undef fputc
# define fputc(C, Stream) fputc_unlocked (C, Stream)
# endif
# ifdef HAVE_FPUTS_UNLOCKED
# undef fputs
# define fputs(String, Stream) fputs_unlocked (String, Stream)
# if defined (HAVE_DECL_FPUTS_UNLOCKED) && !HAVE_DECL_FPUTS_UNLOCKED
extern int fputs_unlocked (const char *, FILE *);
# endif
# endif
# ifdef HAVE_FWRITE_UNLOCKED
# undef fwrite
# define fwrite(Ptr, Size, N, Stream) fwrite_unlocked (Ptr, Size, N, Stream)
# if defined (HAVE_DECL_FWRITE_UNLOCKED) && !HAVE_DECL_FWRITE_UNLOCKED
extern int fwrite_unlocked (const void *, size_t, size_t, FILE *);
# endif
# endif
# ifdef HAVE_FPRINTF_UNLOCKED
# undef fprintf
/* We can't use a function-like macro here because we don't know if
we have varargs macros. */
# define fprintf fprintf_unlocked
# if defined (HAVE_DECL_FPRINTF_UNLOCKED) && !HAVE_DECL_FPRINTF_UNLOCKED
extern int fprintf_unlocked (FILE *, const char *, ...);
# endif
# endif
#endif
/* ??? Glibc's fwrite/fread_unlocked macros cause
"warning: signed and unsigned type in conditional expression". */
#undef fread_unlocked
#undef fwrite_unlocked
#include <sys/types.h>
#include <errno.h>
#if !defined (errno) && defined (HAVE_DECL_ERRNO) && !HAVE_DECL_ERRNO
extern int errno;
#endif
/* Some of glibc's string inlines cause warnings. Plus we'd rather
rely on (and therefore test) GCC's string builtins. */
#define __NO_STRING_INLINES
#ifdef STRING_WITH_STRINGS
# include <string.h>
# include <strings.h>
#else
# ifdef HAVE_STRING_H
# include <string.h>
# else
# ifdef HAVE_STRINGS_H
# include <strings.h>
# endif
# endif
#endif
#ifdef HAVE_STDLIB_H
# include <stdlib.h>
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#if HAVE_LIMITS_H
# include <limits.h>
#endif
/* Infrastructure for defining missing _MAX and _MIN macros. Note that
macros defined with these cannot be used in #if. */
/* The extra casts work around common compiler bugs. */
#define INTTYPE_SIGNED(t) (! ((t) 0 < (t) -1))
/* The outer cast is needed to work around a bug in Cray C 5.0.3.0.
It is necessary at least when t == time_t. */
#define INTTYPE_MINIMUM(t) ((t) (INTTYPE_SIGNED (t) \
? ~ (t) 0 << (sizeof(t) * CHAR_BIT - 1) : (t) 0))
#define INTTYPE_MAXIMUM(t) ((t) (~ (t) 0 - INTTYPE_MINIMUM (t)))
/* Use that infrastructure to provide a few constants. */
#ifndef UCHAR_MAX
# define UCHAR_MAX INTTYPE_MAXIMUM (unsigned char)
#endif
#ifdef TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
#else
# if HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# ifdef HAVE_TIME_H
# include <time.h>
# endif
# endif
#endif
#ifdef HAVE_FCNTL_H
# include <fcntl.h>
#else
# ifdef HAVE_SYS_FILE_H
# include <sys/file.h>
# endif
#endif
#ifdef HAVE_LOCALE_H
# include <locale.h>
#endif
#ifdef HAVE_LANGINFO_CODESET
# include <langinfo.h>
#endif
#ifndef HAVE_SETLOCALE
# define setlocale(category, locale) (locale)
#endif
#ifdef ENABLE_NLS
#include <libintl.h>
#else
/* Stubs. */
# undef dgettext
# define dgettext(msgid) (msgid)
#endif
#ifndef _
# define _(msgid) dgettext (PACKAGE, msgid)
#endif
#ifndef N_
# define N_(msgid) msgid
#endif
/* Some systems define these in, e.g., param.h. We undefine these names
here to avoid the warnings. We prefer to use our definitions since we
know they are correct. */
#undef MIN
#undef MAX
#define MIN(X,Y) ((X) < (Y) ? (X) : (Y))
#define MAX(X,Y) ((X) > (Y) ? (X) : (Y))
/* The HAVE_DECL_* macros are three-state, undefined, 0 or 1. If they
are defined to 0 then we must provide the relevant declaration
here. These checks will be in the undefined state while configure
is running so be careful to test "defined (HAVE_DECL_*)". */
#if defined (HAVE_DECL_ABORT) && !HAVE_DECL_ABORT
extern void abort (void);
#endif
#if HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
/* Test if something is a normal file. */
#ifndef S_ISREG
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
#endif
/* Test if something is a directory. */
#ifndef S_ISDIR
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
#endif
/* Test if something is a character special file. */
#ifndef S_ISCHR
#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
#endif
/* Test if something is a block special file. */
#ifndef S_ISBLK
#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
#endif
/* Test if something is a socket. */
#ifndef S_ISSOCK
# ifdef S_IFSOCK
# define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
# else
# define S_ISSOCK(m) 0
# endif
#endif
/* Test if something is a FIFO. */
#ifndef S_ISFIFO
# ifdef S_IFIFO
# define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
# else
# define S_ISFIFO(m) 0
# endif
#endif
/* Approximate O_NOCTTY and O_BINARY. */
#ifndef O_NOCTTY
#define O_NOCTTY 0
#endif
#ifndef O_BINARY
# define O_BINARY 0
#endif
/* Filename handling macros. */
#include "filenames.h"
/* Get libiberty declarations. */
#include "libiberty.h"
#include "safe-ctype.h"
/* 1 if we have C99 designated initializers. */
#if !defined(HAVE_DESIGNATED_INITIALIZERS)
#define HAVE_DESIGNATED_INITIALIZERS \
((GCC_VERSION >= 2007) || (__STDC_VERSION__ >= 199901L))
#endif
/* 1 if we have _Bool. */
#ifndef HAVE__BOOL
# define HAVE__BOOL \
((GCC_VERSION >= 3000) || (__STDC_VERSION__ >= 199901L))
#endif
/* Be conservative and only use enum bitfields with GCC.
FIXME: provide a complete autoconf test for buggy enum bitfields. */
#if (GCC_VERSION > 2000)
#define ENUM_BITFIELD(TYPE) __extension__ enum TYPE
#else
#define ENUM_BITFIELD(TYPE) unsigned int
#endif
/* We only use bool bitfields with gcc3. Some supposedly C99
compilers don't handle them correctly. */
#if (GCC_VERSION >= 3000)
#define BOOL_BITFIELD _Bool
#else
#define BOOL_BITFIELD unsigned int
#endif
#ifndef offsetof
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *) 0)->MEMBER)
#endif
/* __builtin_expect(A, B) evaluates to A, but notifies the compiler that
the most likely value of A is B. This feature was added at some point
between 2.95 and 3.0. Let's use 3.0 as the lower bound for now. */
#if (GCC_VERSION < 3000)
#define __builtin_expect(a, b) (a)
#endif
/* Provide some sort of boolean type. We use stdbool.h if it's
available. This must be after all inclusion of system headers,
as some of them will mess us up. */
#undef bool
#undef true
#undef false
#undef TRUE
#undef FALSE
#ifdef HAVE_STDBOOL_H
# include <stdbool.h>
#else
# if !HAVE__BOOL
typedef char _Bool;
# endif
# define bool _Bool
# define true 1
# define false 0
#endif
#if (GCC_VERSION >= 3000)
#undef calloc
#undef strdup
#undef malloc
#undef realloc
#pragma GCC poison calloc strdup
#pragma GCC poison malloc realloc
/* Libiberty macros that are no longer used in GCC. */
#undef ANSI_PROTOTYPES
#undef PTR_CONST
#undef LONG_DOUBLE
#undef VPARAMS
#undef VA_OPEN
#undef VA_FIXEDARG
#undef VA_CLOSE
#undef VA_START
#pragma GCC poison ANSI_PROTOTYPES PTR_CONST LONG_DOUBLE VPARAMS VA_OPEN \
VA_FIXEDARG VA_CLOSE VA_START
/* Note: not all uses of the `index' token (e.g. variable names and
structure members) have been eliminated. */
#undef bcopy
#undef bzero
#undef bcmp
#undef rindex
#pragma GCC poison bcopy bzero bcmp rindex
#endif /* GCC >= 3.0 */
#endif /* ! LIBCPP_SYSTEM_H */
......@@ -19,7 +19,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "config.h"
#include "system.h"
#include "cpplib.h"
#include "cpphash.h"
#include "internal.h"
/* The replacement text of a function-like macro is stored as a
contiguous sequence of aligned blocks, each representing the text
......
......@@ -23,8 +23,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
a reproduction of ISO/IEC PDTR 10176. Unfortunately these tables
are not identical. */
#ifndef CPPUCNID_H
#define CPPUCNID_H
#ifndef LIBCPP_UCNID_H
#define LIBCPP_UCNID_H
#define C99 1
#define CXX 2
......@@ -333,4 +333,4 @@ static const struct ucnrange ucnranges[] = {
{ 0xffda, 0xffdc, CXX },
};
#endif /* cppucnid.h */
#endif /* LIBCPP_UCNID_H */
......@@ -23,8 +23,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
a reproduction of ISO/IEC PDTR 10176. Unfortunately these tables
are not identical. */
#ifndef CPPUCNID_H
#define CPPUCNID_H
#ifndef LIBCPP_UCNID_H
#define LIBCPP_UCNID_H
#define C99 1
#define CXX 2
......@@ -40,7 +40,7 @@ static const struct ucnrange ucnranges[] = {
[table]
};
#endif /* cppucnid.h */
#endif /* LIBCPP_UCNID_H */
%%
[C99]
......
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