aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@redhat.com>2005-04-01 17:16:04 +0000
committerDiego Novillo <dnovillo@redhat.com>2005-04-01 17:16:04 +0000
commit2c1b41938630950e8699a2cbae3088b9c179f809 (patch)
treef93745f2390682fcf3269662fee7c5e14bf0d2d1
parent7b560836d28c028988edc3c1ccc7348bbfc91ac8 (diff)
Merge mainline->tcb as of 2005-03-29.tree-cleanup-branch
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/tree-cleanup-branch@97408 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--ChangeLog14
-rw-r--r--MAINTAINERS1
-rw-r--r--boehm-gc/ChangeLog6
-rw-r--r--boehm-gc/darwin_stop_world.c13
-rw-r--r--boehm-gc/include/private/gcconfig.h12
-rw-r--r--boehm-gc/powerpc_darwin_mach_dep.s19
-rwxr-xr-xconfigure106
-rw-r--r--configure.in1
-rw-r--r--fastjar/ChangeLog10
-rw-r--r--fastjar/jartool.c25
-rw-r--r--gcc/ChangeLog625
-rw-r--r--gcc/ChangeLog.tcb38
-rw-r--r--gcc/DATESTAMP2
-rw-r--r--gcc/Makefile.in9
-rw-r--r--gcc/ada/ChangeLog305
-rw-r--r--gcc/ada/Makefile.in17
-rw-r--r--gcc/ada/Makefile.rtl1
-rw-r--r--gcc/ada/a-direct.adb17
-rw-r--r--gcc/ada/a-direct.ads15
-rw-r--r--gcc/ada/a-tags.adb28
-rw-r--r--gcc/ada/a-tags.ads15
-rw-r--r--gcc/ada/adaint.c22
-rw-r--r--gcc/ada/cio.c7
-rw-r--r--gcc/ada/decl.c13
-rw-r--r--gcc/ada/errout.adb9
-rw-r--r--gcc/ada/errutil.adb10
-rw-r--r--gcc/ada/exp_ch4.adb2
-rw-r--r--gcc/ada/exp_disp.adb32
-rw-r--r--gcc/ada/exp_disp.ads1
-rw-r--r--gcc/ada/exp_dist.adb159
-rw-r--r--gcc/ada/exp_intr.adb83
-rw-r--r--gcc/ada/exp_util.adb14
-rw-r--r--gcc/ada/freeze.adb26
-rw-r--r--gcc/ada/gnat_rm.texi24
-rw-r--r--gcc/ada/gnat_ugn.texi34
-rw-r--r--gcc/ada/i-cpp.adb29
-rw-r--r--gcc/ada/i-cpp.ads12
-rw-r--r--gcc/ada/impunit.adb1
-rw-r--r--gcc/ada/make.adb14
-rw-r--r--gcc/ada/misc.c2
-rw-r--r--gcc/ada/mlib-tgt-vms-alpha.adb12
-rw-r--r--gcc/ada/mlib-tgt-vms-ia64.adb12
-rw-r--r--gcc/ada/opt.ads5
-rw-r--r--gcc/ada/par-ch10.adb4
-rw-r--r--gcc/ada/par-ch12.adb6
-rw-r--r--gcc/ada/par-ch3.adb34
-rw-r--r--gcc/ada/par-ch4.adb19
-rw-r--r--gcc/ada/prj-nmsc.adb26
-rw-r--r--gcc/ada/prj-part.adb2
-rw-r--r--gcc/ada/prj-proc.adb61
-rw-r--r--gcc/ada/prj-strt.adb52
-rw-r--r--gcc/ada/prj.adb4
-rw-r--r--gcc/ada/prj.ads103
-rw-r--r--gcc/ada/rtsfind.ads4
-rw-r--r--gcc/ada/s-taprop-tru64.adb6
-rw-r--r--gcc/ada/scng.adb8
-rw-r--r--gcc/ada/sem_cat.adb15
-rw-r--r--gcc/ada/sem_ch11.adb2
-rw-r--r--gcc/ada/sem_ch4.adb81
-rw-r--r--gcc/ada/sem_ch5.adb49
-rw-r--r--gcc/ada/sem_ch6.adb24
-rw-r--r--gcc/ada/sem_ch8.adb97
-rw-r--r--gcc/ada/sem_prag.adb24
-rw-r--r--gcc/ada/sem_res.adb118
-rw-r--r--gcc/ada/sem_type.adb28
-rw-r--r--gcc/ada/sem_util.adb18
-rw-r--r--gcc/ada/sem_util.ads39
-rw-r--r--gcc/ada/snames.adb1
-rw-r--r--gcc/ada/snames.ads193
-rw-r--r--gcc/ada/styleg.adb65
-rw-r--r--gcc/ada/styleg.ads12
-rw-r--r--gcc/ada/stylesw.adb81
-rw-r--r--gcc/ada/stylesw.ads9
-rw-r--r--gcc/ada/switch-c.adb15
-rw-r--r--gcc/ada/symbols-vms-alpha.adb15
-rw-r--r--gcc/ada/trans.c3
-rw-r--r--gcc/ada/ug_words2
-rw-r--r--gcc/ada/usage.adb5
-rw-r--r--gcc/ada/utils.c10
-rw-r--r--gcc/ada/vms_data.ads6
-rw-r--r--gcc/ada/xnmake.adb28
-rw-r--r--gcc/ada/xtreeprs.adb28
-rw-r--r--gcc/builtin-types.def4
-rw-r--r--gcc/builtins.c3
-rw-r--r--gcc/builtins.def1
-rw-r--r--gcc/c-common.c133
-rw-r--r--gcc/c-common.h4
-rw-r--r--gcc/c-convert.c5
-rw-r--r--gcc/c-decl.c94
-rw-r--r--gcc/c-format.c2
-rw-r--r--gcc/c-objc-common.c28
-rw-r--r--gcc/c-objc-common.h2
-rw-r--r--gcc/c-opts.c10
-rw-r--r--gcc/c-parser.c16
-rw-r--r--gcc/c-tree.h2
-rw-r--r--gcc/c-typeck.c118
-rw-r--r--gcc/c.opt6
-rw-r--r--gcc/cfglayout.c6
-rw-r--r--gcc/cgraph.c4
-rw-r--r--gcc/cgraph.h2
-rw-r--r--gcc/cgraphunit.c10
-rw-r--r--gcc/collect2.c199
-rw-r--r--gcc/collect2.h6
-rw-r--r--gcc/common.opt6
-rw-r--r--gcc/config.gcc6
-rw-r--r--gcc/config.in3
-rw-r--r--gcc/config/arc/arc.c6
-rw-r--r--gcc/config/arm/arm-protos.h1
-rw-r--r--gcc/config/arm/arm.c27
-rw-r--r--gcc/config/arm/arm.h4
-rw-r--r--gcc/config/cris/cris.c34
-rw-r--r--gcc/config/darwin.h4
-rw-r--r--gcc/config/frv/frv-protos.h19
-rw-r--r--gcc/config/frv/frv.c137
-rw-r--r--gcc/config/frv/frv.h237
-rw-r--r--gcc/config/i386/darwin.h2
-rw-r--r--gcc/config/i386/i386.c13
-rw-r--r--gcc/config/i386/i386.md109
-rw-r--r--gcc/config/i860/i860.h27
-rw-r--r--gcc/config/m32r/little.h2
-rw-r--r--gcc/config/m32r/m32r.c106
-rw-r--r--gcc/config/m32r/m32r.h124
-rw-r--r--gcc/config/mips/mips.c5
-rw-r--r--gcc/config/rs6000/darwin-fallback.c114
-rw-r--r--gcc/config/rs6000/predicates.md20
-rw-r--r--gcc/config/rs6000/rs6000-protos.h1
-rw-r--r--gcc/config/rs6000/rs6000.c27
-rw-r--r--gcc/config/rs6000/rs6000.h4
-rw-r--r--gcc/config/rs6000/rs6000.md63
-rw-r--r--gcc/config/sh/sh.md18
-rw-r--r--gcc/config/vax/vax-protos.h3
-rw-r--r--gcc/config/vax/vax.c399
-rw-r--r--gcc/config/vax/vax.md902
-rwxr-xr-xgcc/configure20
-rw-r--r--gcc/configure.ac17
-rw-r--r--gcc/cp/ChangeLog67
-rw-r--r--gcc/cp/class.c20
-rw-r--r--gcc/cp/cp-objcp-common.h2
-rw-r--r--gcc/cp/cp-tree.h4
-rw-r--r--gcc/cp/decl.c101
-rw-r--r--gcc/cp/error.c6
-rw-r--r--gcc/cp/init.c26
-rw-r--r--gcc/cp/mangle.c8
-rw-r--r--gcc/cp/method.c10
-rw-r--r--gcc/cp/parser.c22
-rw-r--r--gcc/cp/pt.c14
-rw-r--r--gcc/cp/semantics.c3
-rw-r--r--gcc/cp/tree.c9
-rw-r--r--gcc/cp/typeck.c99
-rw-r--r--gcc/cp/typeck2.c2
-rw-r--r--gcc/cse.c19
-rw-r--r--gcc/dbxout.c6
-rw-r--r--gcc/ddg.c2
-rw-r--r--gcc/debug.c5
-rw-r--r--gcc/debug.h6
-rw-r--r--gcc/diagnostic.c2
-rw-r--r--gcc/doc/extend.texi51
-rw-r--r--gcc/doc/install.texi33
-rw-r--r--gcc/doc/invoke.texi19
-rw-r--r--gcc/doc/tm.texi10
-rw-r--r--gcc/dominance.c6
-rw-r--r--gcc/dwarf2out.c3
-rw-r--r--gcc/emit-rtl.c32
-rw-r--r--gcc/et-forest.c11
-rw-r--r--gcc/et-forest.h3
-rw-r--r--gcc/final.c37
-rw-r--r--gcc/fold-const.c1126
-rw-r--r--gcc/fortran/ChangeLog101
-rw-r--r--gcc/fortran/arith.c28
-rw-r--r--gcc/fortran/check.c241
-rw-r--r--gcc/fortran/convert.c6
-rw-r--r--gcc/fortran/f95-lang.c15
-rw-r--r--gcc/fortran/gfortran.h16
-rw-r--r--gcc/fortran/gfortran.texi34
-rw-r--r--gcc/fortran/intrinsic.c96
-rw-r--r--gcc/fortran/intrinsic.h35
-rw-r--r--gcc/fortran/invoke.texi36
-rw-r--r--gcc/fortran/iresolve.c218
-rw-r--r--gcc/fortran/lang.opt22
-rw-r--r--gcc/fortran/options.c18
-rw-r--r--gcc/fortran/trans-array.c196
-rw-r--r--gcc/fortran/trans-common.c29
-rw-r--r--gcc/fortran/trans-expr.c15
-rw-r--r--gcc/fortran/trans-intrinsic.c137
-rw-r--r--gcc/fortran/trans-stmt.c116
-rw-r--r--gcc/fortran/trans-types.c33
-rw-r--r--gcc/fortran/trans.c2
-rw-r--r--gcc/gcc.c9
-rw-r--r--gcc/gcov.c2
-rw-r--r--gcc/genopinit.c1
-rw-r--r--gcc/gimplify.c4
-rw-r--r--gcc/hooks.c7
-rw-r--r--gcc/hooks.h2
-rw-r--r--gcc/java/ChangeLog19
-rw-r--r--gcc/java/decl.c9
-rw-r--r--gcc/java/gcj.texi15
-rw-r--r--gcc/java/lang.c2
-rw-r--r--gcc/langhooks-def.h1
-rw-r--r--gcc/langhooks.h13
-rw-r--r--gcc/objc/ChangeLog6
-rw-r--r--gcc/objc/objc-act.c8
-rw-r--r--gcc/optabs.c6
-rw-r--r--gcc/optabs.h2
-rw-r--r--gcc/params.def21
-rw-r--r--gcc/po/ChangeLog4
-rw-r--r--gcc/po/de.po832
-rw-r--r--gcc/profile.c30
-rw-r--r--gcc/reg-stack.c21
-rw-r--r--gcc/reload1.c15
-rw-r--r--gcc/reorg.c11
-rw-r--r--gcc/rtl-profile.c119
-rw-r--r--gcc/rtl.h1
-rw-r--r--gcc/rtlhooks-def.h2
-rw-r--r--gcc/rtlhooks.c2
-rw-r--r--gcc/sdbout.c5
-rw-r--r--gcc/simplify-rtx.c90
-rw-r--r--gcc/stmt.c53
-rw-r--r--gcc/system.h2
-rw-r--r--gcc/target-def.h2
-rw-r--r--gcc/target.h4
-rw-r--r--gcc/testsuite/ChangeLog214
-rw-r--r--gcc/testsuite/g++.dg/ext/visibility/pragma-override1.C2
-rw-r--r--gcc/testsuite/g++.dg/ext/visibility/pragma-override2.C2
-rw-r--r--gcc/testsuite/g++.dg/ext/visibility/visibility-7.C2
-rw-r--r--gcc/testsuite/g++.dg/opt/max1.C2
-rw-r--r--gcc/testsuite/g++.dg/opt/pr7503-2.C2
-rw-r--r--gcc/testsuite/g++.dg/opt/pr7503-3.C2
-rw-r--r--gcc/testsuite/g++.dg/opt/pr7503-4.C2
-rw-r--r--gcc/testsuite/g++.dg/opt/pr7503-5.C2
-rw-r--r--gcc/testsuite/g++.dg/parse/error16.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.warn/compare1.C2
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20020720-1.x2
-rw-r--r--gcc/testsuite/gcc.dg/20020219-1.c13
-rw-r--r--gcc/testsuite/gcc.dg/20020312-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/20020919-1.c6
-rw-r--r--gcc/testsuite/gcc.dg/alias-7.c6
-rw-r--r--gcc/testsuite/gcc.dg/cleanup-5.c3
-rw-r--r--gcc/testsuite/gcc.dg/nonnull-3.c1
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-80.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-96.c2
-rw-r--r--gcc/testsuite/gcc.dg/visibility-7.c2
-rw-r--r--gcc/testsuite/gcc.dg/winline-6.c2
-rw-r--r--gcc/testsuite/gfortran.dg/g77/20030326-1.f23
-rw-r--r--gcc/testsuite/lib/g++.exp22
-rw-r--r--gcc/testsuite/lib/gcc-defs.exp32
-rw-r--r--gcc/testsuite/lib/gcc-dg.exp18
-rw-r--r--gcc/testsuite/lib/gfortran.exp18
-rw-r--r--gcc/testsuite/lib/objc.exp16
-rw-r--r--gcc/testsuite/lib/target-supports-dg.exp2
-rw-r--r--gcc/testsuite/lib/target-supports.exp40
-rw-r--r--gcc/testsuite/lib/treelang.exp18
-rw-r--r--gcc/testsuite/treelang/ChangeLog4
-rw-r--r--gcc/tlink.c8
-rw-r--r--gcc/toplev.c5
-rw-r--r--gcc/tree-flow.h29
-rw-r--r--gcc/tree-inline.c88
-rw-r--r--gcc/tree-inline.h3
-rw-r--r--gcc/tree-into-ssa.c244
-rw-r--r--gcc/tree-profile.c525
-rw-r--r--gcc/tree-sra.c29
-rw-r--r--gcc/tree-ssa-dom.c19
-rw-r--r--gcc/tree-ssa-loop-ivopts.c7
-rw-r--r--gcc/tree-ssa-operands.c42
-rw-r--r--gcc/tree-ssa-operands.h1
-rw-r--r--gcc/tree-ssa-pre.c2
-rw-r--r--gcc/tree-ssanames.c30
-rw-r--r--gcc/tree-vect-analyze.c31
-rw-r--r--gcc/tree-vect-transform.c155
-rw-r--r--gcc/tree-vectorizer.c679
-rw-r--r--gcc/tree-vectorizer.h4
-rw-r--r--gcc/tree-vrp.c43
-rw-r--r--gcc/tree.c93
-rw-r--r--gcc/tree.h18
-rw-r--r--gcc/treelang/ChangeLog19
-rw-r--r--gcc/treelang/tree-convert.c2
-rw-r--r--gcc/treelang/treelang.h2
-rw-r--r--gcc/treelang/treetree.c48
-rw-r--r--gcc/tsystem.h12
-rw-r--r--gcc/value-prof.c905
-rw-r--r--gcc/value-prof.h33
-rw-r--r--gcc/varasm.c10
-rw-r--r--gcc/version.c2
-rw-r--r--gcc/vmsdbgout.c3
-rw-r--r--include/ChangeLog57
-rw-r--r--include/demangle.h70
-rw-r--r--include/dyn-string.h39
-rw-r--r--include/fibheap.h28
-rw-r--r--include/floatformat.h9
-rw-r--r--include/hashtab.h90
-rw-r--r--include/libiberty.h271
-rw-r--r--include/md5.h25
-rw-r--r--include/objalloc.h8
-rw-r--r--include/obstack.h72
-rw-r--r--include/partition.h11
-rw-r--r--include/splay-tree.h69
-rw-r--r--include/ternary.h8
-rw-r--r--include/xregex2.h76
-rw-r--r--libcpp/ChangeLog5
-rw-r--r--libcpp/lex.c6
-rw-r--r--libcpp/po/ChangeLog4
-rw-r--r--libcpp/po/de.po29
-rw-r--r--libffi/ChangeLog5
-rw-r--r--libffi/src/powerpc/darwin.S22
-rw-r--r--libffi/src/powerpc/darwin_closure.S41
-rw-r--r--libgfortran/ChangeLog49
-rw-r--r--libgfortran/Makefile.am12
-rw-r--r--libgfortran/Makefile.in73
-rw-r--r--libgfortran/aclocal.m45
-rw-r--r--libgfortran/config.h.in33
-rwxr-xr-xlibgfortran/configure818
-rw-r--r--libgfortran/configure.ac4
-rw-r--r--libgfortran/io/format.c1
-rw-r--r--libgfortran/io/list_read.c12
-rw-r--r--libgfortran/io/open.c3
-rw-r--r--libgfortran/io/transfer.c2
-rw-r--r--libgfortran/io/write.c2
-rw-r--r--libiberty/ChangeLog307
-rw-r--r--libiberty/Makefile.in50
-rw-r--r--libiberty/_doprnt.c15
-rw-r--r--libiberty/alloca.c5
-rw-r--r--libiberty/argv.c28
-rw-r--r--libiberty/asprintf.c6
-rw-r--r--libiberty/atexit.c3
-rw-r--r--libiberty/basename.c3
-rw-r--r--libiberty/bcmp.c4
-rw-r--r--libiberty/bcopy.c4
-rw-r--r--libiberty/bsearch.c15
-rw-r--r--libiberty/bzero.c4
-rw-r--r--libiberty/calloc.c11
-rw-r--r--libiberty/choose-temp.c4
-rw-r--r--libiberty/clock.c2
-rw-r--r--libiberty/concat.c28
-rw-r--r--libiberty/config.in3
-rwxr-xr-xlibiberty/configure16
-rw-r--r--libiberty/configure.ac11
-rw-r--r--libiberty/copysign.c6
-rw-r--r--libiberty/cp-demangle.c486
-rw-r--r--libiberty/cp-demangle.h6
-rw-r--r--libiberty/cp-demint.c25
-rw-r--r--libiberty/cplus-dem.c489
-rw-r--r--libiberty/dyn-string.c74
-rw-r--r--libiberty/fdmatch.c4
-rw-r--r--libiberty/ffs.c3
-rw-r--r--libiberty/fibheap.c121
-rw-r--r--libiberty/floatformat.c74
-rw-r--r--libiberty/fnmatch.c5
-rw-r--r--libiberty/functions.texi294
-rw-r--r--libiberty/getcwd.c4
-rw-r--r--libiberty/getopt.c31
-rw-r--r--libiberty/getopt1.c20
-rw-r--r--libiberty/getpagesize.c4
-rw-r--r--libiberty/getpwd.c4
-rw-r--r--libiberty/getruntime.c2
-rw-r--r--libiberty/gettimeofday.c4
-rw-r--r--libiberty/hashtab.c148
-rw-r--r--libiberty/hex.c2
-rw-r--r--libiberty/index.c6
-rw-r--r--libiberty/insque.c7
-rw-r--r--libiberty/lbasename.c3
-rw-r--r--libiberty/lrealpath.c3
-rw-r--r--libiberty/make-relative-prefix.c23
-rw-r--r--libiberty/make-temp-file.c12
-rw-r--r--libiberty/md5.c30
-rw-r--r--libiberty/memchr.c9
-rw-r--r--libiberty/memcmp.c9
-rw-r--r--libiberty/memcpy.c7
-rw-r--r--libiberty/memmove.c7
-rw-r--r--libiberty/mempcpy.c13
-rw-r--r--libiberty/memset.c9
-rw-r--r--libiberty/mkstemps.c4
-rw-r--r--libiberty/objalloc.c17
-rw-r--r--libiberty/obstack.c135
-rw-r--r--libiberty/partition.c21
-rw-r--r--libiberty/pex-common.h84
-rw-r--r--libiberty/pex-djgpp.c284
-rw-r--r--libiberty/pex-msdos.c335
-rw-r--r--libiberty/pex-unix.c540
-rw-r--r--libiberty/pex-win32.c395
-rw-r--r--libiberty/pexecute.txh208
-rw-r--r--libiberty/physmem.c8
-rw-r--r--libiberty/putenv.c3
-rw-r--r--libiberty/random.c15
-rw-r--r--libiberty/regex.c461
-rw-r--r--libiberty/rename.c4
-rw-r--r--libiberty/rindex.c4
-rw-r--r--libiberty/safe-ctype.c3
-rw-r--r--libiberty/setenv.c8
-rw-r--r--libiberty/sigsetmask.c5
-rw-r--r--libiberty/snprintf.c9
-rw-r--r--libiberty/sort.c8
-rw-r--r--libiberty/spaces.c7
-rw-r--r--libiberty/splay-tree.c113
-rw-r--r--libiberty/stpcpy.c12
-rw-r--r--libiberty/stpncpy.c13
-rw-r--r--libiberty/strcasecmp.c7
-rw-r--r--libiberty/strchr.c4
-rw-r--r--libiberty/strdup.c13
-rw-r--r--libiberty/strerror.c17
-rw-r--r--libiberty/strncasecmp.c8
-rw-r--r--libiberty/strncmp.c8
-rw-r--r--libiberty/strrchr.c4
-rw-r--r--libiberty/strsignal.c27
-rw-r--r--libiberty/strstr.c3
-rw-r--r--libiberty/strtod.c6
-rw-r--r--libiberty/strtol.c5
-rw-r--r--libiberty/strtoul.c5
-rw-r--r--libiberty/ternary.c17
-rw-r--r--libiberty/testsuite/Makefile.in11
-rw-r--r--libiberty/tmpnam.c5
-rw-r--r--libiberty/unlink-if-ordinary.c7
-rw-r--r--libiberty/vasprintf.c25
-rw-r--r--libiberty/vfork.c4
-rw-r--r--libiberty/vfprintf.c9
-rw-r--r--libiberty/vprintf.c8
-rw-r--r--libiberty/vsnprintf.c18
-rw-r--r--libiberty/vsprintf.c9
-rw-r--r--libiberty/waitpid.c4
-rw-r--r--libiberty/xatexit.c17
-rw-r--r--libiberty/xexit.c5
-rw-r--r--libiberty/xmalloc.c29
-rw-r--r--libiberty/xmemdup.c12
-rw-r--r--libiberty/xstrdup.c10
-rw-r--r--libiberty/xstrerror.c11
-rw-r--r--libjava/ChangeLog207
-rw-r--r--libjava/Makefile.am273
-rw-r--r--libjava/Makefile.in2905
-rw-r--r--libjava/aclocal.m4460
-rw-r--r--libjava/boehm.cc6
-rwxr-xr-xlibjava/configure12
-rw-r--r--libjava/configure.ac12
-rw-r--r--libjava/external/Makefile.in24
-rw-r--r--libjava/external/sax/Makefile.am18
-rw-r--r--libjava/external/sax/Makefile.in305
-rw-r--r--libjava/external/sax/org/xml/sax/helpers/NamespaceSupport.java5
-rw-r--r--libjava/external/w3c_dom/Makefile.am18
-rw-r--r--libjava/external/w3c_dom/Makefile.in1083
-rw-r--r--libjava/gcj/Makefile.in4
-rw-r--r--libjava/gnu/gcj/runtime/VMClassLoader.java47
-rw-r--r--libjava/gnu/gcj/tools/gcj_dbtool/Main.java19
-rw-r--r--libjava/gnu/xml/aelfred2/JAXPFactory.java273
-rw-r--r--libjava/gnu/xml/aelfred2/SAXDriver.java2456
-rw-r--r--libjava/gnu/xml/aelfred2/XmlParser.java10240
-rw-r--r--libjava/gnu/xml/aelfred2/XmlReader.java515
-rw-r--r--libjava/gnu/xml/dom/DomNode.java13
-rw-r--r--libjava/include/Makefile.in4
-rw-r--r--libjava/include/jvm.h11
-rw-r--r--libjava/include/posix.h2
-rw-r--r--libjava/java/lang/VMClassLoader.java12
-rw-r--r--libjava/java/lang/ieeefp.h2
-rw-r--r--libjava/java/lang/natClass.cc20
-rw-r--r--libjava/java/lang/natClassLoader.cc36
-rw-r--r--libjava/java/lang/natRuntime.cc5
-rw-r--r--libjava/java/lang/natVMClassLoader.cc25
-rw-r--r--libjava/java/text/SimpleDateFormat.java12
-rw-r--r--libjava/java/util/Calendar.java6
-rw-r--r--libjava/java/util/GregorianCalendar.java45
-rw-r--r--libjava/prims.cc9
-rw-r--r--libjava/stacktrace.cc7
-rw-r--r--libjava/testsuite/Makefile.in4
-rw-r--r--libjava/testsuite/libjava.jni/jni.exp4
-rw-r--r--libstdc++-v3/ChangeLog76
-rw-r--r--libstdc++-v3/acconfig.h20
-rw-r--r--libstdc++-v3/acinclude.m4530
-rw-r--r--libstdc++-v3/config.h.in189
-rw-r--r--libstdc++-v3/config/locale/gnu/c++locale_internal.h16
-rw-r--r--libstdc++-v3/config/locale/gnu/c_locale.h6
-rwxr-xr-xlibstdc++-v3/configure13836
-rw-r--r--libstdc++-v3/configure.ac13
-rw-r--r--libstdc++-v3/crossconfig.m478
-rw-r--r--libstdc++-v3/docs/html/configopts.html15
-rw-r--r--libstdc++-v3/include/Makefile.am1
-rw-r--r--libstdc++-v3/include/Makefile.in1
-rw-r--r--libstdc++-v3/include/c_std/std_cstdio.h9
-rw-r--r--libstdc++-v3/include/c_std/std_cwctype.h12
-rw-r--r--libstdc++-v3/include/tr1/memory937
-rw-r--r--libstdc++-v3/src/debug.cc19
-rw-r--r--libstdc++-v3/testsuite/Makefile.am2
-rw-r--r--libstdc++-v3/testsuite/Makefile.in2
-rw-r--r--libstdc++-v3/testsuite/lib/libstdc++.exp139
-rw-r--r--libstdc++-v3/testsuite/libstdc++-dg/normal.exp67
-rw-r--r--libstdc++-v3/testsuite/tr1/2_general_utilities/memory/shared_ptr/cons/auto_ptr_neg.cc4
482 files changed, 22770 insertions, 33984 deletions
diff --git a/ChangeLog b/ChangeLog
index 31d76215d61..491379a4fb7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2005-03-29 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * MAINTAINERS (Various Maintainers): Remove self.
+ (Write After Approval): Add self.
+
+2005-03-26 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * MAINTAINERS (Various Maintainers): Add self.
+
+2005-03-25 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.in (RPATH_ENVVAR): Set to DYLD_LIBRARY_PATH on Darwin.
+ * configure: Regenerate.
+
2005-03-21 Zack Weinberg <zack@codesourcery.com>
* Makefile.def: Remove libstdcxx_incdir, libsubdir, gxx_include_dir,
diff --git a/MAINTAINERS b/MAINTAINERS
index 32579796fec..2e0b8db7da2 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -228,6 +228,7 @@ Mohan Embar gnustuff@thisiscool.com
Marc Espie espie@cvs.openbsd.org
Ansgar Esztermann ansgar@thphy.uni-duesseldorf.de
Doug Evans dje@transmeta.com
+Thomas Fitzsimmons fitzsim@redhat.com
Brian Ford ford@vss.fsi.com
Kaveh Ghazi ghazi@caip.rutgers.edu
Matthew Gingell gingell@gnat.com
diff --git a/boehm-gc/ChangeLog b/boehm-gc/ChangeLog
index 9b5852d4777..413c261311a 100644
--- a/boehm-gc/ChangeLog
+++ b/boehm-gc/ChangeLog
@@ -1,3 +1,9 @@
+2005-03-23 Mike Stump <mrs@apple.com>
+
+ * darwin_stop_world.c: Update for -m64 multilib.
+ * include/private/gcconfig.h: Likewise.
+ * powerpc_darwin_mach_dep.s: Likewise.
+
2005-03-01 Kelley Cook <kcook@gcc.gnu.org>
* Makefile.in, include/Makefile.in: Regenerate.
diff --git a/boehm-gc/darwin_stop_world.c b/boehm-gc/darwin_stop_world.c
index 36378cbbce0..2fad9474716 100644
--- a/boehm-gc/darwin_stop_world.c
+++ b/boehm-gc/darwin_stop_world.c
@@ -1,5 +1,7 @@
#include "private/pthread_support.h"
+/* This probably needs more porting work to ppc64. */
+
# if defined(GC_DARWIN_THREADS)
/* From "Inside Mac OS X - Mach-O Runtime Architecture" published by Apple
@@ -14,13 +16,12 @@
*/
#define PPC_RED_ZONE_SIZE 224
-/* Not 64-bit clean. Wait until Apple defines their 64-bit ABI */
typedef struct StackFrame {
- unsigned int savedSP;
- unsigned int savedCR;
- unsigned int savedLR;
- unsigned int reserved[2];
- unsigned int savedRTOC;
+ unsigned long savedSP;
+ unsigned long savedCR;
+ unsigned long savedLR;
+ unsigned long reserved[2];
+ unsigned long savedRTOC;
} StackFrame;
diff --git a/boehm-gc/include/private/gcconfig.h b/boehm-gc/include/private/gcconfig.h
index 64cbde22c30..fbabdedd772 100644
--- a/boehm-gc/include/private/gcconfig.h
+++ b/boehm-gc/include/private/gcconfig.h
@@ -277,8 +277,9 @@
# define MACOS
# define mach_type_known
# endif
-# if defined(macosx) || \
- defined(__APPLE__) && defined(__MACH__) && defined(__ppc__)
+# if defined(macosx) \
+ || defined(__APPLE__) && defined(__MACH__) && defined(__ppc__) \
+ || defined(__APPLE__) && defined(__MACH__) && defined(__ppc64__)
# define DARWIN
# define POWERPC
# define mach_type_known
@@ -756,7 +757,12 @@
# define DATAEND (_end)
# endif
# ifdef DARWIN
-# define ALIGNMENT 4
+# if (defined (__ppc64__))
+# define ALIGNMENT 8
+# define CPP_WORDSZ 64
+# else
+# define ALIGNMENT 4
+# endif
# define OS_TYPE "DARWIN"
# define DYNAMIC_LOADING
/* XXX: see get_end(3), get_etext() and get_end() should not be used.
diff --git a/boehm-gc/powerpc_darwin_mach_dep.s b/boehm-gc/powerpc_darwin_mach_dep.s
index 83f06cffca5..694005f416d 100644
--- a/boehm-gc/powerpc_darwin_mach_dep.s
+++ b/boehm-gc/powerpc_darwin_mach_dep.s
@@ -1,10 +1,21 @@
+#if defined(__ppc64__)
+#define MODE_CHOICE(x, y) y
+#else
+#define MODE_CHOICE(x, y) x
+#endif
+
+#define lgu MODE_CHOICE(lwzu, ldu)
+
+#define g_long MODE_CHOICE(long, quad) /* usage is ".g_long" */
+
+#define LOG2_GPR_BYTES MODE_CHOICE(2,3) /* log2(GPR_BYTES) */
; GC_push_regs function. Under some optimization levels GCC will clobber
; some of the non-volatile registers before we get a chance to save them
; therefore, this can't be inline asm.
.text
- .align 2
+ .align LOG2_GPR_BYTES
.globl _GC_push_regs
_GC_push_regs:
@@ -65,7 +76,7 @@ _GC_push_regs:
.data
.section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
- .align 2
+ .align LOG2_GPR_BYTES
L_GC_push_one$stub:
.indirect_symbol _GC_push_one
mflr r0
@@ -74,11 +85,11 @@ L0$_GC_push_one:
mflr r11
addis r11,r11,ha16(L_GC_push_one$lazy_ptr-L0$_GC_push_one)
mtlr r0
- lwzu r12,lo16(L_GC_push_one$lazy_ptr-L0$_GC_push_one)(r11)
+ lgu r12,lo16(L_GC_push_one$lazy_ptr-L0$_GC_push_one)(r11)
mtctr r12
bctr
.data
.lazy_symbol_pointer
L_GC_push_one$lazy_ptr:
.indirect_symbol _GC_push_one
- .long dyld_stub_binding_helper
+ .g_long dyld_stub_binding_helper
diff --git a/configure b/configure
index f332e9d1c06..115a66927d6 100755
--- a/configure
+++ b/configure
@@ -3047,6 +3047,7 @@ esac
case "${host}" in
*-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;;
+ *-*-darwin* | *-*-rhapsody* ) RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
*) RPATH_ENVVAR=LD_LIBRARY_PATH ;;
esac
@@ -3553,7 +3554,7 @@ test -n "$target_alias" && ncn_target_tool_prefix=$target_alias-
# Extract the first word of "${ncn_tool_prefix}ar", so it can be a program name with args.
set dummy ${ncn_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3557: checking for $ac_word" >&5
+echo "configure:3558: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3586,7 +3587,7 @@ if test -z "$ac_cv_prog_AR" ; then
# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3590: checking for $ac_word" >&5
+echo "configure:3591: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3625,7 +3626,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}as", so it can be a program name with args.
set dummy ${ncn_tool_prefix}as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3629: checking for $ac_word" >&5
+echo "configure:3630: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3658,7 +3659,7 @@ if test -z "$ac_cv_prog_AS" ; then
# Extract the first word of "as", so it can be a program name with args.
set dummy as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3662: checking for $ac_word" >&5
+echo "configure:3663: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3697,7 +3698,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}dlltool", so it can be a program name with args.
set dummy ${ncn_tool_prefix}dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3701: checking for $ac_word" >&5
+echo "configure:3702: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3730,7 +3731,7 @@ if test -z "$ac_cv_prog_DLLTOOL" ; then
# Extract the first word of "dlltool", so it can be a program name with args.
set dummy dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3734: checking for $ac_word" >&5
+echo "configure:3735: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_DLLTOOL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3769,7 +3770,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}ld", so it can be a program name with args.
set dummy ${ncn_tool_prefix}ld; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3773: checking for $ac_word" >&5
+echo "configure:3774: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3802,7 +3803,7 @@ if test -z "$ac_cv_prog_LD" ; then
# Extract the first word of "ld", so it can be a program name with args.
set dummy ld; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3806: checking for $ac_word" >&5
+echo "configure:3807: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3841,7 +3842,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}nm", so it can be a program name with args.
set dummy ${ncn_tool_prefix}nm; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3845: checking for $ac_word" >&5
+echo "configure:3846: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3874,7 +3875,7 @@ if test -z "$ac_cv_prog_NM" ; then
# Extract the first word of "nm", so it can be a program name with args.
set dummy nm; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3878: checking for $ac_word" >&5
+echo "configure:3879: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3913,7 +3914,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ncn_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3917: checking for $ac_word" >&5
+echo "configure:3918: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3946,7 +3947,7 @@ if test -z "$ac_cv_prog_RANLIB" ; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3950: checking for $ac_word" >&5
+echo "configure:3951: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3985,7 +3986,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}windres", so it can be a program name with args.
set dummy ${ncn_tool_prefix}windres; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3989: checking for $ac_word" >&5
+echo "configure:3990: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4018,7 +4019,7 @@ if test -z "$ac_cv_prog_WINDRES" ; then
# Extract the first word of "windres", so it can be a program name with args.
set dummy windres; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4022: checking for $ac_word" >&5
+echo "configure:4023: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_WINDRES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4057,7 +4058,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}objcopy", so it can be a program name with args.
set dummy ${ncn_tool_prefix}objcopy; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4061: checking for $ac_word" >&5
+echo "configure:4062: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4090,7 +4091,7 @@ if test -z "$ac_cv_prog_OBJCOPY" ; then
# Extract the first word of "objcopy", so it can be a program name with args.
set dummy objcopy; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4094: checking for $ac_word" >&5
+echo "configure:4095: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_OBJCOPY'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4129,7 +4130,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}objdump", so it can be a program name with args.
set dummy ${ncn_tool_prefix}objdump; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4133: checking for $ac_word" >&5
+echo "configure:4134: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4162,7 +4163,7 @@ if test -z "$ac_cv_prog_OBJDUMP" ; then
# Extract the first word of "objdump", so it can be a program name with args.
set dummy objdump; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4166: checking for $ac_word" >&5
+echo "configure:4167: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_OBJDUMP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4208,7 +4209,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}ar", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4212: checking for $ac_word" >&5
+echo "configure:4213: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_AR_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4241,7 +4242,7 @@ if test -z "$ac_cv_prog_CONFIGURED_AR_FOR_TARGET" ; then
# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4245: checking for $ac_word" >&5
+echo "configure:4246: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_AR_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4280,7 +4281,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}as", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4284: checking for $ac_word" >&5
+echo "configure:4285: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_AS_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4313,7 +4314,7 @@ if test -z "$ac_cv_prog_CONFIGURED_AS_FOR_TARGET" ; then
# Extract the first word of "as", so it can be a program name with args.
set dummy as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4317: checking for $ac_word" >&5
+echo "configure:4318: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_AS_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4352,7 +4353,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}dlltool", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4356: checking for $ac_word" >&5
+echo "configure:4357: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4385,7 +4386,7 @@ if test -z "$ac_cv_prog_CONFIGURED_DLLTOOL_FOR_TARGET" ; then
# Extract the first word of "dlltool", so it can be a program name with args.
set dummy dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4389: checking for $ac_word" >&5
+echo "configure:4390: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4424,7 +4425,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}ld", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}ld; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4428: checking for $ac_word" >&5
+echo "configure:4429: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_LD_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4457,7 +4458,7 @@ if test -z "$ac_cv_prog_CONFIGURED_LD_FOR_TARGET" ; then
# Extract the first word of "ld", so it can be a program name with args.
set dummy ld; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4461: checking for $ac_word" >&5
+echo "configure:4462: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_LD_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4496,7 +4497,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}nm", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}nm; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4500: checking for $ac_word" >&5
+echo "configure:4501: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_NM_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4529,7 +4530,7 @@ if test -z "$ac_cv_prog_CONFIGURED_NM_FOR_TARGET" ; then
# Extract the first word of "nm", so it can be a program name with args.
set dummy nm; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4533: checking for $ac_word" >&5
+echo "configure:4534: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_NM_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4568,7 +4569,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4572: checking for $ac_word" >&5
+echo "configure:4573: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_RANLIB_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4601,7 +4602,7 @@ if test -z "$ac_cv_prog_CONFIGURED_RANLIB_FOR_TARGET" ; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4605: checking for $ac_word" >&5
+echo "configure:4606: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_RANLIB_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4640,7 +4641,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}windres", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}windres; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4644: checking for $ac_word" >&5
+echo "configure:4645: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_WINDRES_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4673,7 +4674,7 @@ if test -z "$ac_cv_prog_CONFIGURED_WINDRES_FOR_TARGET" ; then
# Extract the first word of "windres", so it can be a program name with args.
set dummy windres; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4677: checking for $ac_word" >&5
+echo "configure:4678: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_WINDRES_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4758,7 +4759,7 @@ RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET}${extra_ranlibflags_for_target}
NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target}
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:4762: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:4763: checking whether to enable maintainer-specific portions of Makefiles" >&5
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode"
@@ -4805,7 +4806,7 @@ esac
# gcc for stageN-gcc and stagePREV-gcc for stage(N-1). In case this is not
# possible, however, we can resort to mv.
echo $ac_n "checking if symbolic links between directories work""... $ac_c" 1>&6
-echo "configure:4809: checking if symbolic links between directories work" >&5
+echo "configure:4810: checking if symbolic links between directories work" >&5
if eval "test \"`echo '$''{'gcc_cv_prog_ln_s_dir'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4939,34 +4940,15 @@ trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
# Transform confdefs.h into DEFS.
# Protect against shell expansion while executing Makefile rules.
# Protect against Makefile macro expansion.
-#
-# If the first sed substitution is executed (which looks for macros that
-# take arguments), then we branch to the quote section. Otherwise,
-# look for a macro that doesn't take arguments.
-cat >confdef2opt.sed <<\_ACEOF
-t clear
-: clear
-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
-t quote
-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
-t quote
-d
-: quote
-s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
-s,\[,\\&,g
-s,\],\\&,g
-s,\$,$$,g
-p
-_ACEOF
-# We use echo to avoid assuming a particular line-breaking character.
-# The extra dot is to prevent the shell from consuming trailing
-# line-breaks from the sub-command output. A line-break within
-# single-quotes doesn't work because, if this script is created in a
-# platform that uses two characters for line-breaks (e.g., DOS), tr
-# would break.
-ac_LF_and_DOT=`echo; echo .`
-DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
-rm -f confdef2opt.sed
+cat > conftest.defs <<\EOF
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
+s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
+s%\[%\\&%g
+s%\]%\\&%g
+s%\$%$$%g
+EOF
+DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
+rm -f conftest.defs
# Without the "./", some shells look in PATH for config.status.
diff --git a/configure.in b/configure.in
index 424346344c5..91c7191df09 100644
--- a/configure.in
+++ b/configure.in
@@ -1649,6 +1649,7 @@ esac
case "${host}" in
*-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;;
+ *-*-darwin* | *-*-rhapsody* ) RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
*) RPATH_ENVVAR=LD_LIBRARY_PATH ;;
esac
diff --git a/fastjar/ChangeLog b/fastjar/ChangeLog
index 2adedb2af45..bd3c4ca270b 100644
--- a/fastjar/ChangeLog
+++ b/fastjar/ChangeLog
@@ -1,3 +1,13 @@
+2005-03-28 Marcin Dalecki <martin@dalecki.de>
+
+ * jartool.c (main): Indentation fixlet.
+ (add_entry): Likewise.
+ (init_args): Don't use K&R style.
+ (jt_strdup): Likewise.
+ (get_next_arg): Add explicit '(void)'.
+ (init_headers): Likewise.
+ (version): Likewise.
+
2005-03-15 Zack Weinberg <zack@codesourcery.com>
* Makefile.am (fastjar_TEXINFOS): Add gcc-vers.texi.
diff --git a/fastjar/jartool.c b/fastjar/jartool.c
index 9431bb5e0a2..09f5dbcb787 100644
--- a/fastjar/jartool.c
+++ b/fastjar/jartool.c
@@ -1,6 +1,6 @@
/*
jartool.c - main functions for fastjar utility
- Copyright (C) 2002, 2004 Free Software Foundation
+ Copyright (C) 2002, 2004, 2005 Free Software Foundation
Copyright (C) 1999, 2000, 2001 Bryan Burns
This program is free software; you can redistribute it and/or
@@ -335,7 +335,8 @@ static const struct option options[] =
{ NULL, no_argument, NULL, 0 }
};
-int main(int argc, char **argv){
+int main(int argc, char **argv)
+{
char *mfile = NULL;
@@ -602,9 +603,7 @@ static int args_current_g;
static char **args_g;
static void
-init_args(args, current)
- char **args;
- int current;
+init_args(char **args, int current)
{
if(!read_names_from_stdin)
{
@@ -614,7 +613,7 @@ init_args(args, current)
}
static char *
-get_next_arg ()
+get_next_arg (void)
{
static int reached_end = 0;
@@ -674,7 +673,8 @@ get_next_arg ()
}
}
-void init_headers(){
+void init_headers(void)
+{
/* packing file header */
/* magic number */
file_header[0] = 0x50;
@@ -725,7 +725,8 @@ void init_headers(){
}
-void add_entry(struct zipentry *ze){
+void add_entry(struct zipentry *ze)
+{
if(ziplist == NULL){
ziplist = ze;
@@ -906,7 +907,8 @@ int read_entries (int fd)
return 0;
}
-int make_manifest(int jfd, const char *mf_name, int updating){
+int make_manifest(int jfd, const char *mf_name, int updating)
+{
time_t current_time;
int nlen; /* length of file name */
int mod_time; /* file modification time */
@@ -2212,7 +2214,7 @@ void usage(const char *filename){
exit (1);
}
-void version ()
+void version (void)
{
printf("jar (%s) %s\n\n", PACKAGE, VERSION);
printf("Copyright 1999, 2000, 2001 Bryan Burns\n");
@@ -2264,8 +2266,7 @@ Example 2: use an existing manifest file 'mymanifest' and archive all the\n\
}
static char *
-jt_strdup(s)
- char *s;
+jt_strdup(char *s)
{
char *result = (char*)malloc(strlen(s) + 1);
if (result == (char*)0)
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a308f2151ec..fbd8351723a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,628 @@
+2005-03-29 Richard Henderson <rth@redhat.com>
+
+ PR c/20519
+ * c-decl.c (c_finish_incomplete_decl): Update complete_array_type call.
+ (build_compound_literal): Likewise. Propagate decl type into the
+ initializer.
+ (finish_decl): Likewise. Use new return value from complete_array_type
+ for zero sized arrays.
+ (complete_array_type): Move ...
+ * c-common.c (complete_array_type): ... here. Change first argument
+ to pointer-to-type-node. Consistently use sizetype for the index
+ except for zero sized arrays. Detect zero sized arrays for pedantic
+ mode diagnostics. Create a new type node instead of modifying the
+ old node in place.
+ * c-tree.h (complete_array_type): Move decl ...
+ * c-common.h (complete_array_type): ... here.
+
+2005-03-29 Richard Henderson <rth@redhat.com>
+
+ PR tree-opt/19108
+ * tree-sra.c (generate_element_init_1): Handle RANGE_EXPR.
+
+2005-03-29 Kazu Hirata <kazu@cs.umass.edu>
+
+ * builtin-types.def, c-convert.c, c-format.c, ddg.c, debug.c,
+ debug.h, et-forest.c, et-forest.h, gcov.c, rtl-profile.c,
+ rtlhooks-def.h, rtlhooks.c, sdbout.c, tree-inline.h,
+ tree-profile.c, tsystem.h, value-prof.h: Update copyright.
+
+2005-03-29 Eric Christopher <echristo@redhat.com>
+
+ * config/mips/mips.c (mips_gimplify_va_arg_expr): Update for
+ truthvalue conversion removal.
+
+2005-03-29 Ian Lance Taylor <ian@airs.com>
+
+ PR bootstrap/14316
+ * collect2.c: Never include <vfork.h>.
+ (VFORK_STRING, vfork): Don't define.
+ (pid): Remove global variable.
+ (handler): Call raise instead of kill (getpid(), ...).
+ (collect_wait): Add pex parameter. Change all callers. Use
+ pex_get_status rather than pwait.
+ (do_wait): Add pex parameter. Change all callers.
+ (collect_execute): Return struct pex_obj * rather than void. Use
+ pex routines rather than pexecute.
+ (fork_execute): Get pex_obj from collect_execute, and pass it to
+ do_wait.
+ (scan_prog_file): Use pex routines rather than pipe/vfork/exec.
+ Only declare quit_handler if SIGQUIT is defined.
+ (scan_libraries): Likewise.
+ * collect2.h (collect_execute): Update declaration.
+ (collect_wait): Update declaration.
+ * tlink.c (tlink_execute): Get pex_obj from collect_execute, and
+ pass it to collect_wait.
+
+2005-03-29 Joseph S. Myers <joseph@codesourcery.com>
+
+ PR c/20672
+ * c-parser.c (c_parser_compound_statement_nostart): Give error
+ message for EOF instead of just setting parser->error.
+
+2005-03-29 Dorit Naishlos <dorit@il.ibm.com>
+
+ * tree-vectorizer.c (slpeel_update_phi_nodes_for_guard): Removed.
+ (slpeel_update_phi_nodes_for_guard1): New function.
+ (slpeel_update_phi_nodes_for_guard2): New function.
+ (slpeel_tree_peel_loop_to_edge): Call above new functions instead
+ of slpeel_update_phi_nodes_for_guard.
+ (vectorize_loops): Remove call to loop_closed_rewrite.
+ * tree-vect-transform.c (vect_update_ivs_after_vectorizer): Remove
+ assertion.
+
+2005-03-29 Richard Sandiford <rsandifo@redhat.com>
+
+ * config/m32r/little.h (TARGET_ENDIAN_DEFAULT): Delete.
+ (TARGET_LITTLE_ENDIAN): New macro.
+ * config/m32r/m32r.h (SUBTARGET_SWITCHES, target_flags)
+ (TARGET_RELAX_MASK, TARGET_DEBUG_MASK, TARGET_DEBUG)
+ (TARGET_ALIGN_LOOPS_MASK, TARGET_ALIGN_LOOPS)
+ (TARGET_LOW_ISSUE_RATE_MASK, TARGET_LOW_ISSUE_RATE)
+ (TARGET_BRANCH_COST_MASK, TARGET_BRANCH_COST, TARGET_M32RX_MASK)
+ (TARGET_M32RX, TARGET_M32R2_MASK, TARGET_M32R2, LITTLE_ENDIAN_BIT)
+ (TARGET_ENDIAN_DEFAULT, SUBTARGET_SWITCHES, TARGET_DEFAULT)
+ (TARGET_SWITCHES, m32r_model_string, m32r_sdata_string)
+ (m32r_cache_flush_trap_string, SUBTARGET_OPTIONS)
+ (TARGET_OPTIONS): Delete.
+ (M32R_MODEL_DEFAULT, M32R_SDATA_DEFAULT): Turn into enums.
+ (CACHE_FLUSH_TRAP): Turn into an integer.
+ (TARGET_LITTLE_ENDIAN): Define to 0 by default.
+ (INITIALIZE_TRAMPOLINE): Check m32r_cache_trap >= 0 to see if
+ -mflush-trap is in use.
+ * config/m32r/m32r.c (m32r_model_string, m32r_sdata_string)
+ (m32r_cache_flush_trap_string): Delete.
+ (m32r_model) Initialize to M32R_MODEL_DEFAULT.
+ (m32r_sdata): Likewise M32R_SDATA_DEFAULT.
+ (m32r_cache_trap): Likewise CACHE_FLUSH_TRAP.
+ (TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION): Override defaults.
+ (m32r_handle_option): New function. Move -mflush-trap=, -mflush-func=,
+ -mmodel= and -msdata= handling from...
+ (m32r_init): ...here.
+ * config/m32r/m32r.opt: New file.
+
+2005-03-29 Keith Besaw <kbesaw@us.ibm.com>
+
+ * tree-ssanames.c (duplicate_ssa_name_ptr_info): New function.
+ (duplicate_ssa_name): Call duplicate_ssa_name_ptr_info.
+ * tree-vect-analyze.c (vect_object_analysis): additional parm
+ pass back a "struct ptr_info_def *" with the points-to info.
+ (vect_analyze_data_refs): set the STMT_VINFO_PTR_INFO for the
+ statement using info returned from vect_object_analysis.
+ * tree-vect-transform.c (update_vuses_to_preheader): New function.
+ (vect_create_data_ref_ptr): Remove updates to vars_to_rename
+ for virtual uses and defs when creating a replacement vector
+ reference. Call duplicate_ssa_name_ptr_info to define points-to
+ info for vector pointer replacement using STMT_VINFO_PTR_INFO.
+ (vectorizable_store): copy_virtual_operands and update
+ definition statements.
+ (vectorizable_load): copy_virtual_operands. Remove call to
+ mark_call_clobbered_vars_to_rename for call to "const" builtin.
+ * tree-vectorizer.c (vectorize_loops): Remove calls to
+ rewrite_into_ssa and bitmap_clear (vars_to_rename).
+ (new_stmt_vec_info): initialize STMT_VINFO_PTR_INFO for stmt.
+ * tree-vectorizer.h (_stmt_vec_info): add field ptr_info and
+ define macro STMT_VINFO_PTR_INFO for use in accessing.
+ * tree.h add export of duplicate_ssa_name_ptr_info.
+ * rs6000.c (altivec_init_builtins): Declare builtin function
+ __builtin_altivec_mask_for_load to be "const".
+
+2005-03-29 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/20622
+ * cgraph.h (struct cgraph_varpool_node): Add alias field.
+ * cgraph.c (cgraph_varpool_assemble_pending_decls): Don't call
+ assemble_variable on aliases.
+ * varasm.c (assemble_alias): Set node->alias.
+ * toplev.c (wrapup_global_declarations): Don't call
+ rest_of_decl_compilation on aliases again.
+
+2005-03-29 Paul Brook <paul@codesourcery.com>
+
+ * config/arm/arm-protos.h (arm_dbx_register_number): Add prototype.
+ * config/arm/arm.c (arm_dbx_register_number): New function.
+ * config/arm/arm.h (IS_FPA_REGNUM, DBX_REGISTER_NUMBER): Define.
+
+2005-03-29 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ PR middle-end/20263
+ * varasm.c (make_decl_rtl) [ASM_DECLARE_REGISTER_GLOBAL]: Use
+ the DECL_NAME, not the DECL_ASSEMBLER_NAME.
+
+2005-03-29 Dale Johannesen <dalej@apple.com>
+
+ * Makefile.in (value-prof.o): New dependencies on $(DIAGNOSTIC_H)
+ $(TREE_H) and $(COVERAGE_H).
+ * coverage.c (compute_checksum): Use DECL_NAME not DECL_ASSEMBLER_NAME.
+ * opts.c (common_handle_option): Enable tree-based value transforms.
+ * toplev.c (process_options): Ditto.
+ * value-prof.h (struct histogram_value_t): Redefine. "Adjust" below
+ refers to references to this type.
+ * tree-flow.h: (struct stmt_ann_d): Add histograms field.
+ * rtl-profile.c (rtl_gen_interval_profiler): Adjust. Remove checks
+ for may_be_more, may_be_less.
+ (rtl_gen_pow2_profiler): Adjust.
+ (rtl_gen_one_value_profiler_no_edge_manip): Adjust.
+ (rtl_gen_one_value_profiler): Adjust.
+ (rtl_gen_const_delta_profiler): Adjust.
+ * tree-profile.c (tree_gen_interval_profiler): Implement.
+ (tree_gen_pow2_profiler): Ditto.
+ (tree_gen_one_value_profiler): Ditto.
+ (tree_profiling): New.
+ (pass_tree_profile): Reference it.
+ * value-prof.c: Include tree-flow.h, tree-flow-inline.h, diagnostic.h,
+ tree.h, gcov-io.h.
+ (insn_divmod_values_to_profile): Rename to
+ rtl_divmod_values_to_profile. Adjust.
+ (insn_values_to_profile): Rename to rtl_values_to_profile. Adjust.
+ (insn_prefetch_values_to_profile): Adjust.
+ (rtl_value_profile_transformations): Adjust.
+ (gen_divmod_fixed_value): Rename to rtl_divmod_fixed_value.
+ (gen_mod_pow2): Rename to rtl_mod_pow2.
+ (gen_mod_subtract): Rename to rtl_mod_subtract.
+ (divmod_fixed_value_transform): Rename to
+ rtl_divmod_fixed_value_transform.
+ (mod_pow2_value_transform): Rename to rtl_mod_pow2_value_transform.
+ (mod_subtract_transform): Rename to rtl_mod_subtract_transform.
+ (rtl_find_values_to_profile): Adjust.
+ (tree_value_profile_transformations): Implement.
+ (tree_divmod_values_to_profile): New.
+ (tree_values_to_profile): New.
+ (tree_divmod_fixed_value): New.
+ (tree_mod_pow2): New.
+ (tree_mod_subtract): New.
+ (tree_divmod_fixed_value_transform): New.
+ (tree_mod_pow2_value_transform): New.
+ (tree_mod_subtract_transform): New.
+ (tree_find_values_to_profile): Implement.
+ * profile.c (instrument_values): Free histograms.
+ (compute_value_histograms): Adjust. Implement tree version.
+
+2005-03-29 Uros Bizjak <uros@kss-loka.si>
+
+ * reg-stack.c (subst_stack_regs_pat): Handle <UNSPEC_FIST> case.
+ * config/i386/i386.c (output_fix_trunc): Add new round_mode
+ variable. Output "fldcw" depending on round_mode.
+ * config/i386/i386.md (UNSPEC_FIST): New.
+ (fistdi2, fistdi2_with_temp, fist<mode>2, fist<mode>2_with_temp):
+ New isns patterns to implement lrint and llrint built-ins as x87
+ intrinsic function.
+ (fistdi2, fist<mode>2 splitters): New splitters.
+ (lrint<mode>2): New expanders.
+
+2005-03-28 Ian Lance Taylor <ian@airs.com>
+
+ * config/arc/arc.c (arc_output_function_epilogue): Pass prescan as
+ 0 when calling final_scan_insn.
+
+2005-03-28 Jan Hubicka <jh@suse.cz>
+
+ PR middle-end/20635
+ * varasm.c (mark_decl_referenced): Do not mark extern inline functions
+ as needed.
+
+ * tree-inline.c (estimate_num_insns_1): Use declaration to discover argument
+ types where possible.
+
+2005-03-26 Per Bothner <per@bothner.com>
+
+ Make -f[no-]show-column also control non-cpp diagnostics.
+ * c.opt (fshow-column): Move option from here ...
+ * common.opt (fshow-column): ... to here.
+ * diagnostic.c (diagnostic_build_prefix): Only print column number
+ if flag_show_column.
+
+2005-03-27 Steven Bosscher <stevenb@suse.de>
+
+ * vax-protos.h (vax_output_int_move, vax_output_int_add,
+ vax_output_conditional_branch): New prototypes.
+ * vax.c (vax_output_int_move, vax_output_int_add): New functions,
+ extracted from vax.md mov and add patterns.
+ (vax_output_conditional_branch): New function to output conditional
+ branch instructions.
+ * vax.md: Use mode macros for arithmetic and mov patterns.
+ Use code macros for the jump patterns.
+
+2005-03-26 Andrew Pinski <pinskia@physics.uc.edu>
+
+ * Makefile.in (libbackend.o): Depend on version files;
+ add custom generation command.
+
+2005-03-26 Andrew Pinski <pinskia@physics.uc.edu>
+
+ PR target/20636
+ * config/rs6000/rs6000.md (extendsfdf2_fpr): Check to make
+ sure that we have a REG before getting its REGNO.
+
+2005-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * builtin-types.def (BT_FN_STRING_CONST_STRING_SIZE): New.
+ * builtins.def (BUILT_IN_STRNDUP): New.
+
+2005-03-25 Pat Haugen <pthaugen@us.ibm.com>
+
+ PR tree-optimization/20470
+ * fold-const.c (fold_cond_expr_with_comparison): Recognize/fold
+ ABS(x-y).
+
+2005-03-25 Mike Stump <mrs@apple.com>
+
+ * config/darwin.h (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Don't allow 0
+ sized objects.
+
+2005-03-25 Geoffrey Keating <geoffk@apple.com>
+
+ * config/rs6000/darwin-fallback.c: Don't include <ucontext.h>.
+ Use our own structure definitions.
+
+ * config/rs6000/rs6000.md (UNSPEC constants): Add UNSPEC_STFIWX.
+ (fix_truncdfsi2): Allow registers or memory as destination.
+ When TARGET_PPC_GFXOPT, generate simplified pattern.
+ (fix_truncdfsi2_internal): Use define_insn_and_split.
+ (fix_truncdfsi2_internal_gfxopt): New.
+ (fctiwz): Don't confuse register allocation by giving it no choices.
+ (stfiwx): New.
+ * config/rs6000/rs6000.h (EXTRA_CONSTRAINT): Add 'Z'.
+ (EXTRA_MEMORY_CONSTRAINT): Likewise.
+ * config/rs6000/rs6000.c (indexed_or_indirect_operand): New.
+ * config/rs6000/rs6000-protos.h (indexed_or_indirect_operand): New.
+
+2005-03-25 Kazu Hirata <kazu@cs.umass.edu>
+
+ * dominance.c (free_dominance_info): Speed up by freeing et
+ data structures without maintaining other nodes.
+ * et-forest.c (et_free_tree_force): New.
+ * et-forest.h: Add a prototype for et_free_tree_force.
+
+ * tree.c (get_set_constructor_bits,
+ get_set_constructor_bytes): Remove.
+ * tree.h: Remove the corresponding prototypes.
+
+2005-03-25 John David Anglin <dave.anglin@nrc-crnc.gc.ca>
+
+ PR target/15491
+ * vax.c (vax_rtx_costs_1): Merge with vax_rtx_costs.
+ (vax_rtx_costs): Return false when passed unsupported rtx's. Handle
+ FLOAT_EXTEND, FLOAT_TRUNCATE and TRUNCATE. Fix costs for POST_INC,
+ PRE_DEC, NEG and NOT.
+
+2005-03-25 Kazu Hirata <kazu@cs.umass.edu>
+
+ * fold-const.c: Convert uses of fold (build (...)) to
+ fold_buildN.
+
+2005-03-25 Zdenek Dvorak <dvorakz@suse.cz>
+
+ PR rtl-optimization/20249
+ * cse.c (insert_regs): Do not record equivalence of registers in
+ different modes.
+
+2005-03-24 Kazu Hirata <kazu@cs.umass.edu>
+
+ * emit-rtl.c (reverse_comparison): Remove.
+ * rtl.h: Remove the corresponding prototype.
+
+2005-03-24 James E Wilson <wilson@specifixinc.com>
+
+ * doc/install.texi (--enable-altivec): Delete docs.
+
+2005-03-24 David Edelsohn <edelsohn@gnu.org>
+
+ * config/rs6000/predicates.md (easy_fp_constant): Return 0 for
+ SFmode and DFmode before reload when
+ flag_unsafe_math_optimizations not enabled.
+
+2005-03-24 Geoffrey Keating <geoffk@apple.com>
+
+ * c.opt (fvisibility-inlines-hidden): Allow for ObjC++.
+
+ * config/i386/darwin.h (TARGET_SUBTARGET_DEFAULT): Add
+ MASK_128BIT_LONG_DOUBLE, MASK_ALIGN_DOUBLE.
+
+2005-03-24 Nathan Sidwell <nathan@codesourcery.com>
+
+ * configure.ac (enable-checking): Add 'runtime' option.
+ * doc/install.texi (enable-checking): Document 'runtime' checking.
+ * tsystem.h (gcc_assert, gcc_unreachable): Define.
+ * config.in: Regenerated.
+ * configure: Regenerated.
+
+2005-03-23 Uros Bizjak <uros@kss-loka.si>
+
+ * optabs.h (enum optab_index): Remove OTI_llrint.
+ (llrint_optab): Remove macro.
+ * optabs.c (init_optabs): Remove llrint_optab initialization.
+ * genopinit.c (optabs): Remove llrint_optab implementation.
+ * builtins.c (expand_builtin_mathfn): Handle BUILT_IN_LLRINT{,F,L}
+ using lrint_optab.
+
+2005-03-24 Alexandre Oliva <aoliva@redhat.com>
+
+ PR rtl-optimization/20532
+ * simplify-rtx.c (simplify_binary_operation_1): Protect from
+ overflow when adding coefficients for PLUS or MINUS.
+ (simplify_binary_operation_1): Handle CONST_DOUBLE exact power of
+ two as multiplier.
+
+2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
+
+ * langhooks.h (truthvalue_conversion): Remove.
+ * langhooks-def.h (LANG_HOOKS_INITIALIZER): Remove
+ LANG_HOOKS_TRUTHVALUE_CONVERSION.
+ * system.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Poison.
+ * gimplify.c (gimple_boolify): Don't use truthvalue_conversion.
+ * c-objc-common.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
+
+2005-03-23 Kazu Hirata <kazu@cs.umass.edu>
+
+ * params.def: Fix a typo.
+ * config/mips/mips.c: Follow the spelling convensions.
+ * doc/invoke.texi: Fix typos.
+
+2005-03-18 Dale Johannese <dalej@apple.com>
+
+ * cp/tree.c (cp_tree_equal): Handle SSA_NAME.
+
+2005-03-23 Daniel Berlin <dberlin@dberlin.org>
+
+ Fix PR tree-optimization/20601
+
+ * tree-ssa-pre.c (insert_aux): Add missing condition to
+ constification.
+
+2005-03-23 Ian Lance Taylor <ian@airs.com>
+
+ * final.c (final_scan_insn): Don't remove no-op instructions.
+ * reload1.c (reload): Remove simple no-op instructions even when
+ not optimizing.
+
+2005-03-23 Dorit Naishlos <dorit@il.ib.com>
+
+ PR tree-optimization/20501
+ * tree-vect-analyze.c (vect_enhance_data_refs_alignment): Debug print
+ reporting that peeling for alignment is applied moved to...
+ * (vect_analyze_data_refs_alignment): Here.
+
+2005-03-23 Ian Lance Taylor <ian@airs.com>
+
+ * reorg.c (dbr_schedule): Remove #if 0 code to call final.
+
+2005-03-23 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * config.gcc (alpha*-dec-osf[45]*): Remove target_cpu_default.
+ Define TARGET_SUPPORT_ARCH except on Tru64 UNIX V4.0A.
+
+2005-03-23 Hans-Peter Nilsson <hp@axis.com>
+
+ * doc/tm.texi (TARGET_MD_ASM_CLOBBERS): Adjust wording to not
+ imply that this is called once, independent of asms in code.
+ Adjust to now being pased output and input lists. Mention helper
+ function decl_overlaps_hard_reg_set_p.
+ * hooks.c (hook_tree_tree_tree_tree_3rd_identity): Rename from
+ hook_tree_tree_identity and to take three trees, returning third.
+ * hooks.h (hook_tree_tree_tree_tree_3rd_identity): Adjust the
+ prototype.
+ * stmt.c: include hard-reg-set.h before tree.h.
+ (decl_overlaps_hard_reg_set_p): New function, broken out from...
+ (decl_conflicts_with_clobbers_p): Call
+ decl_overlaps_hard_reg_set_p.
+ (expand_asm_operands): Pass output and input lists in call to
+ targetm.md_asm_clobbers.
+ * target-def.h (TARGET_MD_ASM_CLOBBERS): Define as
+ hook_tree_tree_tree_tree_3rd_identity.
+ * target.h (struct gcc_target.md_asm_clobbers): Take three tree
+ parameters.
+ * tree.h [HARD_CONST] (decl_overlaps_hard_reg_set_p): Prototype.
+ * config/i386/i386.c (ix86_md_asm_clobbers): Adjust to three
+ parameters, first two unused.
+ * config/cris/cris.c (cris_md_asm_clobbers): Adjust to added
+ parameters. Only add MOF to clobbers if there's no 'h' mentioned
+ in constraint letters and MOF is not mentioned as a asm-declared
+ register in neither of the input and output lists.
+
+2005-03-23 DJ Delorie <dj@redhat.com>
+
+ * optabs.c (expand_binop): Make sure the first subword's result
+ gets stored.
+
+2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
+
+ * c-common.c (c_common_truthvalue_conversion): Adjust comment.
+ Call c_common_truthvalue_conversion rather than
+ lang_hooks.truthvalue_conversion.
+ * c-convert.c (convert): Call c_objc_common_truthvalue_conversion.
+ * c-objc-common.c (c_objc_common_truthvalue_conversion): Move to
+ c-typeck.c.
+ * c-objc-common.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Change to
+ c_common_truthvalue_conversion.
+ * c-parser.c (c_parser_paren_condition, c_parser_for_statement,
+ c_parser_conditional_expression, c_parser_binary_expression): Call
+ c_objc_common_truthvalue_conversion.
+ * c-typeck.c (build_unary_op): Call
+ c_objc_common_truthvalue_conversion.
+ (build_conditional_expr): Do not call
+ lang_hooks.truthvalue_conversion.
+ (build_binary_op): Call c_common_truthvalue_conversion.
+ (c_objc_common_truthvalue_conversion): Moved from
+ c-objc-common.c. Call default_function_array_conversion instead
+ of default_conversion.
+
+2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
+
+ * c-common.h (default_conversion): Remove.
+ (perform_integral_promotions): Add.
+ * c-tree.h (default_conversion): Add.
+ * c-typeck.c (perform_integral_promotions): New, split out from
+ default_conversion.
+ * c-common.c (check_case_value): Use perform_integral_promotions,
+ not default_conversion.
+ (c_add_case_label): Don't continue processing case label after
+ found to be pointer.
+
+2005-03-23 Mark Mitchell <mark@codesourcery.com>
+
+ * gcc.c (do_spec_1): Do not add a -L path for a directory in
+ the prefix list if we have already added a multilib directory
+ based on that path.
+ (main): Do not add MD_EXEC_PREFIX to the list of directories to
+ search with -L.
+
+2005-03-22 Kazu Hirata <kazu@cs.umass.edu>
+
+ * reload1.c (indirect_symref_ok, reload_obstack): Make them
+ static.
+ * reload.h: Remove the prototype for indirect_symref_ok.
+
+ * reload1.c (indirect_symref_ok): Make it global.
+ * reload.h: Add a prototype for indirect_symref_ok.
+
+2005-03-22 Kaz Kojima <kkojima@gcc.gnu.org>
+
+ * config/sh/sh.md (ashlhi3): Rename to *ashlhi3_n and add a new
+ ashlhi3 expander.
+
+2005-03-22 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
+
+ * tree.h (DECL_IGNORED_P, DECL_IN_SYSTEM_HEADER): Clarify comments.
+
+2005-03-22 Daniel Berlin <dberlin@dberlin.org>
+
+ * c-opts.c (c_common_parse_file): Only start/end main source file
+ if debug hooks says the writer wants it.
+ * dbxout.c (dbx_debug_hooks): Add start_end_main_source_file
+ member.
+ (xcoff_debug_hooks): Ditto.
+ * debug.c (do_nothing_hooks): Ditto.
+ * debug.h (gcc_debug_hooks): Ditto.
+ * dwarf2out.c (dwarf2_debug_hooks): Ditto.
+ * sdbout.c (sdb_debug_hooks): Ditto.
+ * vmsdbgout.c (vmsdbg_debug_hooks): Ditto.
+
+2005-03-22 Mark Mitchell <mark@codesourcery.com>
+
+ * doc/extend.texi: Deprecate C++ min/max operators.
+
+2005-03-22 Zdenek Dvorak <dvorakz@suse.cz>
+
+ * tree-ssa-loop-ivopts.c (determine_iv_cost): Do not try to preserve
+ artificial original candidates.
+
+2005-03-22 Richard Guenther <rguenth@tat.physik.uni-tuebingen.de>
+ Jan Hubicka <jh@suse.cz>
+ Steven Bosscher <stevenb@suse.de>
+
+ * cgraphunit.c (cgraph_estimate_size_after_inlining): Compute
+ call cost based on argument sizes.
+ (cgraph_mark_inline_edge): Avoid inline unit from shrinking by
+ inlining.
+ * params.def: (max-inline-inssn-single): Set to 450.
+ (max-inline-insns-auto): Set to 90.
+ (max-inline-insns-recursive): Set to 450
+ (max-inline-insns-recursive-auto): Set to 450.
+ (large-function-insns): Set to 2700.
+ (inline-call-cost): New parameter.
+ * tree-inline.c (estimate_move_cost): New function.
+ (estimate_num_insns_1): Compute move sizes costs by estimate_move_cost
+ for non-gimple-regs, set cost to 0 for gimple-regs. Compute call size
+ based on arguments.
+ * tree-inline.h (estimate_move_cost): Declare.
+ * invoke.texi: (max-inline-inssn-single): Change default to 450.
+ (max-inline-insns-auto): Change default to 90.
+ (max-inline-insns-recursive): Change default to 450
+ (max-inline-insns-recursive-auto): Change default to 450.
+ (large-function-insns): Change default to 2700.
+ (inline-call-cost): Document new parameter.
+
+2005-03-22 Richard Sandiford <rsandifo@redhat.com>
+
+ * config/i860/i860.h (target_flags, TARGET_XP, TARGET_SWITCHES)
+ (TARGET_DEFAULT): Delete.
+ * config/i860/i860.opt: New file.
+
+2005-03-22 Richard Sandiford <rsandifo@redhat.com>
+
+ * config/frv/frv-protos.h (frv_branch_cost_string, frv_branch_cost_int)
+ (frv_cpu_string, frv_condexec_insns_str, frv_condexec_insns)
+ (frv_condexec_temps_str, frv_condexec_temps, frv_sched_lookahead_str)
+ (frv_sched_lookahead): Delete.
+ * config/frv/frv.h (MASK_DEFAULT_ALLOC_CC): Move to frv.c.
+ (target_flags, MASK_GPR_32, MASK_FPR_32, MASK_SOFT_FLOAT)
+ (MASK_ALLOC_CC, MASK_DWORD, MASK_DOUBLE, MASK_MEDIA, MASK_MULADD)
+ (MASK_LIBPIC, MASK_ACC_4, MASK_PACK, MASK_LONG_CALLS)
+ (MASK_ALIGN_LABELS, MASK_LINKED_FP, MASK_BIG_TLS, MASK_DEBUG_ARG)
+ (MASK_DEBUG_ADDR, MASK_DEBUG_STACK, MASK_DEBUG, MASK_DEBUG_LOC)
+ (MASK_DEBUG_COND_EXEC, MASK_NO_COND_MOVE, MASK_NO_SCC)
+ (MASK_NO_COND_EXEC, MASK_NO_VLIW_BRANCH, MASK_NO_MULTI_CE)
+ (MASK_FDPIC, MASK_INLINE_PLT, MASK_GPREL_RO, MASK_DEFAULT)
+ (TARGET_GPR_32, TARGET_FPR_32, TARGET_SOFT_FLOAT, TARGET_ALLOC_CC)
+ (TARGET_DWORD, TARGET_DOUBLE, TARGET_MEDIA, TARGET_MULADD)
+ (TARGET_LIBPIC, TARGET_ACC_4, TARGET_DEBUG_ARG, TARGET_DEBUG_ADDR)
+ (TARGET_DEBUG_STACK, TARGET_DEBUG, TARGET_DEBUG_LOC)
+ (TARGET_DEBUG_COND_EXEC, TARGET_NO_COND_MOVE, TARGET_NO_SCC)
+ (TARGET_NO_COND_EXEC, TARGET_NO_VLIW_BRANCH, TARGET_NO_MULTI_CE)
+ (TARGET_NO_NESTED_CE, TARGET_FDPIC, TARGET_INLINE_PLT, TARGET_BIG_TLS)
+ (TARGET_GPREL_RO, TARGET_PACK, TARGET_LONG_CALLS, TARGET_ALIGN_LABELS)
+ (TARGET_LINKED_FP, TARGET_GPR_64, TARGET_FPR_64, TARGET_HARD_FLOAT)
+ (TARGET_FIXED_CC, TARGET_COND_MOVE, TARGET_SCC, TARGET_COND_EXEC)
+ (TARGET_VLIW_BRANCH, TARGET_MULTI_CE, TARGET_NESTED_CE, TARGET_ACC_8)
+ (TARGET_SWITCHES, TARGET_OPTIONS, DEFAULT_CONDEXEC_TEMPS)
+ (DEFAULT_BRANCH_COST, DEFAULT_CONDEXEC_INSNS): Delete.
+ * config/frv/frv.c (frv_branch_cost_string, frv_branch_cost_int)
+ (frv_cpu_string, frv_condexec_insns_str, frv_condexec_insns)
+ (frv_condexec_temps_str, frv_condexec_temps, frv_sched_lookahead_str)
+ (frv_sched_lookahead): Delete.
+ (MASK_DEFAULT_ALLOC_CC): Moved from frv.h.
+ (TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION): Override defaults.
+ (frv_handle_option): New function. Move -mcpu= handling from...
+ (frv_override_options): ...here. Remove handling of other
+ TARGET_OPTIONS.
+ (frv_ifcvt_modify_tests): Check !TARGET_COND_EXEC instead of
+ TARGET_NO_COND_EXEC and !TARGET_NESTED_CE to TARGET_NO_NESTED_CE.
+ (frv_ifcvt_modify_multiple_tests): Likewise !TARGET_MULTI_CE
+ and TARGET_NO_MULTI_CE.
+ (frv_for_each_packet): Likewise TARGET_NO_VLIW_BRANCH and
+ !TARGET_VLIW_BRANCH.
+ * config/frv/frv.opt: New file.
+
+2005-03-22 Kazu Hirata <kazu@cs.umass.edu>
+
+ * fold-const.c (fold_ternary): Take decomposed arguments of
+ CALL_EXPR.
+ (fold): Update a call to fold_ternary.
+
+ * fold-const.c (fold_build1, fold_build2, fold_build3): New.
+ * tree.h: Add corresponding prototypes.
+
+2005-03-22 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/20561
+ * cfglayout.c (reemit_insn_block_notes): Don't put block notes in
+ between jump table and its label.
+ * final.c (shorten_branches): Handle notes in between ADDR_VEC
+ resp. ADDR_DIFF_VEC and the label preceeding it.
+ (final_scan_insn): Likewise. Ensure ADDR_VEC resp. ADDR_DIFF_VEC
+ is emitted in the right section.
+
2005-03-22 Kazu Hirata <kazu@cs.umass.edu>
* fold-const.c (fold_unary, fold_binary): Update comments
diff --git a/gcc/ChangeLog.tcb b/gcc/ChangeLog.tcb
index 0776b820b04..32c1f2e9082 100644
--- a/gcc/ChangeLog.tcb
+++ b/gcc/ChangeLog.tcb
@@ -1,3 +1,41 @@
+2005-04-01 Diego Novillo <dnovillo@redhat.com>
+
+ Merge from mainline (tree-cleanup-merge-20050329).
+
+2005-04-01 Diego Novillo <dnovillo@redhat.com>
+
+ * tree-flow.h (expr_computes_nonzero): Declare.
+ * tree-ssa-dom.c (record_equivalences_from_stmt): Call it.
+ * tree-vrp.c (expr_computes_nonzero): Rename from
+ expr_computes_nonnull. Update all users.
+ Honor -fdelete-null-pointer-checks.
+ Do not assume that &PTR->FIELD yields non-NULL.
+ (infer_value_range): Honor -fdelete-null-pointer-checks.
+
+2005-03-31 Diego Novillo <dnovillo@redhat.com>
+
+ * tree-flow.h (delete_update_ssa): Declare extern.
+ (ssa_names_to_replace): Declare.
+ * tree-into-ssa.c (block_defs_stack): Update documentation.
+ (old_virtual_ssa_names): New local variable.
+ (add_new_name_mapping): If OLD is a virtual SSA name, add it
+ to OLD_VIRTUAL_SSA_NAMES.
+ Set NEED_TO_UPDATE_VOPS_P if necessary.
+ (mark_def_interesting): Only accept DECLs if they are
+ virtuals.
+ (mark_use_interesting): Likewise.
+ (prepare_def_site_for): Change first argument type to 'tree'.
+ (dump_names_replaced_by): Don't handle virtual names.
+ (dump_repl_tbl): Show contents of OLD_VIRTUAL_SSA_NAMES.
+ (delete_update_ssa): Make extern.
+ (mark_sym_for_renaming): Set NEED_TO_UPDATE_VOPS_P.
+ (mark_set_for_renaming): Likewise.
+ (ssa_names_to_replace): New function.
+ (update_ssa): Only compute dominance frontiers if INSERT_PHI_P
+ is true.
+ Check for a non-empty SYMS_TO_RENAME when computing the start
+ of the region to update.
+
2005-03-26 Diego Novillo <dnovillo@redhat.com>
* tree-into-ssa.c (prepare_def_sites): If a new name has been
diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP
index fcb4028edf7..c131eb227d9 100644
--- a/gcc/DATESTAMP
+++ b/gcc/DATESTAMP
@@ -1 +1 @@
-20050322
+20050401
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 07203ddbf7b..f7f91f067ba 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -2028,7 +2028,8 @@ rtl-profile.o : tree-profile.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
toplev.h $(BASIC_BLOCK_H) $(COVERAGE_H) $(TREE_FLOW_H) value-prof.h $(GGC_H)
value-prof.o : value-prof.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(BASIC_BLOCK_H) hard-reg-set.h value-prof.h $(EXPR_H) output.h $(FLAGS_H) \
- $(RECOG_H) insn-config.h $(OPTABS_H) $(REGS_H) $(GGC_H)
+ $(RECOG_H) insn-config.h $(OPTABS_H) $(REGS_H) $(GGC_H) $(DIAGNOSTIC_H) \
+ $(TREE_H) $(COVERAGE_H)
loop.o : loop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(FLAGS_H) \
insn-config.h $(REGS_H) hard-reg-set.h $(RECOG_H) $(EXPR_H) \
real.h $(PREDICT_H) $(BASIC_BLOCK_H) function.h $(CFGLOOP_H) \
@@ -2232,11 +2233,13 @@ mips-tdump.o : mips-tdump.c $(CONFIG_H) $(RTL_H) $(SYSTEM_H) coretypes.h $(TM_H)
# FIXME: writing proper dependencies for this is a *LOT* of work.
libbackend.o : $(OBJS-common:.o=.c) $(out_file) \
insn-config.h insn-flags.h insn-codes.h insn-constants.h \
- insn-attr.h
+ insn-attr.h $(DATESTAMP) $(BASEVER) $(DEVPHASE)
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
-DTARGET_NAME=\"$(target_noncanonical)\" \
-DLOCALEDIR=\"$(localedir)\" \
- -c $(filter %.c,$^) -o $@ -combine
+ -c $(filter %.c,$^) -o $@ \
+ -DBASEVER=$(BASEVER_s) -DDATESTAMP=$(DATESTAMP_s) \
+ -DDEVPHASE=$(DEVPHASE_s) -combine
#
# Generate header and source files from the machine description,
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index bcd2cba0540..b36fc5b6010 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,308 @@
+2005-03-30 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
+
+ * adaint.c (_gnat_set_close_on_exec): Mark parameters unused.
+
+2005-03-29 Robert Dewar <dewar@adacore.com>
+
+ * sem_res.adb (Resolve_Real_Literal): Generate warning if static
+ fixed-point expression has value that is not a multiple of the Small
+ value.
+
+ * opt.ads (Warn_On_Bad_Fixed_Value): New flag
+
+ * s-taprop-tru64.adb (RT_Resolution): Return an integer number of
+ nanoseconds.
+
+ * ug_words: Add entry for [NO_]BAD_FIXED_VALUES for -gnatwb/-gnatwB
+
+2005-03-29 Vincent Celier <celier@adacore.com>
+
+ * mlib-tgt-vms-ia64.adb, mlib-tgt-vms-alpha.adb
+ (Build_Dynamic_Library.Version_String): Return the empty string when
+ Lib_Version is empty or when the symbol policy is not Autonomous.
+
+ * symbols-vms-alpha.adb (Finalize): For symbol policy Compliant, when
+ a symbol is not in the reference symbol file, increase the Major ID
+ and set the Minor ID to 0.
+ Use gsmatch=lequal instead of gsmatch=equal
+
+2005-03-29 Doug Rupp <rupp@adacore.com>
+
+ * adaint.c (__gnat_to_canonical_file_spec [VMS]): Check for logical
+ name and translate.
+
+2005-03-29 Javier Miranda <miranda@adacore.com>
+
+ * a-tags.ads, a-tags.adb (Get_TSD): Subprogram removed.
+ (Inherit_DT): The first formal has been redefined as a Tag.
+ This allows us the removal of the subprogram Get_TSD.
+ (TSD): Replace the call to Get_TSD by the actual code.
+
+ * exp_disp.ads, exp_disp.adb: Remove support to call Get_TSD.
+ (Make_DT): Upgrade the call to Inherit_TSD according to the
+ new interface: the first formal is now a Tag.
+
+ * i-cpp.ads, i-cpp.adb (CPP_Inherit_DT): The first formal has been
+ redefined as a Tag.
+ This change allows us to remove the subprogram Get_TSD.
+ (CPP_Get_TSD): Subprogram removed.
+ (TSD): Replace the call to CPP_Get_TSD by the actual code.
+
+ * rtsfind.ads: Remove support to call the run-time
+ subprogram Get_TSD
+
+2005-03-29 Robert Dewar <dewar@adacore.com>
+
+ * errutil.adb, errout.adb:
+ Minor comment updates on Line_Terminator references
+
+ * par-ch10.adb: Add ??? comment about line terminator
+
+ * styleg.adb (Check_Line_Terminator): Add check for new switch -gnatyd
+ (check dos line terminator).
+ (Check_Line_Max_Length): New procedure, split off from the existing
+ Check_Line_Terminator routine. Separating this out allows -gnatyf to
+ be properly recognized.
+
+ * styleg.adb: Add ??? comment for line terminator reference
+
+ * scng.adb (Check_End_Of_Line): Fix bug of -gnatyf being ignored
+ (Check_End_Of_Line): Add -gnatyd handling (check dos line terminators)
+
+ * styleg.ads (Check_Line_Terminator): Add check for new switch -gnatyd
+ (check dos line terminator).
+ (Check_Line_Max_Length): New procedure, split off from the existing
+ Check_Line_Terminator routine. Separating this out allows -gnatyf to
+ be properly recognized.
+
+ * stylesw.ads, stylesw.adb:
+ Add handling for new -gnatyd switch (check dos line terminator)
+
+ * switch-c.adb: Recognize new -gnatyd switch (check dos line terminator)
+ Recognize -gnatwb/-gnatwB switches
+ Include Warn_On_Bad_Fixed_Value for -gnatg
+
+ * usage.adb:
+ Add line for new -gnatyd switch (check dos line terminator)
+
+ * usage.adb: Add lines for -gnatwb/-gnatwB
+
+ * vms_data.ads: Add entry for NOCRLF (-gnatyd)
+
+ * vms_data.ads: [NO_]BAD_FIXED_VALUES synonym for -gnatwb/-gnatwB
+
+ * gnat_ugn.texi: Fix overlong lines
+ Document new -gnatyd switch
+ Document new -gnatwb/-gnatwB switches
+
+2005-03-29 Ed Schonberg <schonberg@adacore.com>
+
+ * exp_ch4.adb (Has_Unconstrained_UU_Component): Use the base type in
+ order to retrieve the component list of the type, before examining
+ individual components.
+
+ * sem_type.adb (Covers): Types are compatible if one is the base type
+ of the other, even though their base types might differ when private
+ views are involved.
+
+2005-03-29 Thomas Quinot <quinot@adacore.com>
+
+ * exp_dist.adb (Add_RAST_Features, PolyORB version): Set the From_Any,
+ To_Any and TypeCode TSSs on RAS types directly using Set_TSS, instead
+ of using Set_Renaming_TSS. This ensures that the TSS bodies are not
+ analyzed if expansion is disabled (which could otherwise cause spurious
+ error messages if expansion has been disabled due to previous
+ (unrelated) errors).
+
+ * sem_prag.adb (Analyze_Pragma, case Asynchronous): If RAS expansion
+ is disabled, the entity denoted by the argument is the access type
+ itself, not an underlying record type, so there is no need to go back
+ to the Corresponding_Remote_Type.
+
+2005-03-29 Gary Dismukes <dismukes@adacore.com>
+ Robert Dewar <dewar@adacore.com>
+
+ * exp_intr.adb (Expand_Dispatching_Constructor_Call): New procedure to
+ expand a call to an instance of
+ Ada.Tags.Generic_Dispatching_Constructor into a dispatching call to the
+ Constructor actual of the instance. A class-wide membership
+ check is also generated, to ensure that the tag passed to the instance
+ denotes a type in the class.
+ (Expand_Intrinsic_Call): Call Expand_Dispatching_Constructor in the case
+ of Name_Generic_Dispatching_Constructor.
+
+ * Makefile.rtl: Add a-tgdico.ads to the list of library units (new Ada
+ 05 unit for AI-260-02).
+
+ * a-tgdico.ads: New file.
+
+ * impunit.adb (Non_Imp_File_Names_05): Add entry "a-tgdico" for new
+ predefined Ada 05 generic unit Ada.Tags.Generic_Dispatching_Constructor.
+
+ * snames.ads, snames.adb (Preset_Names): Add entry for
+ Generic_Dispatching_Constructor.
+
+ PR ada/20300
+
+ * sem_ch8.adb (Find_Direct_Name): Go to root type for check of
+ character type cases.
+ (Analyze_Subprogram_Renaming): Add special handling for
+ the case of renaming of stream attributes when the renaming denotes a
+ generic formal subprogram association for an abstract formal subprogram.
+ Check that the attribute is a primitive stream attribute (and not
+ a class-wide stream attribute) and then rewrite the attribute name
+ as the name of the appropriate compiler-generated stream primitive.
+
+2005-03-29 Robert Dewar <dewar@adacore.com>
+
+ * exp_util.adb (Remove_Side_Effects): Properly propagate arguments to
+ recursive calls.
+ (Is_Possibly_Unaligned_Object): Correct typo that
+ resulted in inaccurate result for unaligned scalars within records.
+
+2005-03-29 Ed Schonberg <schonberg@adacore.com>
+
+ * freeze.adb (Freeze_Record_Type): If the type of the component is an
+ itype whose parent is controlled and not yet frozen, do not create a
+ freeze node for the itype if expansion is disabled.
+
+2005-03-29 Vincent Celier <celier@adacore.com>
+
+ * make.adb (Gnatmake): Don't fail if the main project file is declared
+ as having no Ada sources. Do not display message "no sources to
+ compile" in quiet output.
+
+2005-03-29 Doug Rupp <rupp@adacore.com>
+
+ * Makefile.in [VMS] (EXTRA_GNATTOOLS): Add vms_help and gnat.hlp as
+ extra tools.
+
+2005-03-29 Robert Dewar <dewar@adacore.com>
+
+ * par-ch12.adb (P_Generic): Give better msg for illegal private generic
+ child.
+
+2005-03-29 Robert Dewar <dewar@adacore.com>
+
+ * par-ch3.adb (P_Type_Declaration): Fix bad error recovery after
+ missing TYPE Improve the error message generated when compiling a
+ limited interface in Ada83 or Ada95 mode.
+
+2005-03-29 Robert Dewar <dewar@adacore.com>
+
+ * par-ch4.adb (P_Name): When a bad attribute is returned, return error,
+ rather than proceed ahead using a junk attribute name.
+
+2005-03-29 Vincent Celier <celier@adacore.com>
+
+ * prj.ads, prj.adb: (Project_Data): Add new component Display_Name
+
+ * prj-part.adb (Parse_Single_Project): Set the location of a project
+ on its defining identifier, rather than on the reserved word "project".
+
+ * prj-proc.adb (Expression): Adapt to the fact that default of external
+ references may be string expressions, not always literal strings.
+ (Recursive_Process): Set Display_Name equal to Name
+ when Location is No_Location, that is when there is no actual file.
+ Get the Display_Name of the project from the source, when it is not a
+ virtual project.
+ (Process): Use the Display_Name in error messages
+
+ * prj-strt.adb (External_Reference): Allow default to be string
+ expressions, not only literal strings.
+
+2005-03-29 Vincent Celier <celier@adacore.com>
+
+ * prj-nmsc.adb (Check_Stand_Alone_Library): Do not forbid the symbol
+ file and the reference symbol file to be the same file.
+
+2005-03-29 Thomas Quinot <quinot@adacore.com>
+
+ * sem_cat.adb (Validate_Remote_Types_Type_Conversion): Perform check to
+ forbid conversion of a local access-to-subprogram type to a remote one.
+
+ * sem_util.adb (Wrong_Type): For a record type that is the expanded
+ equivalent type for a remote access-to-subprogram type, go back to the
+ original RAS entity when displaying an error message, so the casing is
+ the original source casing.
+
+2005-03-29 Robert Dewar <dewar@adacore.com>
+
+ * sem_ch11.adb (Analyze_Raise_Statement): Change message for warning
+ on param update.
+
+2005-03-29 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch4.adb (Analyze_Selected_Component): Do not generate an actual
+ subtype if code is being pre-analyzed, to prevent un-expanded
+ references to protected formals, among others.
+ (Analyze_Explicit_Dereference): If the overloaded prefix includes some
+ interpretation that can be a call, include the result of the call as a
+ possible interpretation of the dereference.
+
+ * sem_ch5.adb (Process_Bounds): Determine type of range by
+ pre-analyzing a copy of the original range, and then analyze the range
+ with the expected type.
+
+ * sem_res.adb (Check_Parameterless_Call): For an explicit dereference
+ with an overloaded prefix where not all interpretations yield an
+ access to subprogram, do not rewrite node as a call.
+ (Resolve_Explicit_Dereference): Recognize the previous case and rewrite
+ the node as a call once the context identifies the interpretation of
+ the prefix whose call yields the context type.
+ (Valid_Conversion): For the case of a conversion between
+ local access-to-subprogram types, check subtype conformance using
+ Check_Subtype_Conformant instead of Subtype_Conformant, to have a more
+ detailed error message.
+
+2005-03-29 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch6.adb (Set_Formal_Mode): If the subtype has a non_null
+ indicator, indicate that the formal can never be null.
+ (Process_Formals): If a formal has a non_null indicator, insert the
+ resulting subtype immediately before the enclosing subprogram decl,
+ and not at the beginning of the corresponding declarative part, to
+ prevent access before elaboration (Ada2005).
+
+2005-03-29 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ PR ada/19956
+ * utils.c (finish_record_type): Use variable_size when setting sizes.
+
+2005-03-29 Robert Dewar <dewar@adacore.com>
+
+ * xtreeprs.adb, xnmake.adb: Use Stream_IO instead of Text_IO to
+ guarantee Unix style line terminators for the output files, even when
+ running on windows.
+
+2005-03-29 Robert Dewar <dewar@adacore.com>
+
+ * a-direct.ads, a-direct.adb (Start_Search): Free allocated search
+ buffer if an exception is raised.
+
+2005-03-29 Ed Falis <falis@adacore.com>
+
+ * cio.c: Undefine putchar and getchar for VTHREADS: incompatible with
+ VxWorks 653 1.4
+
+2005-03-29 Robert Dewar <dewar@adacore.com>
+
+ * sem_util.ads: Minor reformatting
+ * gnat_rm.texi: Minor editing.
+
+2005-03-29 Eric Botcazou <ebotcazou@adacore.com>
+
+ * decl.c (gnat_to_gnu_entity) <E_Variable>: Rework comment.
+ * trans.c (tree_transform) <N_Identifier>: Use correct predicates.
+
+2005-03-24 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
+
+ * adaint.c (__gnat_portable_spawn): Adjust cast.
+
+2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
+
+ * misc.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
+
2005-03-17 Pascal Obry <obry@adacore.com>
* adaint.h, adaint.c (__gnat_waitpid): Moved to expect.c where it is
diff --git a/gcc/ada/Makefile.in b/gcc/ada/Makefile.in
index b3c0cee8572..7457e2f36ae 100644
--- a/gcc/ada/Makefile.in
+++ b/gcc/ada/Makefile.in
@@ -1263,8 +1263,10 @@ ifeq ($(strip $(filter-out alpha% dec vms% openvms% alphavms%,$(targ))),)
endif
EXTRA_GNATRTL_TASKING_OBJS=s-tpopde.o
EXTRA_GNATTOOLS = \
- ../../gnatlbr$(exeext) \
- ../../gnatsym$(exeext)
+ ../../gnatlbr$(exeext) \
+ ../../gnatsym$(exeext) \
+ ../../vms_help$(exeext) \
+ ../../gnat.hlp
# This command transforms (YYYYMMDD) into YY,MMDD
GSMATCH_VERSION := $(shell grep "^ *Gnat_Static_Version_String" $(fsrcpfx)gnatvsn.ads | sed -e 's/.*(\(.*\)).*/\1/' -e 's/\(..\)\(..\)\(....\)/\2,\3/')
TOOLS_LIBS_LO := --for-linker=sys\\$$\$$library:trace.exe
@@ -2034,9 +2036,18 @@ tracebak.o : tracebak.c tb-alvms.c tb-alvxw.c
force:
-# Gnatlbr is only used on VMS
+# Gnatlbr, Vms_help, and Gnat.hlp are only used on VMS
../../gnatlbr$(exeext): ../../prefix.o
$(GNATMAKE) -c $(ADA_INCLUDES) gnatlbr --GCC="$(CC) $(ALL_ADAFLAGS)"
$(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlbr
$(GNATLINK) -v gnatlbr -o $@ --GCC=$(GCC_LINK) $(TOOLS_LIBS)
+
+../../vms_help$(exeext):
+ $(GNATMAKE) -c $(ADA_INCLUDES) vms_help --GCC="$(CC) $(ALL_ADAFLAGS)"
+ $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) vms_help
+ $(GNATLINK) -v vms_help -o $@ --GCC=$(GCC_LINK) $(TOOLS_LIBS)
+
+../../gnat.hlp: ../../vms_help$(exeext)
+ ../../vms_help$(exeext) $(fsrcdir)/gnat.help_in \
+ $(fsrcdir)/vms_data.ads ../../gnat.hlp
diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl
index 282cbff9569..7687c33e6bc 100644
--- a/gcc/ada/Makefile.rtl
+++ b/gcc/ada/Makefile.rtl
@@ -212,6 +212,7 @@ GNATRTL_NONTASKING_OBJS= \
a-szunha$(objext) \
a-szuzti$(objext) \
a-tags$(objext) \
+ a-tgdico$(objext) \
a-teioed$(objext) \
a-textio$(objext) \
a-ticoau$(objext) \
diff --git a/gcc/ada/a-direct.adb b/gcc/ada/a-direct.adb
index 33562f11fb8..810455941eb 100644
--- a/gcc/ada/a-direct.adb
+++ b/gcc/ada/a-direct.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 2004 Free Software Foundation, Inc. --
+-- Copyright (C) 2004-2005 Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -31,15 +31,15 @@
-- --
------------------------------------------------------------------------------
-with Ada.Directories.Validity; use Ada.Directories.Validity;
-with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
+with Ada.Directories.Validity; use Ada.Directories.Validity;
+with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
with Ada.Unchecked_Deallocation;
-with Ada.Characters.Handling; use Ada.Characters.Handling;
+with Ada.Characters.Handling; use Ada.Characters.Handling;
-with GNAT.Directory_Operations; use GNAT.Directory_Operations;
-with GNAT.OS_Lib; use GNAT.OS_Lib;
-with GNAT.Regexp; use GNAT.Regexp;
--- ??? Ada units cannot depend on GNAT units
+with GNAT.Directory_Operations; use GNAT.Directory_Operations;
+with GNAT.OS_Lib; use GNAT.OS_Lib;
+with GNAT.Regexp; use GNAT.Regexp;
+-- ??? Ada units should not depend on GNAT units
with System;
@@ -938,6 +938,7 @@ package body Ada.Directories is
exception
when Error_In_Regexp =>
+ Free (Search.Value);
raise Name_Error;
end;
diff --git a/gcc/ada/a-direct.ads b/gcc/ada/a-direct.ads
index 4cd2340a79c..5047cc76bd5 100644
--- a/gcc/ada/a-direct.ads
+++ b/gcc/ada/a-direct.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 2004 Free Software Foundation, Inc. --
+-- Copyright (C) 2004-2005 Free Software Foundation, Inc. --
-- --
-- This specification is derived for use with GNAT from AI-00248, which is --
-- expected to be a part of a future expected revised Ada Reference Manual. --
@@ -304,10 +304,10 @@ package Ada.Directories is
-- Starts a search in the directory entry in the directory named by
-- Directory for entries matching Pattern. Pattern represents a file name
-- matching pattern. If Pattern is null, all items in the directory are
- -- matched; otherwise, the interpretation of Pattern is
- -- implementation-defined. Only items which match Filter will be returned.
- -- After a successful call on Start_Search, the object Search may have
- -- entries available, but it may have no entries available if no files or
+ -- matched; otherwise, the interpretation of Pattern is implementation-
+ -- defined. Only items which match Filter will be returned. After a
+ -- successful call on Start_Search, the object Search may have entries
+ -- available, but it may have no entries available if no files or
-- directories match Pattern and Filter. The exception Name_Error is
-- propagated if the string given by Directory does not identify an
-- existing directory, or if Pattern does not allow the identification of
@@ -317,7 +317,10 @@ package Ada.Directories is
procedure End_Search (Search : in out Search_Type);
-- Ends the search represented by Search. After a successful call on
- -- End_Search, the object Search will have no entries available.
+ -- End_Search, the object Search will have no entries available. Note
+ -- that is is not necessary to call End_Search if the call to Start_Search
+ -- was unsuccessful and raised an exception (but it is harmless to make
+ -- the call in this case)>
function More_Entries (Search : Search_Type) return Boolean;
-- Returns True if more entries are available to be returned by a call
diff --git a/gcc/ada/a-tags.adb b/gcc/ada/a-tags.adb
index 3065968a698..df4e58e81f6 100644
--- a/gcc/ada/a-tags.adb
+++ b/gcc/ada/a-tags.adb
@@ -342,18 +342,6 @@ package body Ada.Tags is
return TSD (T).Remotely_Callable = True;
end Get_Remotely_Callable;
- -------------
- -- Get_TSD --
- -------------
-
- function Get_TSD (T : Tag) return System.Address is
- use type System.Storage_Elements.Storage_Offset;
- TSD_Ptr : constant Addr_Ptr :=
- To_Addr_Ptr (To_Address (T) - DT_Typeinfo_Ptr_Size);
- begin
- return TSD_Ptr.all;
- end Get_TSD;
-
----------------
-- Inherit_DT --
----------------
@@ -374,14 +362,13 @@ package body Ada.Tags is
-- Inherit_TSD --
-----------------
- procedure Inherit_TSD (Old_TSD : System.Address; New_Tag : Tag) is
- Old_TSD_Ptr : constant Type_Specific_Data_Ptr :=
- To_Type_Specific_Data_Ptr (Old_TSD);
- New_TSD_Ptr : constant Type_Specific_Data_Ptr :=
- TSD (New_Tag);
+ procedure Inherit_TSD (Old_Tag : Tag; New_Tag : Tag) is
+ New_TSD_Ptr : constant Type_Specific_Data_Ptr := TSD (New_Tag);
+ Old_TSD_Ptr : Type_Specific_Data_Ptr;
begin
- if Old_TSD_Ptr /= null then
+ if Old_Tag /= null then
+ Old_TSD_Ptr := TSD (Old_Tag);
New_TSD_Ptr.Idepth := Old_TSD_Ptr.Idepth + 1;
New_TSD_Ptr.Ancestor_Tags (1 .. New_TSD_Ptr.Idepth) :=
Old_TSD_Ptr.Ancestor_Tags (0 .. Old_TSD_Ptr.Idepth);
@@ -577,8 +564,11 @@ package body Ada.Tags is
---------
function TSD (T : Tag) return Type_Specific_Data_Ptr is
+ use type System.Storage_Elements.Storage_Offset;
+ TSD_Ptr : constant Addr_Ptr :=
+ To_Addr_Ptr (To_Address (T) - DT_Typeinfo_Ptr_Size);
begin
- return To_Type_Specific_Data_Ptr (Get_TSD (T));
+ return To_Type_Specific_Data_Ptr (TSD_Ptr.all);
end TSD;
end Ada.Tags;
diff --git a/gcc/ada/a-tags.ads b/gcc/ada/a-tags.ads
index ef099f73aff..0d517a0ac07 100644
--- a/gcc/ada/a-tags.ads
+++ b/gcc/ada/a-tags.ads
@@ -114,10 +114,6 @@ private
function Get_Remotely_Callable (T : Tag) return Boolean;
-- Return the value previously set by Set_Remotely_Callable
- function Get_TSD (T : Tag) return System.Address;
- -- Given a pointer T to a dispatch Table, retreives the address of the
- -- record containing the Type Specific Data generated by GNAT
-
procedure Inherit_DT
(Old_T : Tag;
New_T : Tag;
@@ -126,9 +122,8 @@ private
-- of the direct ancestor and the number of primitive ops that are
-- inherited (Entry_Count).
- procedure Inherit_TSD (Old_TSD : System.Address; New_Tag : Tag);
- -- Entry point used to initialize the TSD of a type knowing the
- -- TSD of the direct ancestor.
+ procedure Inherit_TSD (Old_Tag : Tag; New_Tag : Tag);
+ -- Initialize the TSD of a type knowing the tag of the direct ancestor
function Parent_Size
(Obj : System.Address;
@@ -182,9 +177,8 @@ private
-- in E.4 (18).
function TSD (T : Tag) return Type_Specific_Data_Ptr;
- -- This function is conceptually equivalent to Get_TSD, but
- -- returning a Type_Specific_Data_Ptr type (rather than an Address)
- -- simplifies the implementation of the other subprograms.
+ -- Given a pointer T to a dispatch Table, retreives the address of the
+ -- record containing the Type Specific Data generated by GNAT
DT_Prologue_Size : constant SSE.Storage_Count :=
SSE.Storage_Count
@@ -237,7 +231,6 @@ private
pragma Inline_Always (Get_Prim_Op_Address);
pragma Inline_Always (Get_RC_Offset);
pragma Inline_Always (Get_Remotely_Callable);
- pragma Inline_Always (Get_TSD);
pragma Inline_Always (Inherit_DT);
pragma Inline_Always (Inherit_TSD);
pragma Inline_Always (Register_Tag);
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
index cbe96f40a8b..2760cc6c8bc 100644
--- a/gcc/ada/adaint.c
+++ b/gcc/ada/adaint.c
@@ -1579,7 +1579,7 @@ __gnat_portable_spawn (char *args[])
strcat (args[0], args_0);
strcat (args[0], "\"");
- status = spawnvp (P_WAIT, args_0, (char* const*)args);
+ status = spawnvp (P_WAIT, args_0, (const char* const*)args);
/* restore previous value */
free (args[0]);
@@ -2204,18 +2204,29 @@ __gnat_to_canonical_dir_spec (char *dirspec, int prefixflag)
}
/* Translate a VMS syntax file specification into Unix syntax.
- If no indicators of VMS syntax found, return input string. */
+ If no indicators of VMS syntax found, check if its an uppercase
+ alphanumeric_ name and if so try it out as an environment
+ variable (logical name). If all else fails return the
+ input string. */
char *
__gnat_to_canonical_file_spec (char *filespec)
{
+ char *filespec1;
+
strncpy (new_canonical_filespec, "", MAXPATH);
if (strchr (filespec, ']') || strchr (filespec, ':'))
{
strncpy (new_canonical_filespec,
- (char *) decc$translate_vms (filespec),
- MAXPATH);
+ (char *) decc$translate_vms (filespec), MAXPATH);
+ }
+ else if ((strlen (filespec) == strspn (filespec,
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_"))
+ && (filespec1 = getenv (filespec)))
+ {
+ strncpy (new_canonical_filespec,
+ (char *) decc$translate_vms (filespec1), MAXPATH);
}
else
{
@@ -2601,7 +2612,8 @@ get_gcc_version (void)
}
int
-__gnat_set_close_on_exec (int fd, int close_on_exec_p)
+__gnat_set_close_on_exec (int fd ATTRIBUTE_UNUSED,
+ int close_on_exec_p ATTRIBUTE_UNUSED)
{
#if defined (F_GETFD) && defined (FD_CLOEXEC) && ! defined (__vxworks)
int flags = fcntl (fd, F_GETFD, 0);
diff --git a/gcc/ada/cio.c b/gcc/ada/cio.c
index 8e4c7cba596..4b4a8070282 100644
--- a/gcc/ada/cio.c
+++ b/gcc/ada/cio.c
@@ -6,7 +6,7 @@
* *
* C Implementation File *
* *
- * Copyright (C) 1992-2003 Free Software Foundation, Inc. *
+ * Copyright (C) 1992-2005 Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
@@ -51,6 +51,11 @@
#undef stdout
#endif
+#ifdef VTHREADS
+#undef putchar
+#undef getchar
+#endif
+
int
get_char (void)
{
diff --git a/gcc/ada/decl.c b/gcc/ada/decl.c
index db806209f70..9d2e8fe871d 100644
--- a/gcc/ada/decl.c
+++ b/gcc/ada/decl.c
@@ -776,13 +776,12 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
}
/* Otherwise, make this into a constant pointer to the object we
- are to rename.
-
- Stabilize it since in this case the renaming evaluation may
- directly dereference the initial value we make here instead
- of the pointer we will assign it to. We don't want variables
- in the expression to be evaluated every time the renaming is
- used, since their value may change in between. */
+ are to rename and attach the object to the pointer. We need
+ to stabilize too since the renaming evaluation may directly
+ reference the renamed object instead of the pointer we will
+ attach it to. We don't want variables in the expression to
+ be evaluated every time the renaming is used, since their
+ value may change in between. */
else
{
bool has_side_effects = TREE_SIDE_EFFECTS (gnu_expr);
diff --git a/gcc/ada/errout.adb b/gcc/ada/errout.adb
index 6ddda3f0d45..eb12d2d5a03 100644
--- a/gcc/ada/errout.adb
+++ b/gcc/ada/errout.adb
@@ -493,6 +493,9 @@ package body Errout is
-- since there may be white space inside the literal and we don't want
-- to stop on that white space.
+ -- Note: since this is an error recovery issue anyway, it is not worth
+ -- worrying about special UTF_32 line terminator characters here.
+
if Prev_Token = Tok_String_Literal then
loop
S1 := S1 + 1;
@@ -512,7 +515,10 @@ package body Errout is
-- Otherwise we search forward for the end of the current token, marked
-- by a line terminator, white space, a comment symbol or if we bump
- -- into the following token (i.e. the current token)
+ -- into the following token (i.e. the current token).
+
+ -- Again, it is not worth worrying about UTF_32 special line terminator
+ -- characters in this context, since this is only for error recovery.
else
while Source (S1) not in Line_Terminator
@@ -528,7 +534,6 @@ package body Errout is
-- S1 is now set to the location for the flag
Error_Msg (Msg, S1);
-
end Error_Msg_AP;
------------------
diff --git a/gcc/ada/errutil.adb b/gcc/ada/errutil.adb
index 855d464add9..ef30c7d4838 100644
--- a/gcc/ada/errutil.adb
+++ b/gcc/ada/errutil.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1991-2003 Free Software Foundation, Inc. --
+-- Copyright (C) 1991-2005 Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -100,6 +100,10 @@ package body Errutil is
-- since there may be white space inside the literal and we don't want
-- to stop on that white space.
+ -- Note that it is not worth worrying about special UTF_32 line
+ -- terminator characters in this context, since this is only about
+ -- error recovery anyway.
+
if Prev_Token = Tok_String_Literal then
loop
S1 := S1 + 1;
@@ -121,6 +125,10 @@ package body Errutil is
-- by a line terminator, white space, a comment symbol or if we bump
-- into the following token (i.e. the current token)
+ -- Note that it is not worth worrying about special UTF_32 line
+ -- terminator characters in this context, since this is only about
+ -- error recovery anyway.
+
else
while Source (S1) not in Line_Terminator
and then Source (S1) /= ' '
diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb
index 525bf67c2c3..e817156267c 100644
--- a/gcc/ada/exp_ch4.adb
+++ b/gcc/ada/exp_ch4.adb
@@ -4077,7 +4077,7 @@ package body Exp_Ch4 is
(Typ : Node_Id) return Boolean
is
Tdef : constant Node_Id :=
- Type_Definition (Declaration_Node (Typ));
+ Type_Definition (Declaration_Node (Base_Type (Typ)));
Clist : Node_Id;
Vpart : Node_Id;
diff --git a/gcc/ada/exp_disp.adb b/gcc/ada/exp_disp.adb
index cfe9a6b46f4..8bb0cac38db 100644
--- a/gcc/ada/exp_disp.adb
+++ b/gcc/ada/exp_disp.adb
@@ -58,7 +58,6 @@ package body Exp_Disp is
Get_Prim_Op_Address => RE_Get_Prim_Op_Address,
Get_RC_Offset => RE_Get_RC_Offset,
Get_Remotely_Callable => RE_Get_Remotely_Callable,
- Get_TSD => RE_Get_TSD,
Inherit_DT => RE_Inherit_DT,
Inherit_TSD => RE_Inherit_TSD,
Register_Tag => RE_Register_Tag,
@@ -79,7 +78,6 @@ package body Exp_Disp is
Get_Prim_Op_Address => RE_CPP_Get_Prim_Op_Address,
Get_RC_Offset => RE_CPP_Get_RC_Offset,
Get_Remotely_Callable => RE_CPP_Get_Remotely_Callable,
- Get_TSD => RE_CPP_Get_TSD,
Inherit_DT => RE_CPP_Inherit_DT,
Inherit_TSD => RE_CPP_Inherit_TSD,
Register_Tag => RE_CPP_Register_Tag,
@@ -100,7 +98,6 @@ package body Exp_Disp is
Get_Prim_Op_Address => False,
Get_Remotely_Callable => False,
Get_RC_Offset => False,
- Get_TSD => False,
Inherit_DT => True,
Inherit_TSD => True,
Register_Tag => True,
@@ -121,7 +118,6 @@ package body Exp_Disp is
Get_Prim_Op_Address => 2,
Get_RC_Offset => 1,
Get_Remotely_Callable => 1,
- Get_TSD => 1,
Inherit_DT => 3,
Inherit_TSD => 2,
Register_Tag => 1,
@@ -640,8 +636,8 @@ package body Exp_Disp is
I_Depth : Int;
Generalized_Tag : Entity_Id;
Size_Expr_Node : Node_Id;
- Old_Tag : Node_Id;
- Old_TSD : Node_Id;
+ Old_Tag1 : Node_Id;
+ Old_Tag2 : Node_Id;
begin
if not RTE_Available (RE_Tag) then
@@ -834,24 +830,20 @@ package body Exp_Disp is
if Typ = Etype (Typ)
or else Is_CPP_Class (Etype (Typ))
then
- Old_Tag :=
+ Old_Tag1 :=
Unchecked_Convert_To (Generalized_Tag,
Make_Integer_Literal (Loc, 0));
-
- Old_TSD :=
- Unchecked_Convert_To (RTE (RE_Address),
+ Old_Tag2 :=
+ Unchecked_Convert_To (Generalized_Tag,
Make_Integer_Literal (Loc, 0));
else
- Old_Tag :=
+ Old_Tag1 :=
+ New_Reference_To
+ (Node (First_Elmt (Access_Disp_Table (Etype (Typ)))), Loc);
+ Old_Tag2 :=
New_Reference_To
(Node (First_Elmt (Access_Disp_Table (Etype (Typ)))), Loc);
- Old_TSD :=
- Make_DT_Access_Action (Typ,
- Action => Get_TSD,
- Args => New_List (
- New_Reference_To
- (Node (First_Elmt (Access_Disp_Table (Etype (Typ)))), Loc)));
end if;
-- Generate: Inherit_DT (parent'tag, DT_Ptr, nb_prim of parent);
@@ -860,18 +852,18 @@ package body Exp_Disp is
Make_DT_Access_Action (Typ,
Action => Inherit_DT,
Args => New_List (
- Node1 => Old_Tag,
+ Node1 => Old_Tag1,
Node2 => New_Reference_To (DT_Ptr, Loc),
Node3 => Make_Integer_Literal (Loc,
DT_Entry_Count (First_Tag_Component (Etype (Typ)))))));
- -- Generate: Inherit_TSD (Get_TSD (parent), DT_Ptr);
+ -- Generate: Inherit_TSD (parent'tag, DT_Ptr);
Append_To (Elab_Code,
Make_DT_Access_Action (Typ,
Action => Inherit_TSD,
Args => New_List (
- Node1 => Old_TSD,
+ Node1 => Old_Tag2,
Node2 => New_Reference_To (DT_Ptr, Loc))));
-- Generate: Exname : constant String := full_qualified_name (typ);
diff --git a/gcc/ada/exp_disp.ads b/gcc/ada/exp_disp.ads
index 3218ab1c959..d942c3f514b 100644
--- a/gcc/ada/exp_disp.ads
+++ b/gcc/ada/exp_disp.ads
@@ -38,7 +38,6 @@ package Exp_Disp is
Get_Prim_Op_Address,
Get_RC_Offset,
Get_Remotely_Callable,
- Get_TSD,
Inherit_DT,
Inherit_TSD,
Register_Tag,
diff --git a/gcc/ada/exp_dist.adb b/gcc/ada/exp_dist.adb
index f8f34b43752..60fdf4f09fd 100644
--- a/gcc/ada/exp_dist.adb
+++ b/gcc/ada/exp_dist.adb
@@ -434,11 +434,8 @@ package body Exp_Dist is
procedure Specific_Add_RAST_Features
(Vis_Decl : Node_Id;
- RAS_Type : Entity_Id;
- Decls : List_Id);
- -- Add declaration for TSSs for a given RAS type. The declarations are
- -- added just after the declaration of the RAS type itself, while the
- -- bodies are inserted at the end of Decls. PCS-specific ancillary
+ RAS_Type : Entity_Id);
+ -- Add declaration for TSSs for a given RAS type. PCS-specific ancillary
-- subprogram for Add_RAST_Features.
-- An RPC_Target record is used during construction of calling stubs
@@ -576,8 +573,7 @@ package body Exp_Dist is
procedure Add_RAST_Features
(Vis_Decl : Node_Id;
- RAS_Type : Entity_Id;
- Decls : List_Id);
+ RAS_Type : Entity_Id);
procedure Build_General_Calling_Stubs
(Decls : List_Id;
@@ -652,8 +648,7 @@ package body Exp_Dist is
procedure Add_RAST_Features
(Vis_Decl : Node_Id;
- RAS_Type : Entity_Id;
- Decls : List_Id);
+ RAS_Type : Entity_Id);
procedure Build_General_Calling_Stubs
(Decls : List_Id;
@@ -1711,20 +1706,10 @@ package body Exp_Dist is
procedure Add_RAST_Features (Vis_Decl : Node_Id) is
RAS_Type : constant Entity_Id :=
Equivalent_Type (Defining_Identifier (Vis_Decl));
-
- Spec : constant Node_Id :=
- Specification (Unit (Enclosing_Lib_Unit_Node (Vis_Decl)));
- Decls : List_Id := Private_Declarations (Spec);
-
begin
pragma Assert (No (TSS (RAS_Type, TSS_RAS_Access)));
-
- if No (Decls) then
- Decls := Visible_Declarations (Spec);
- end if;
-
Add_RAS_Dereference_TSS (Vis_Decl);
- Specific_Add_RAST_Features (Vis_Decl, RAS_Type, Decls);
+ Specific_Add_RAST_Features (Vis_Decl, RAS_Type);
end Add_RAST_Features;
-------------------
@@ -3266,11 +3251,10 @@ package body Exp_Dist is
procedure Add_RAST_Features
(Vis_Decl : Node_Id;
- RAS_Type : Entity_Id;
- Decls : List_Id)
+ RAS_Type : Entity_Id)
is
pragma Warnings (Off);
- pragma Unreferenced (RAS_Type, Decls);
+ pragma Unreferenced (RAS_Type);
pragma Warnings (On);
begin
Add_RAS_Access_TSS (Vis_Decl);
@@ -5094,19 +5078,13 @@ package body Exp_Dist is
Declarations : List_Id);
-- Add the TypeCode TSS for this RACW type
- procedure Add_RAS_From_Any
- (RAS_Type : Entity_Id;
- Declarations : List_Id);
+ procedure Add_RAS_From_Any (RAS_Type : Entity_Id);
-- Add the From_Any TSS for this RAS type
- procedure Add_RAS_To_Any
- (RAS_Type : Entity_Id;
- Declarations : List_Id);
+ procedure Add_RAS_To_Any (RAS_Type : Entity_Id);
-- Add the To_Any TSS for this RAS type
- procedure Add_RAS_TypeCode
- (RAS_Type : Entity_Id;
- Declarations : List_Id);
+ procedure Add_RAS_TypeCode (RAS_Type : Entity_Id);
-- Add the TypeCode TSS for this RAS type
procedure Add_RAS_Access_TSS (N : Node_Id);
@@ -5940,18 +5918,17 @@ package body Exp_Dist is
procedure Add_RAST_Features
(Vis_Decl : Node_Id;
- RAS_Type : Entity_Id;
- Decls : List_Id)
+ RAS_Type : Entity_Id)
is
begin
Add_RAS_Access_TSS (Vis_Decl);
- Add_RAS_From_Any (RAS_Type, Decls);
- Add_RAS_TypeCode (RAS_Type, Decls);
+ Add_RAS_From_Any (RAS_Type);
+ Add_RAS_TypeCode (RAS_Type);
-- To_Any uses TypeCode, and therefore needs to be generated last
- Add_RAS_To_Any (RAS_Type, Decls);
+ Add_RAS_To_Any (RAS_Type);
end Add_RAST_Features;
------------------------
@@ -6289,18 +6266,13 @@ package body Exp_Dist is
-- Add_RAS_From_Any --
----------------------
- procedure Add_RAS_From_Any
- (RAS_Type : Entity_Id;
- Declarations : List_Id)
- is
+ procedure Add_RAS_From_Any (RAS_Type : Entity_Id) is
Loc : constant Source_Ptr := Sloc (RAS_Type);
- Fnam : constant Entity_Id :=
- Make_Defining_Identifier (Loc, New_Internal_Name ('F'));
+ Fnam : constant Entity_Id := Make_Defining_Identifier (Loc,
+ Make_TSS_Name (RAS_Type, TSS_From_Any));
Func_Spec : Node_Id;
- Func_Decl : Node_Id;
- Func_Body : Node_Id;
Statements : List_Id;
@@ -6334,45 +6306,30 @@ package body Exp_Dist is
New_Occurrence_Of (RTE (RE_Any), Loc))),
Subtype_Mark => New_Occurrence_Of (RAS_Type, Loc));
- -- NOTE: The usage occurrences of RACW_Parameter must
- -- refer to the entity in the declaration spec, not those
- -- of the body spec.
-
- Func_Decl := Make_Subprogram_Declaration (Loc, Func_Spec);
-
- Func_Body :=
+ Discard_Node (
Make_Subprogram_Body (Loc,
- Specification =>
- Copy_Specification (Loc, Func_Spec),
+ Specification => Func_Spec,
Declarations => No_List,
Handled_Statement_Sequence =>
Make_Handled_Sequence_Of_Statements (Loc,
- Statements => Statements));
-
- Insert_After (Declaration_Node (RAS_Type), Func_Decl);
- Append_To (Declarations, Func_Body);
-
- Set_Renaming_TSS (RAS_Type, Fnam, TSS_From_Any);
+ Statements => Statements)));
+ Set_TSS (RAS_Type, Fnam);
end Add_RAS_From_Any;
--------------------
-- Add_RAS_To_Any --
--------------------
- procedure Add_RAS_To_Any
- (RAS_Type : Entity_Id;
- Declarations : List_Id)
- is
+ procedure Add_RAS_To_Any (RAS_Type : Entity_Id) is
Loc : constant Source_Ptr := Sloc (RAS_Type);
- Fnam : Entity_Id;
+ Fnam : constant Entity_Id := Make_Defining_Identifier (Loc,
+ Make_TSS_Name (RAS_Type, TSS_To_Any));
- Decls : List_Id;
+ Decls : List_Id;
Statements : List_Id;
Func_Spec : Node_Id;
- Func_Decl : Node_Id;
- Func_Body : Node_Id;
Any : constant Entity_Id :=
Make_Defining_Identifier (Loc,
@@ -6411,9 +6368,6 @@ package body Exp_Dist is
Expression =>
New_Occurrence_Of (Any, Loc)));
- Fnam := Make_Defining_Identifier (
- Loc, New_Internal_Name ('T'));
-
Func_Spec :=
Make_Function_Specification (Loc,
Defining_Unit_Name =>
@@ -6426,42 +6380,27 @@ package body Exp_Dist is
New_Occurrence_Of (RAS_Type, Loc))),
Subtype_Mark => New_Occurrence_Of (RTE (RE_Any), Loc));
- -- NOTE: The usage occurrences of RAS_Parameter must
- -- refer to the entity in the declaration spec, not in
- -- the body spec.
-
- Func_Decl := Make_Subprogram_Declaration (Loc, Func_Spec);
-
- Func_Body :=
+ Discard_Node (
Make_Subprogram_Body (Loc,
- Specification =>
- Copy_Specification (Loc, Func_Spec),
+ Specification => Func_Spec,
Declarations => Decls,
Handled_Statement_Sequence =>
Make_Handled_Sequence_Of_Statements (Loc,
- Statements => Statements));
-
- Insert_After (Declaration_Node (RAS_Type), Func_Decl);
- Append_To (Declarations, Func_Body);
-
- Set_Renaming_TSS (RAS_Type, Fnam, TSS_To_Any);
+ Statements => Statements)));
+ Set_TSS (RAS_Type, Fnam);
end Add_RAS_To_Any;
----------------------
-- Add_RAS_TypeCode --
----------------------
- procedure Add_RAS_TypeCode
- (RAS_Type : Entity_Id;
- Declarations : List_Id)
- is
+ procedure Add_RAS_TypeCode (RAS_Type : Entity_Id) is
Loc : constant Source_Ptr := Sloc (RAS_Type);
- Fnam : Entity_Id;
+ Fnam : constant Entity_Id := Make_Defining_Identifier (Loc,
+ Make_TSS_Name (RAS_Type, TSS_TypeCode));
Func_Spec : Node_Id;
- Func_Decl : Node_Id;
- Func_Body : Node_Id;
Decls : constant List_Id := New_List;
Name_String, Repo_Id_String : String_Id;
@@ -6470,11 +6409,6 @@ package body Exp_Dist is
Make_Defining_Identifier (Loc, Name_R);
begin
-
- Fnam :=
- Make_Defining_Identifier (Loc,
- Chars => New_Internal_Name ('T'));
-
-- The spec for this subprogram has a dummy 'access RAS'
-- argument, which serves only for overloading purposes.
@@ -6491,19 +6425,12 @@ package body Exp_Dist is
Subtype_Mark => New_Occurrence_Of (RAS_Type, Loc)))),
Subtype_Mark => New_Occurrence_Of (RTE (RE_TypeCode), Loc));
- -- NOTE: The usage occurrences of RAS_Parameter must
- -- refer to the entity in the declaration spec, not those
- -- of the body spec.
-
- Func_Decl := Make_Subprogram_Declaration (Loc, Func_Spec);
-
PolyORB_Support.Helpers.Build_Name_And_Repository_Id
(RAS_Type, Name_Str => Name_String, Repo_Id_Str => Repo_Id_String);
- Func_Body :=
+ Discard_Node (
Make_Subprogram_Body (Loc,
- Specification =>
- Copy_Specification (Loc, Func_Spec),
+ Specification => Func_Spec,
Declarations => Decls,
Handled_Statement_Sequence =>
Make_Handled_Sequence_Of_Statements (Loc,
@@ -6528,12 +6455,8 @@ package body Exp_Dist is
RTE (RE_TA_String), Loc),
Parameter_Associations => New_List (
Make_String_Literal (Loc,
- Repo_Id_String)))))))))));
-
- Insert_After (Declaration_Node (RAS_Type), Func_Decl);
- Append_To (Declarations, Func_Body);
-
- Set_Renaming_TSS (RAS_Type, Fnam, TSS_TypeCode);
+ Repo_Id_String))))))))))));
+ Set_TSS (RAS_Type, Fnam);
end Add_RAS_TypeCode;
-----------------------------------------
@@ -10783,17 +10706,13 @@ package body Exp_Dist is
procedure Specific_Add_RAST_Features
(Vis_Decl : Node_Id;
- RAS_Type : Entity_Id;
- Decls : List_Id)
- is
+ RAS_Type : Entity_Id) is
begin
case Get_PCS_Name is
when Name_PolyORB_DSA =>
- PolyORB_Support.Add_RAST_Features (
- Vis_Decl, RAS_Type, Decls);
+ PolyORB_Support.Add_RAST_Features (Vis_Decl, RAS_Type);
when others =>
- GARLIC_Support.Add_RAST_Features (
- Vis_Decl, RAS_Type, Decls);
+ GARLIC_Support.Add_RAST_Features (Vis_Decl, RAS_Type);
end case;
end Specific_Add_RAST_Features;
diff --git a/gcc/ada/exp_intr.adb b/gcc/ada/exp_intr.adb
index 1efd42bb6b3..b46b8f09c7d 100644
--- a/gcc/ada/exp_intr.adb
+++ b/gcc/ada/exp_intr.adb
@@ -26,11 +26,13 @@
with Atree; use Atree;
with Einfo; use Einfo;
+with Elists; use Elists;
with Errout; use Errout;
with Exp_Ch4; use Exp_Ch4;
with Exp_Ch7; use Exp_Ch7;
with Exp_Ch11; use Exp_Ch11;
with Exp_Code; use Exp_Code;
+with Exp_Disp; use Exp_Disp;
with Exp_Fixd; use Exp_Fixd;
with Exp_Util; use Exp_Util;
with Itypes; use Itypes;
@@ -61,6 +63,13 @@ package body Exp_Intr is
procedure Expand_Is_Negative (N : Node_Id);
-- Expand a call to the intrinsic Is_Negative function
+ procedure Expand_Dispatching_Constructor_Call (N : Node_Id);
+ -- Expand a call to an instantiation of Generic_Dispatching_Constructor
+ -- into a dispatching call to the actual subprogram associated with the
+ -- Constructor formal subprogram, passing it the Parameters actual of
+ -- the call to the instantiation and dispatching based on call's Tag
+ -- parameter.
+
procedure Expand_Exception_Call (N : Node_Id; Ent : RE_Id);
-- Expand a call to Exception_Information/Message/Name. The first
-- parameter, N, is the node for the function call, and Ent is the
@@ -96,6 +105,77 @@ package body Exp_Intr is
-- Name_Source_Location - expand string of form file:line
-- Name_Enclosing_Entity - expand string with name of enclosing entity
+ -----------------------------------------
+ -- Expand_Dispatching_Constructor_Call --
+ -----------------------------------------
+
+ -- Transform a call to an instantiation of Generic_Dispatching_Constructor
+ -- of the form:
+
+ -- GDC_Instance (The_Tag, Parameters'Access)
+
+ -- to a class-wide conversion of a dispatching call to the actual
+ -- associated with the formal subprogram Construct, designating
+ -- The_Tag as the controlling tag of the call:
+
+ -- T'Class (Construct'Actual (Params)) -- Controlling tag is The_Tag
+
+ -- which will eventually be expanded to the following:
+
+ -- T'Class (The_Tag.all (Construct'Actual'Index).all (Params))
+
+ -- A class-wide membership test is also generated, preceding the call,
+ -- to ensure that the controlling tag denotes a type in T'Class.
+
+ procedure Expand_Dispatching_Constructor_Call (N : Node_Id) is
+ Loc : constant Source_Ptr := Sloc (N);
+ Tag_Arg : constant Node_Id := First_Actual (N);
+ Param_Arg : constant Node_Id := Next_Actual (Tag_Arg);
+ Subp_Decl : constant Node_Id := Parent (Parent (Entity (Name (N))));
+ Inst_Pkg : constant Node_Id := Parent (Subp_Decl);
+ Act_Rename : constant Node_Id :=
+ Next (Next (First (Visible_Declarations (Inst_Pkg))));
+ Act_Constr : constant Entity_Id := Entity (Name (Act_Rename));
+ Result_Typ : constant Entity_Id := Class_Wide_Type (Etype (Act_Constr));
+ Cnstr_Call : Node_Id;
+
+ begin
+ -- Create the call to the actual Constructor function
+
+ Cnstr_Call :=
+ Make_Function_Call (Loc,
+ Name => New_Occurrence_Of (Act_Constr, Loc),
+ Parameter_Associations => New_List (Relocate_Node (Param_Arg)));
+
+ -- Establish its controlling tag from the tag passed to the instance
+
+ Set_Controlling_Argument (Cnstr_Call, Relocate_Node (Tag_Arg));
+
+ -- Rewrite and analyze the call to the instance as a class-wide
+ -- conversion of the call to the actual constructor.
+
+ Rewrite (N, Convert_To (Result_Typ, Cnstr_Call));
+ Analyze_And_Resolve (N, Etype (Act_Constr));
+
+ -- Generate a class-wide membership test to ensure that the call's tag
+ -- argument denotes a type within the class.
+
+ Insert_Action (N,
+ Make_Implicit_If_Statement (N,
+ Condition =>
+ Make_Op_Not (Loc,
+ Make_DT_Access_Action (Result_Typ,
+ Action => CW_Membership,
+ Args => New_List (
+ Duplicate_Subexpr (Tag_Arg),
+ New_Reference_To (
+ Node (First_Elmt (Access_Disp_Table (
+ Root_Type (Result_Typ)))), Loc)))),
+ Then_Statements =>
+ New_List (Make_Raise_Statement (Loc,
+ New_Occurrence_Of (RTE (RE_Tag_Error), Loc)))));
+ end Expand_Dispatching_Constructor_Call;
+
---------------------------
-- Expand_Exception_Call --
---------------------------
@@ -236,6 +316,9 @@ package body Exp_Intr is
elsif Nam = Name_Exception_Name then
Expand_Exception_Call (N, RE_Exception_Name_Simple);
+ elsif Nam = Name_Generic_Dispatching_Constructor then
+ Expand_Dispatching_Constructor_Call (N);
+
elsif Nam = Name_Import_Address
or else
Nam = Name_Import_Largest_Value
diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb
index 5ef5bae5138..4868dc1286e 100644
--- a/gcc/ada/exp_util.adb
+++ b/gcc/ada/exp_util.adb
@@ -2386,8 +2386,8 @@ package body Exp_Util is
-- component of the record, then the component may be unaligned.
if Is_Packed (Etype (P))
- and then Represented_As_Scalar (Etype (P))
- and then First_Entity (Etype (Entity (P))) /= C
+ and then Represented_As_Scalar (Etype (C))
+ and then First_Entity (Scope (C)) /= C
then
return True;
end if;
@@ -3212,7 +3212,7 @@ package body Exp_Util is
-- At the current time, the only types that we return False for (i.e.
-- where we decide we know they cannot generate large temps) are ones
- -- where we know the size is 128 bits or less at compile time, and we
+ -- where we know the size is 256 bits or less at compile time, and we
-- are still not doing a thorough job on arrays and records ???
function May_Generate_Large_Temp (Typ : Entity_Id) return Boolean is
@@ -3295,7 +3295,7 @@ package body Exp_Util is
E : Node_Id;
function Side_Effect_Free (N : Node_Id) return Boolean;
- -- Determines if the tree N represents an expession that is known
+ -- Determines if the tree N represents an expression that is known
-- not to have side effects, and for which no processing is required.
function Side_Effect_Free (L : List_Id) return Boolean;
@@ -3639,7 +3639,7 @@ package body Exp_Util is
elsif Nkind (Exp) = N_Unchecked_Type_Conversion
and then Nkind (Expression (Exp)) = N_Explicit_Dereference
then
- Remove_Side_Effects (Expression (Exp), Variable_Ref);
+ Remove_Side_Effects (Expression (Exp), Name_Req, Variable_Ref);
Scope_Suppress := Svg_Suppress;
return;
@@ -3647,7 +3647,7 @@ package body Exp_Util is
-- the side effects in the expression. This is important in several
-- circumstances: for change of representations, and also when this
-- is a view conversion to a smaller object, where gigi can end up
- -- its own temporary of the wrong size.
+ -- creating its own temporary of the wrong size.
-- ??? this transformation is inhibited for elementary types that are
-- not involved in a change of representation because it causes
@@ -3657,7 +3657,7 @@ package body Exp_Util is
and then (not Is_Elementary_Type (Underlying_Type (Exp_Type))
or else Nkind (Parent (Exp)) = N_Assignment_Statement)
then
- Remove_Side_Effects (Expression (Exp), Variable_Ref);
+ Remove_Side_Effects (Expression (Exp), Name_Req, Variable_Ref);
Scope_Suppress := Svg_Suppress;
return;
diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb
index 0fe2173a093..8ba5fe8a1f8 100644
--- a/gcc/ada/freeze.adb
+++ b/gcc/ada/freeze.adb
@@ -78,7 +78,7 @@ package body Freeze is
(Decl : Node_Id;
New_S : Entity_Id;
After : in out Node_Id);
- -- Build body for a renaming declaration, insert in tree and analyze.
+ -- Build body for a renaming declaration, insert in tree and analyze
procedure Check_Address_Clause (E : Entity_Id);
-- Apply legality checks to address clauses for object declarations,
@@ -393,7 +393,7 @@ package body Freeze is
Parameter_Associations => Actuals);
end if;
- -- Create entities for subprogram body and formals.
+ -- Create entities for subprogram body and formals
Set_Defining_Unit_Name (Spec,
Make_Defining_Identifier (Loc, Chars => Chars (New_S)));
@@ -1422,7 +1422,7 @@ package body Freeze is
procedure Check_Current_Instance (Comp_Decl : Node_Id) is
function Process (N : Node_Id) return Traverse_Result;
- -- Process routine to apply check to given node.
+ -- Process routine to apply check to given node
-------------
-- Process --
@@ -1530,29 +1530,35 @@ package body Freeze is
then
Set_First_Entity (Rec, First_Entity (Base_Type (Rec)));
- -- If this is an internal type without a declaration, as for a
+ -- If this is an internal type without a declaration, as for
-- record component, the base type may not yet be frozen, and its
-- controller has not been created. Add an explicit freeze node
- -- for the itype, so it will be frozen after the base type.
+ -- for the itype, so it will be frozen after the base type. This
+ -- freeze node is used to communicate with the expander, in order
+ -- to create the controller for the enclosing record, and it is
+ -- deleted afterwards (see exp_ch3). It must not be created when
+ -- expansion is off, because it might appear in the wrong context
+ -- for the back end.
elsif Is_Itype (Rec)
and then Has_Delayed_Freeze (Base_Type (Rec))
and then
Nkind (Associated_Node_For_Itype (Rec)) =
- N_Component_Declaration
+ N_Component_Declaration
+ and then Expander_Active
then
Ensure_Freeze_Node (Rec);
end if;
end if;
- -- Freeze components and embedded subtypes.
+ -- Freeze components and embedded subtypes
Comp := First_Entity (Rec);
Prev := Empty;
while Present (Comp) loop
- -- First handle the (real) component case.
+ -- First handle the (real) component case
if Ekind (Comp) = E_Component
or else Ekind (Comp) = E_Discriminant
@@ -3388,7 +3394,7 @@ package body Freeze is
Nam := Empty;
end if;
- -- For an allocator freeze designated type if not frozen already.
+ -- For an allocator freeze designated type if not frozen already
-- For an aggregate whose component type is an access type, freeze
-- the designated type now, so that its freeze does not appear within
@@ -4834,7 +4840,7 @@ package body Freeze is
Nam : Entity_Id)
is
Ent : constant Entity_Id := Entity (Nam);
- -- The object to which the address clause applies.
+ -- The object to which the address clause applies
Init : Node_Id;
Old : Entity_Id := Empty;
diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi
index 6ba0fd94e77..572be84140f 100644
--- a/gcc/ada/gnat_rm.texi
+++ b/gcc/ada/gnat_rm.texi
@@ -8,7 +8,7 @@
@c o
@c G N A T _ RM o
@c o
-@c Copyright (C) 1995-2004 Free Software Foundation o
+@c Copyright (C) 1995-2005 Free Software Foundation o
@c o
@c o
@c GNAT is maintained by Ada Core Technologies Inc (http://www.gnat.com). o
@@ -5156,24 +5156,18 @@ representation item for a given entity if each non-static expression in
the representation item is a name that statically denotes a constant
declared before the entity.
@end cartouche
-Followed. GNAT does not support non-static expressions in representation
-clauses unless they are constants declared before the entity. For
-example:
+Followed. In fact, GNAT goes beyond the recommended level of support
+by allowing nonstatic expressions in some representation clauses even
+without the need to declare constants initialized with the values of
+such expressions.
+For example:
@smallexample @c ada
-X : Some_Type;
-for X'Address use To_address (16#2000#);
+ X : Integer;
+ Y : Float;
+ for Y'Address use X'Address;>>
@end smallexample
-@noindent
-will be rejected, since the To_Address expression is non-static. Instead
-write:
-
-@smallexample @c ada
-X_Address : constant Address : = To_Address (16#2000#);
-X : Some_Type;
-for X'Address use X_Address;
-@end smallexample
@sp 1
@cartouche
diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi
index 246c9103112..1952011001c 100644
--- a/gcc/ada/gnat_ugn.texi
+++ b/gcc/ada/gnat_ugn.texi
@@ -4567,6 +4567,26 @@ This switch suppresses all optional warning messages, see remaining list
in this section for details on optional warning messages that can be
individually controlled.
+@item -gnatwb
+@emph{Activate warnings on bad fixed values.}
+@cindex @option{-gnatwb} (@command{gcc})
+@cindex Bad fixed values
+@cindex Fixed-point Small value
+@cindex Small value
+This switch activates warnings for static fixed-point expressions whose
+value is not an exact multiple of Small. Such values are implementation
+dependent, since an implementation is free to choose either of the multiples
+that surround the value. GNAT always chooses the closer one, but this is not
+required behavior, and it is better to specify a value that is an exact
+multiple, ensuring predictable execution. The default is that such warnings
+are not generated.
+
+@item -gnatwB
+@emph{Suppress warnings on bad fixed values.}
+@cindex @option{-gnatwB} (@command{gcc})
+This switch suppresses warnings for static fixed-point expressions whose
+value is not an exact multiple of Small.
+
@item -gnatwc
@emph{Activate warnings on conditionals.}
@cindex @option{-gnatwc} (@command{gcc})
@@ -5341,6 +5361,12 @@ example:
@end smallexample
@end itemize
+@item ^d^DOS_LINE_ENDINGS^
+@emph{Check no DOS line terminators present.}
+If the ^letter d^word NOCRLF^ appears in the string after @option{-gnaty}
+then all lines must be terminated by a single ASCII.LF character (in
+particular the DOS line terminator sequence CR/LF is not allowed).
+
@item ^e^END^
@emph{Check end/exit labels.}
If the ^letter e^word END^ appears in the string after @option{-gnaty} then
@@ -14646,7 +14672,8 @@ Align @code{:=} in assignment statements
Align @code{=>} in associations
@item ^-A5^/ALIGN=COMPONENT_CLAUSES^
-Align @code{at} keywords in the component clauses in record representation clauses
+Align @code{at} keywords in the component clauses in record
+representation clauses
@end table
@noindent
@@ -15420,8 +15447,9 @@ the casing defined by the dictionary; no subwords are checked for this word
@item
for every subword @command{gnatpp} checks if the dictionary contains the
-corresponding string of the form @code{*@var{simple_identifier}*}, and if it does, the
-casing of this @var{simple_identifier} is used for this subword
+corresponding string of the form @code{*@var{simple_identifier}*},
+and if it does, the casing of this @var{simple_identifier} is used
+for this subword
@item
if the whole name does not contain any ``_'' inside, and if for this name
diff --git a/gcc/ada/i-cpp.adb b/gcc/ada/i-cpp.adb
index 248d09ed157..ca872c2544d 100644
--- a/gcc/ada/i-cpp.adb
+++ b/gcc/ada/i-cpp.adb
@@ -187,18 +187,6 @@ package body Interfaces.CPP is
return True;
end CPP_Get_Remotely_Callable;
- -----------------
- -- CPP_Get_TSD --
- -----------------
-
- function CPP_Get_TSD (T : Vtable_Ptr) return Address is
- use type System.Storage_Elements.Storage_Offset;
- TSD_Ptr : constant Addr_Ptr :=
- To_Addr_Ptr (To_Address (T) - CPP_DT_Typeinfo_Ptr_Size);
- begin
- return TSD_Ptr.all;
- end CPP_Get_TSD;
-
--------------------
-- CPP_Inherit_DT --
--------------------
@@ -220,17 +208,15 @@ package body Interfaces.CPP is
---------------------
procedure CPP_Inherit_TSD
- (Old_TSD : Address;
+ (Old_Tag : Vtable_Ptr;
New_Tag : Vtable_Ptr)
is
- Old_TSD_Ptr : constant Type_Specific_Data_Ptr :=
- To_Type_Specific_Data_Ptr (Old_TSD);
-
- New_TSD_Ptr : constant Type_Specific_Data_Ptr :=
- TSD (New_Tag);
+ New_TSD_Ptr : constant Type_Specific_Data_Ptr := TSD (New_Tag);
+ Old_TSD_Ptr : Type_Specific_Data_Ptr;
begin
- if Old_TSD_Ptr /= null then
+ if Old_Tag /= null then
+ Old_TSD_Ptr := TSD (Old_Tag);
New_TSD_Ptr.Idepth := Old_TSD_Ptr.Idepth + 1;
New_TSD_Ptr.Ancestor_Tags (1 .. New_TSD_Ptr.Idepth) :=
Old_TSD_Ptr.Ancestor_Tags (0 .. Old_TSD_Ptr.Idepth);
@@ -391,8 +377,11 @@ package body Interfaces.CPP is
---------
function TSD (T : Vtable_Ptr) return Type_Specific_Data_Ptr is
+ use type System.Storage_Elements.Storage_Offset;
+ TSD_Ptr : constant Addr_Ptr :=
+ To_Addr_Ptr (To_Address (T) - CPP_DT_Typeinfo_Ptr_Size);
begin
- return To_Type_Specific_Data_Ptr (CPP_Get_TSD (T));
+ return To_Type_Specific_Data_Ptr (TSD_Ptr.all);
end TSD;
end Interfaces.CPP;
diff --git a/gcc/ada/i-cpp.ads b/gcc/ada/i-cpp.ads
index 62d57835b32..99922cf56ee 100644
--- a/gcc/ada/i-cpp.ads
+++ b/gcc/ada/i-cpp.ads
@@ -88,10 +88,6 @@ private
-- Given a pointer T to a dispatch Table, stores the address of the
-- record containing the Type Specific Data generated by GNAT
- function CPP_Get_TSD (T : Vtable_Ptr) return S.Address;
- -- Given a pointer T to a dispatch Table, retreives the address of the
- -- record containing the Type Specific Data generated by GNAT
-
CPP_DT_Prologue_Size : constant SSE.Storage_Count :=
SSE.Storage_Count
(2 * (Standard'Address_Size / S.Storage_Unit));
@@ -126,7 +122,7 @@ private
-- inherited (Entry_Count).
procedure CPP_Inherit_TSD
- (Old_TSD : S.Address;
+ (Old_Tag : Vtable_Ptr;
New_Tag : Vtable_Ptr);
-- Entry point used to initialize the TSD of a type knowing the
-- TSD of the direct ancestor.
@@ -172,9 +168,8 @@ private
-- (used for virtual function calls)
function TSD (T : Vtable_Ptr) return Type_Specific_Data_Ptr;
- -- This function is conceptually equivalent to Get_TSD, but
- -- returning a Type_Specific_Data_Ptr type (rather than an Address)
- -- simplifies the implementation of the other subprograms.
+ -- Given a pointer T to a dispatch Table, retreives the address of the
+ -- record containing the Type Specific Data generated by GNAT
type Addr_Ptr is access System.Address;
@@ -190,7 +185,6 @@ private
pragma Inline (CPP_Set_Prim_Op_Address);
pragma Inline (CPP_Get_Prim_Op_Address);
pragma Inline (CPP_Set_TSD);
- pragma Inline (CPP_Get_TSD);
pragma Inline (CPP_Inherit_DT);
pragma Inline (CPP_CW_Membership);
pragma Inline (CPP_Set_External_Tag);
diff --git a/gcc/ada/impunit.adb b/gcc/ada/impunit.adb
index 9aae8522193..f1303a2eb0a 100644
--- a/gcc/ada/impunit.adb
+++ b/gcc/ada/impunit.adb
@@ -363,6 +363,7 @@ package body Impunit is
"a-swunha", -- Ada.Strings.Wide_Unbounded.Hash
"a-szmzco", -- Ada.Strings.Wide_Wide_Maps.Wide_Wide_Constants;
"a-szunha", -- Ada.Strings.Wide_Wide_Unbounded.Hash
+ "a-tgdico", -- Ada.Tags.Generic_Dispatching_Constructor;
"a-tiunio", -- Ada.Text_IO.Unbounded_IO;
"a-wwunio", -- Ada.Wide_Text_IO.Wide_Unbounded_IO;
"a-zttest", -- Ada.Wide_Wide_Text_IO.Text_Streams
diff --git a/gcc/ada/make.adb b/gcc/ada/make.adb
index 9c115563a6c..563b7725519 100644
--- a/gcc/ada/make.adb
+++ b/gcc/ada/make.adb
@@ -3931,10 +3931,20 @@ package body Make is
All_Projects => Unique_Compile_All_Projects,
Into_Q => False);
- -- If there are no sources to compile, we fail
+ -- If no sources to compile, then there is nothing to do
if Osint.Number_Of_Files = 0 then
- Make_Failed ("no sources to compile");
+ if not Debug.Debug_Flag_N then
+ Delete_Mapping_Files;
+ Prj.Env.Delete_All_Path_Files (Project_Tree);
+ end if;
+
+ if not Quiet_Output then
+ Osint.Write_Program_Name;
+ Write_Line (": no sources to compile");
+ end if;
+
+ Exit_Program (E_Success);
end if;
end if;
diff --git a/gcc/ada/misc.c b/gcc/ada/misc.c
index 03b156c25a3..39feb1cc9c2 100644
--- a/gcc/ada/misc.c
+++ b/gcc/ada/misc.c
@@ -137,8 +137,6 @@ static tree gnat_type_max_size (tree);
#define LANG_HOOKS_EXPAND_EXPR gnat_expand_expr
#undef LANG_HOOKS_MARK_ADDRESSABLE
#define LANG_HOOKS_MARK_ADDRESSABLE gnat_mark_addressable
-#undef LANG_HOOKS_TRUTHVALUE_CONVERSION
-#define LANG_HOOKS_TRUTHVALUE_CONVERSION gnat_truthvalue_conversion
#undef LANG_HOOKS_PRINT_DECL
#define LANG_HOOKS_PRINT_DECL gnat_print_decl
#undef LANG_HOOKS_PRINT_TYPE
diff --git a/gcc/ada/mlib-tgt-vms-alpha.adb b/gcc/ada/mlib-tgt-vms-alpha.adb
index ca7596b22f9..ed713ca3984 100644
--- a/gcc/ada/mlib-tgt-vms-alpha.adb
+++ b/gcc/ada/mlib-tgt-vms-alpha.adb
@@ -160,8 +160,10 @@ package body MLib.Tgt is
-- Returns Symbol_File, if not empty. Otherwise, returns "symvec.opt"
function Version_String return String;
- -- Returns Lib_Version if not empty, otherwise returns "1".
- -- Fails gnatmake if Lib_Version is not the image of a positive number.
+ -- Returns Lib_Version if not empty and if Symbol_Data.Symbol_Policy is
+ -- not Autonomous, otherwise returns "".
+ -- When Symbol_Data.Symbol_Policy is Autonomous, fails gnatmake if
+ -- Lib_Version is not the image of a positive number.
------------------
-- Is_Interface --
@@ -215,8 +217,10 @@ package body MLib.Tgt is
function Version_String return String is
Version : Integer := 0;
begin
- if Lib_Version = "" then
- return "1";
+ if Lib_Version = ""
+ or else Symbol_Data.Symbol_Policy /= Autonomous
+ then
+ return "";
else
begin
diff --git a/gcc/ada/mlib-tgt-vms-ia64.adb b/gcc/ada/mlib-tgt-vms-ia64.adb
index d3fba7e708f..8dfbcc2ed80 100644
--- a/gcc/ada/mlib-tgt-vms-ia64.adb
+++ b/gcc/ada/mlib-tgt-vms-ia64.adb
@@ -160,8 +160,10 @@ package body MLib.Tgt is
-- Returns Symbol_File, if not empty. Otherwise, returns "symvec.opt"
function Version_String return String;
- -- Returns Lib_Version if not empty, otherwise returns "1".
- -- Fails gnatmake if Lib_Version is not the image of a positive number.
+ -- Returns Lib_Version if not empty and if Symbol_Data.Symbol_Policy is
+ -- not Autonomous, otherwise returns "".
+ -- When Symbol_Data.Symbol_Policy is Autonomous, fails gnatmake if
+ -- Lib_Version is not the image of a positive number.
------------------
-- Is_Interface --
@@ -215,8 +217,10 @@ package body MLib.Tgt is
function Version_String return String is
Version : Integer := 0;
begin
- if Lib_Version = "" then
- return "1";
+ if Lib_Version = ""
+ or else Symbol_Data.Symbol_Policy /= Autonomous
+ then
+ return "";
else
begin
diff --git a/gcc/ada/opt.ads b/gcc/ada/opt.ads
index 52f152203f3..29acc92567d 100644
--- a/gcc/ada/opt.ads
+++ b/gcc/ada/opt.ads
@@ -1025,6 +1025,11 @@ package Opt is
-- Set to True to get verbose mode (full error message text and location
-- information sent to standard output, also header, copyright and summary)
+ Warn_On_Bad_Fixed_Value : Boolean := False;
+ -- GNAT
+ -- Set to True to generate warnings for static fixed-point expression
+ -- values that are not an exact multiple of the small value of the type.
+
Warn_On_Constant : Boolean := False;
-- GNAT
-- Set to True to generate warnings for variables that could be declared
diff --git a/gcc/ada/par-ch10.adb b/gcc/ada/par-ch10.adb
index 50fa7e50cb4..bf76e4704b4 100644
--- a/gcc/ada/par-ch10.adb
+++ b/gcc/ada/par-ch10.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2004 Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2005 Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -1090,6 +1090,8 @@ package body Ch10 is
loop
exit when Loc = Token_Ptr;
+ -- Should we worry about UTF_32 line terminators here
+
if Source (Loc) in Line_Terminator then
Skip_Line_Terminators (Loc, Physical);
exit when Physical;
diff --git a/gcc/ada/par-ch12.adb b/gcc/ada/par-ch12.adb
index 56ec4a15f39..ae6b6cd48d5 100644
--- a/gcc/ada/par-ch12.adb
+++ b/gcc/ada/par-ch12.adb
@@ -153,7 +153,11 @@ package body Ch12 is
Decl_Loop : loop
P_Pragmas_Opt (Decls);
- Ignore (Tok_Private);
+
+ if Token = Tok_Private then
+ Error_Msg_S ("generic private child packages not permitted");
+ Scan; -- past PRIVATE
+ end if;
if Token = Tok_Use then
Append (P_Use_Clause, Decls);
diff --git a/gcc/ada/par-ch3.adb b/gcc/ada/par-ch3.adb
index d28f1a9a07d..0c02ff7d035 100644
--- a/gcc/ada/par-ch3.adb
+++ b/gcc/ada/par-ch3.adb
@@ -279,8 +279,29 @@ package body Ch3 is
begin
Type_Loc := Token_Ptr;
Type_Start_Col := Start_Column;
- T_Type;
- Ident_Node := P_Defining_Identifier (C_Is);
+
+ -- If we have TYPE, then proceed ahead and scan identifier
+
+ if Token = Tok_Type then
+ Scan; -- past TYPE
+ Ident_Node := P_Defining_Identifier (C_Is);
+
+ -- Otherwise this is an error case, and we may already have converted
+ -- the current token to a defining identifier, so don't do it again!
+
+ else
+ T_Type;
+
+ if Token = Tok_Identifier
+ and then Nkind (Token_Node) = N_Defining_Identifier
+ then
+ Ident_Node := Token_Node;
+ Scan; -- past defining identifier
+ else
+ Ident_Node := P_Defining_Identifier (C_Is);
+ end if;
+ end if;
+
Discr_Sloc := Token_Ptr;
if P_Unknown_Discriminant_Part_Opt then
@@ -586,7 +607,14 @@ package body Ch3 is
-- Ada 2005 (AI-251): LIMITED INTERFACE
- elsif Token = Tok_Interface then
+ -- If we are compiling in Ada 83 or Ada 95 mode, "interface"
+ -- is not a reserved word but we force its analysis to
+ -- generate the corresponding usage error.
+
+ elsif Token = Tok_Interface
+ or else (Token = Tok_Identifier
+ and then Chars (Token_Node) = Name_Interface)
+ then
Typedef_Node := P_Interface_Type_Definition
(Is_Synchronized => False);
Abstract_Present := True;
diff --git a/gcc/ada/par-ch4.adb b/gcc/ada/par-ch4.adb
index 5826606352e..a013c23ae2a 100644
--- a/gcc/ada/par-ch4.adb
+++ b/gcc/ada/par-ch4.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2004 Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2005 Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -402,8 +402,25 @@ package body Ch4 is
if Apostrophe_Should_Be_Semicolon then
Expr_Form := EF_Name;
return Name_Node;
+
+ -- Here for a bad attribute name
+
else
Signal_Bad_Attribute;
+ Scan; -- past bad identifier
+
+ if Token = Tok_Left_Paren then
+ Scan; -- past left paren
+
+ loop
+ Discard_Junk_Node (P_Expression);
+ exit when not Comma_Present;
+ end loop;
+
+ T_Right_Paren;
+ end if;
+
+ return Error;
end if;
end if;
diff --git a/gcc/ada/prj-nmsc.adb b/gcc/ada/prj-nmsc.adb
index 6c814a990fd..fcdaf67c251 100644
--- a/gcc/ada/prj-nmsc.adb
+++ b/gcc/ada/prj-nmsc.adb
@@ -2466,32 +2466,6 @@ package body Prj.Nmsc is
Lib_Ref_Symbol_File.Location);
end if;
- -- Check that the reference symbol file and the symbol file
- -- are not the same file.
-
- if Data.Symbol_Data.Symbol_File /= No_Name then
- declare
- Symbol : String :=
- Get_Name_String
- (Data.Symbol_Data.Symbol_File);
-
- Reference : String :=
- Get_Name_String
- (Data.Symbol_Data.Reference);
-
- begin
- Canonical_Case_File_Name (Symbol);
- Canonical_Case_File_Name (Reference);
-
- if Symbol = Reference then
- Error_Msg
- (Project, In_Tree,
- "reference symbol file and symbol file " &
- "cannot be the same file",
- Lib_Ref_Symbol_File.Location);
- end if;
- end;
- end if;
end if;
end if;
end if;
diff --git a/gcc/ada/prj-part.adb b/gcc/ada/prj-part.adb
index 54d2812d7a6..1b100843b42 100644
--- a/gcc/ada/prj-part.adb
+++ b/gcc/ada/prj-part.adb
@@ -1068,8 +1068,8 @@ package body Prj.Part is
-- Mark location of PROJECT token if present
if Token = Tok_Project then
+ Scan (In_Tree); -- scan past PROJECT
Set_Location_Of (Project, In_Tree, Token_Ptr);
- Scan (In_Tree); -- scan past project
end if;
-- Clear the Buffer
diff --git a/gcc/ada/prj-proc.adb b/gcc/ada/prj-proc.adb
index ed3a8b91c16..7ccd5750cf3 100644
--- a/gcc/ada/prj-proc.adb
+++ b/gcc/ada/prj-proc.adb
@@ -33,6 +33,7 @@ with Prj.Attr; use Prj.Attr;
with Prj.Err; use Prj.Err;
with Prj.Ext; use Prj.Ext;
with Prj.Nmsc; use Prj.Nmsc;
+with Sinput; use Sinput;
with Snames;
with GNAT.Case_Util; use GNAT.Case_Util;
@@ -781,14 +782,31 @@ package body Prj.Proc is
Default : Name_Id := No_Name;
Value : Name_Id := No_Name;
+ Def_Var : Variable_Value;
+
Default_Node : constant Project_Node_Id :=
External_Default_Of
(The_Current_Term, From_Project_Node_Tree);
begin
+ -- If there is a default value for the external reference,
+ -- get its value.
+
if Default_Node /= Empty_Node then
- Default :=
- String_Value_Of (Default_Node, From_Project_Node_Tree);
+ Def_Var := Expression
+ (Project => Project,
+ In_Tree => In_Tree,
+ From_Project_Node => Default_Node,
+ From_Project_Node_Tree => From_Project_Node_Tree,
+ Pkg => Pkg,
+ First_Term =>
+ Tree.First_Term
+ (Default_Node, From_Project_Node_Tree),
+ Kind => Single);
+
+ if Def_Var /= Nil_Variable_Value then
+ Default := Def_Var.Value;
+ end if;
end if;
Value := Prj.Ext.Value_Of (Name, Default);
@@ -1057,11 +1075,12 @@ package body Prj.Proc is
Obj_Dir
then
if In_Tree.Projects.Table (Extending2).Virtual then
- Error_Msg_Name_1 := In_Tree.Projects.Table (Proj).Name;
+ Error_Msg_Name_1 :=
+ In_Tree.Projects.Table (Proj).Display_Name;
if Error_Report = null then
Error_Msg
- ("project % cannot be extended by a virtual " &
+ ("project { cannot be extended by a virtual " &
"project with the same object directory",
In_Tree.Projects.Table (Proj).Location);
else
@@ -1075,13 +1094,13 @@ package body Prj.Proc is
else
Error_Msg_Name_1 :=
- In_Tree.Projects.Table (Extending2).Name;
+ In_Tree.Projects.Table (Extending2).Display_Name;
Error_Msg_Name_2 :=
- In_Tree.Projects.Table (Proj).Name;
+ In_Tree.Projects.Table (Proj).Display_Name;
if Error_Report = null then
Error_Msg
- ("project % cannot extend project %",
+ ("project { cannot extend project {",
In_Tree.Projects.Table (Extending2).Location);
Error_Msg
("\they share the same object directory",
@@ -2158,8 +2177,14 @@ package body Prj.Proc is
Processed_Data : Project_Data := Empty_Project (In_Tree);
Imported : Project_List := Empty_Project_List;
Declaration_Node : Project_Node_Id := Empty_Node;
+ Tref : Source_Buffer_Ptr;
Name : constant Name_Id :=
- Name_Of (From_Project_Node, From_Project_Node_Tree);
+ Name_Of
+ (From_Project_Node, From_Project_Node_Tree);
+ Location : Source_Ptr :=
+ Location_Of
+ (From_Project_Node, From_Project_Node_Tree);
+
begin
Project := Processed_Projects.Get (Name);
@@ -2184,6 +2209,26 @@ package body Prj.Proc is
Virtual_Prefix
then
Processed_Data.Virtual := True;
+ Processed_Data.Display_Name := Name;
+
+ -- If there is no file, for example when the project node tree is
+ -- built in memory by GPS, the Display_Name cannot be found in
+ -- the source, so its value is the same as Name.
+
+ elsif Location = No_Location then
+ Processed_Data.Display_Name := Name;
+
+ -- Get the spelling of the project name from the project file
+
+ else
+ Tref := Source_Text (Get_Source_File_Index (Location));
+
+ for J in 1 .. Name_Len loop
+ Name_Buffer (J) := Tref (Location);
+ Location := Location + 1;
+ end loop;
+
+ Processed_Data.Display_Name := Name_Find;
end if;
Processed_Data.Display_Path_Name :=
diff --git a/gcc/ada/prj-strt.adb b/gcc/ada/prj-strt.adb
index ae7941c203b..91539e94083 100644
--- a/gcc/ada/prj-strt.adb
+++ b/gcc/ada/prj-strt.adb
@@ -106,8 +106,10 @@ package body Prj.Strt is
-- Add one single names to table Names
procedure External_Reference
- (In_Tree : Project_Node_Tree_Ref;
- External_Value : out Project_Node_Id);
+ (In_Tree : Project_Node_Tree_Ref;
+ Current_Project : Project_Node_Id;
+ Current_Package : Project_Node_Id;
+ External_Value : out Project_Node_Id);
-- Parse an external reference. Current token is "external".
procedure Attribute_Reference
@@ -341,8 +343,10 @@ package body Prj.Strt is
------------------------
procedure External_Reference
- (In_Tree : Project_Node_Tree_Ref;
- External_Value : out Project_Node_Id)
+ (In_Tree : Project_Node_Tree_Ref;
+ Current_Project : Project_Node_Id;
+ Current_Package : Project_Node_Id;
+ External_Value : out Project_Node_Id)
is
Field_Id : Project_Node_Id := Empty_Node;
@@ -397,24 +401,31 @@ package body Prj.Strt is
Scan (In_Tree);
- Expect (Tok_String_Literal, "literal string");
+ -- Get the string expression for the default
- -- Get the default
+ declare
+ Loc : constant Source_Ptr := Token_Ptr;
- if Token = Tok_String_Literal then
- Field_Id :=
- Default_Project_Node
- (Of_Kind => N_Literal_String,
- In_Tree => In_Tree,
- And_Expr_Kind => Single);
- Set_String_Value_Of (Field_Id, In_Tree, To => Token_Name);
- Set_External_Default_Of
- (External_Value, In_Tree, To => Field_Id);
- Scan (In_Tree);
- Expect (Tok_Right_Paren, "`)`");
- end if;
+ begin
+ Parse_Expression
+ (In_Tree => In_Tree,
+ Expression => Field_Id,
+ Current_Project => Current_Project,
+ Current_Package => Current_Package,
+ Optional_Index => False);
+
+ if Expression_Kind_Of (Field_Id, In_Tree) = List then
+ Error_Msg ("expression must be a single string", Loc);
+ else
+ Set_External_Default_Of
+ (External_Value, In_Tree, To => Field_Id);
+ end if;
+ end;
+
+ Expect (Tok_Right_Paren, "`)`");
-- Scan past the right parenthesis
+
if Token = Tok_Right_Paren then
Scan (In_Tree);
end if;
@@ -1417,7 +1428,10 @@ package body Prj.Strt is
end if;
External_Reference
- (In_Tree => In_Tree, External_Value => Reference);
+ (In_Tree => In_Tree,
+ Current_Project => Current_Project,
+ Current_Package => Current_Package,
+ External_Value => Reference);
Set_Current_Term (Term, In_Tree, To => Reference);
when others =>
diff --git a/gcc/ada/prj.adb b/gcc/ada/prj.adb
index 37237d36b27..83dab6944b9 100644
--- a/gcc/ada/prj.adb
+++ b/gcc/ada/prj.adb
@@ -90,6 +90,7 @@ package body Prj is
Supp_Languages => No_Supp_Language_Index,
First_Referred_By => No_Project,
Name => No_Name,
+ Display_Name => No_Name,
Path_Name => No_Name,
Display_Path_Name => No_Name,
Virtual => False,
@@ -227,9 +228,10 @@ package body Prj is
-------------------
function Empty_Project (Tree : Project_Tree_Ref) return Project_Data is
- Value : Project_Data := Project_Empty;
+ Value : Project_Data;
begin
Prj.Initialize (Tree => No_Project_Tree);
+ Value := Project_Empty;
Value.Naming := Tree.Private_Part.Default_Naming;
return Value;
end Empty_Project;
diff --git a/gcc/ada/prj.ads b/gcc/ada/prj.ads
index aa58c2f5eb2..cfe0da08f75 100644
--- a/gcc/ada/prj.ads
+++ b/gcc/ada/prj.ads
@@ -422,7 +422,7 @@ package Prj is
Attributes => No_Variable,
Arrays => No_Array,
Packages => No_Package);
- -- Default value of Declarations: indicates that there is no declarations.
+ -- Default value of Declarations: indicates that there is no declarations
type Package_Element is record
Name : Name_Id := No_Name;
@@ -430,7 +430,7 @@ package Prj is
Parent : Package_Id := No_Package;
Next : Package_Id := No_Package;
end record;
- -- A package. Includes declarations that may include other packages.
+ -- A package. Includes declarations that may include other packages
package Package_Table is new GNAT.Dynamic_Tables
(Table_Component_Type => Package_Element,
@@ -438,7 +438,7 @@ package Prj is
Table_Low_Bound => 1,
Table_Initial => 100,
Table_Increment => 100);
- -- The table that contains all packages.
+ -- The table that contains all packages
function Image (Casing : Casing_Type) return String;
-- Similar to 'Image (but avoid use of this attribute in compiler)
@@ -452,14 +452,14 @@ package Prj is
type Naming_Data is record
Dot_Replacement : Name_Id := No_Name;
- -- The string to replace '.' in the source file name (for Ada).
+ -- The string to replace '.' in the source file name (for Ada)
Dot_Repl_Loc : Source_Ptr := No_Location;
- -- The position in the project file source where
- -- Dot_Replacement is defined.
+ -- The position in the project file source where Dot_Replacement is
+ -- defined.
Casing : Casing_Type := All_Lower_Case;
- -- The casing of the source file name (for Ada).
+ -- The casing of the source file name (for Ada)
Spec_Suffix : Array_Element_Id := No_Array_Element;
-- The string to append to the unit name for the
@@ -490,17 +490,17 @@ package Prj is
-- Ada_Body_Suffix is defined.
Separate_Suffix : Name_Id := No_Name;
- -- String to append to unit name for source file name of an Ada subunit.
+ -- String to append to unit name for source file name of an Ada subunit
Sep_Suffix_Loc : Source_Ptr := No_Location;
- -- Position in the project file source where Separate_Suffix is defined.
+ -- Position in the project file source where Separate_Suffix is defined
Specs : Array_Element_Id := No_Array_Element;
- -- An associative array mapping individual specs to source file names.
+ -- An associative array mapping individual specs to source file names
-- This is specific to Ada.
Bodies : Array_Element_Id := No_Array_Element;
- -- An associative array mapping individual bodies to source file names.
+ -- An associative array mapping individual bodies to source file names
-- This is specific to Ada.
Specification_Exceptions : Array_Element_Id := No_Array_Element;
@@ -554,15 +554,18 @@ package Prj is
-- Indicate the different languages of the source of this project
First_Referred_By : Project_Id := No_Project;
- -- The project, if any, that was the first to be known
- -- as importing or extending this project.
- -- Set by Prj.Proc.Process.
+ -- The project, if any, that was the first to be known as importing or
+ -- extending this project. Set by Prj.Proc.Process.
Name : Name_Id := No_Name;
- -- The name of the project. Set by Prj.Proc.Process.
+ -- The name of the project. Set by Prj.Proc.Process
+
+ Display_Name : Name_Id := No_Name;
+ -- The name of the project with the spelling of its declaration.
+ -- Set by Prj.Proc.Process.
Path_Name : Name_Id := No_Name;
- -- The path name of the project file. Set by Prj.Proc.Process.
+ -- The path name of the project file. Set by Prj.Proc.Process
Display_Path_Name : Name_Id := No_Name;
-- The path name used for display purposes. May be different from
@@ -576,36 +579,36 @@ package Prj is
-- project. Set by Prj.Proc.Process.
Mains : String_List_Id := Nil_String;
- -- List of mains specified by attribute Main. Set by Prj.Nmsc.Check.
+ -- List of mains specified by attribute Main. Set by Prj.Nmsc.Check
Directory : Name_Id := No_Name;
- -- Directory where the project file resides. Set by Prj.Proc.Process.
+ -- Directory where the project file resides. Set by Prj.Proc.Process
Display_Directory : Name_Id := No_Name;
Dir_Path : String_Access;
- -- Same as Directory, but as an access to String.
- -- Set by Make.Compile_Sources.Collect_Arguments_And_Compile.
+ -- Same as Directory, but as an access to String. Set by
+ -- Make.Compile_Sources.Collect_Arguments_And_Compile.
Library : Boolean := False;
- -- True if this is a library project.
- -- Set by Prj.Nmsc.Language_Independent_Check.
+ -- True if this is a library project. Set by
+ -- Prj.Nmsc.Language_Independent_Check.
Library_Dir : Name_Id := No_Name;
- -- If a library project, directory where resides the library
- -- Set by Prj.Nmsc.Language_Independent_Check.
+ -- If a library project, directory where resides the library Set by
+ -- Prj.Nmsc.Language_Independent_Check.
Display_Library_Dir : Name_Id := No_Name;
- -- The name of the library directory, for display purposes.
- -- May be different from Library_Dir for platforms where the file names
- -- are case-insensitive.
+ -- The name of the library directory, for display purposes. May be
+ -- different from Library_Dir for platforms where the file names are
+ -- case-insensitive.
Library_Src_Dir : Name_Id := No_Name;
-- If a library project, directory where the sources and the ALI files
-- of the library are copied. By default, if attribute Library_Src_Dir
-- is not specified, sources are not copied anywhere and ALI files are
- -- copied in the Library Directory.
- -- Set by Prj.Nmsc.Language_Independent_Check.
+ -- copied in the Library Directory. Set by
+ -- Prj.Nmsc.Language_Independent_Check.
Display_Library_Src_Dir : Name_Id := No_Name;
-- The name of the library source directory, for display purposes.
@@ -621,16 +624,16 @@ package Prj is
-- Set by Prj.Nmsc.Language_Independent_Check.
Lib_Internal_Name : Name_Id := No_Name;
- -- If a library project, internal name store inside the library
- -- Set by Prj.Nmsc.Language_Independent_Check.
+ -- If a library project, internal name store inside the library Set by
+ -- Prj.Nmsc.Language_Independent_Check.
Standalone_Library : Boolean := False;
- -- Indicate that this is a Standalone Library Project File.
- -- Set by Prj.Nmsc.Check.
+ -- Indicate that this is a Standalone Library Project File. Set by
+ -- Prj.Nmsc.Check.
Lib_Interface_ALIs : String_List_Id := Nil_String;
- -- For Standalone Library Project Files, indicate the list
- -- of Interface ALI files. Set by Prj.Nmsc.Check.
+ -- For Standalone Library Project Files, indicate the list of Interface
+ -- ALI files. Set by Prj.Nmsc.Check.
Lib_Auto_Init : Boolean := False;
-- For non static Standalone Library Project Files, indicate if
@@ -691,17 +694,17 @@ package Prj is
-- Object_Directory. Set by Prj.Nmsc.Language_Independent_Check.
Display_Exec_Dir : Name_Id := No_Name;
- -- The name of the exec directory, for display purposes.
- -- May be different from Exec_Directory for platforms where the file
- -- names are case-insensitive.
+ -- The name of the exec directory, for display purposes. May be
+ -- different from Exec_Directory for platforms where the file names are
+ -- case-insensitive.
Extends : Project_Id := No_Project;
- -- The reference of the project file, if any, that this
- -- project file extends. Set by Prj.Proc.Process.
+ -- The reference of the project file, if any, that this project file
+ -- extends. Set by Prj.Proc.Process.
Extended_By : Project_Id := No_Project;
- -- The reference of the project file, if any, that
- -- extends this project file. Set by Prj.Proc.Process.
+ -- The reference of the project file, if any, that extends this project
+ -- file. Set by Prj.Proc.Process.
Naming : Naming_Data := Standard_Naming_Data;
-- The naming scheme of this project file.
@@ -721,17 +724,17 @@ package Prj is
-- project file. Set by Prj.Proc.Process.
Imported_Projects : Project_List := Empty_Project_List;
- -- The list of all directly imported projects, if any.
- -- Set by Prj.Proc.Process.
+ -- The list of all directly imported projects, if any. Set by
+ -- Prj.Proc.Process.
Ada_Include_Path : String_Access := null;
- -- The cached value of ADA_INCLUDE_PATH for this project file.
- -- Do not use this field directly outside of the compiler, use
+ -- The cached value of ADA_INCLUDE_PATH for this project file. Do not
+ -- use this field directly outside of the compiler, use
-- Prj.Env.Ada_Include_Path instead. Set by Prj.Env.Ada_Include_Path.
Ada_Objects_Path : String_Access := null;
- -- The cached value of ADA_OBJECTS_PATH for this project file.
- -- Do not use this field directly outside of the compiler, use
+ -- The cached value of ADA_OBJECTS_PATH for this project file. Do not
+ -- use this field directly outside of the compiler, use
-- Prj.Env.Ada_Objects_Path instead. Set by Prj.Env.Ada_Objects_Path
Include_Path_File : Name_Id := No_Name;
@@ -791,7 +794,7 @@ package Prj is
-- The project tree Tree must have been Initialized and/or Reset.
Project_Error : exception;
- -- Raised by some subprograms in Prj.Attr.
+ -- Raised by some subprograms in Prj.Attr
package Project_Table is new GNAT.Dynamic_Tables (
Table_Component_Type => Project_Data,
@@ -813,7 +816,7 @@ package Prj is
Project : Project_Id := No_Project;
Needs_Pragma : Boolean := False;
end record;
- -- File and Path name of a spec or body.
+ -- File and Path name of a spec or body
type File_Names_Data is array (Spec_Or_Body) of File_Name_Data;
diff --git a/gcc/ada/rtsfind.ads b/gcc/ada/rtsfind.ads
index fed85c92351..1697b359640 100644
--- a/gcc/ada/rtsfind.ads
+++ b/gcc/ada/rtsfind.ads
@@ -492,7 +492,6 @@ package Rtsfind is
RE_Get_Prim_Op_Address, -- Ada.Tags
RE_Get_RC_Offset, -- Ada.Tags
RE_Get_Remotely_Callable, -- Ada.Tags
- RE_Get_TSD, -- Ada.Tags
RE_Inherit_DT, -- Ada.Tags
RE_Inherit_TSD, -- Ada.Tags
RE_Internal_Tag, -- Ada.Tags
@@ -539,7 +538,6 @@ package Rtsfind is
RE_CPP_Get_Prim_Op_Address, -- Interfaces.CPP
RE_CPP_Get_RC_Offset, -- Interfaces.CPP
RE_CPP_Get_Remotely_Callable, -- Interfaces.CPP
- RE_CPP_Get_TSD, -- Interfaces.CPP
RE_CPP_Inherit_DT, -- Interfaces.CPP
RE_CPP_Inherit_TSD, -- Interfaces.CPP
RE_CPP_Register_Tag, -- Interfaces.CPP
@@ -1592,7 +1590,6 @@ package Rtsfind is
RE_Get_Prim_Op_Address => Ada_Tags,
RE_Get_RC_Offset => Ada_Tags,
RE_Get_Remotely_Callable => Ada_Tags,
- RE_Get_TSD => Ada_Tags,
RE_Inherit_DT => Ada_Tags,
RE_Inherit_TSD => Ada_Tags,
RE_Internal_Tag => Ada_Tags,
@@ -1637,7 +1634,6 @@ package Rtsfind is
RE_CPP_Get_Prim_Op_Address => Interfaces_CPP,
RE_CPP_Get_RC_Offset => Interfaces_CPP,
RE_CPP_Get_Remotely_Callable => Interfaces_CPP,
- RE_CPP_Get_TSD => Interfaces_CPP,
RE_CPP_Inherit_DT => Interfaces_CPP,
RE_CPP_Inherit_TSD => Interfaces_CPP,
RE_CPP_Register_Tag => Interfaces_CPP,
diff --git a/gcc/ada/s-taprop-tru64.adb b/gcc/ada/s-taprop-tru64.adb
index 6667899fed9..9a0bba98c9c 100644
--- a/gcc/ada/s-taprop-tru64.adb
+++ b/gcc/ada/s-taprop-tru64.adb
@@ -612,7 +612,11 @@ package body System.Task_Primitives.Operations is
function RT_Resolution return Duration is
begin
- return 1.0 / 1024.0; -- Clock on DEC Alpha ticks at 1024 Hz
+ -- Returned value must be an integral multiple of Duration'Small (1 ns)
+ -- The following is the best approximation of 1/1024. The clock on the
+ -- DEC Alpha ticks at 1024 Hz.
+
+ return 0.000_976_563;
end RT_Resolution;
------------
diff --git a/gcc/ada/scng.adb b/gcc/ada/scng.adb
index 5621ff602ba..13ef75c88ee 100644
--- a/gcc/ada/scng.adb
+++ b/gcc/ada/scng.adb
@@ -342,8 +342,14 @@ package body Scng is
Len : constant Int := Int (Scan_Ptr) - Int (Current_Line_Start);
begin
- if Style_Check and Style_Check_Max_Line_Length then
+ if Style_Check then
Style.Check_Line_Terminator (Len);
+ end if;
+
+ -- Deal with checking maximum line length
+
+ if Style_Check and Style_Check_Max_Line_Length then
+ Style.Check_Line_Max_Length (Len);
-- If style checking is inactive, check maximum line length against
-- standard value. Note that we take this from Opt.Max_Line_Length
diff --git a/gcc/ada/sem_cat.adb b/gcc/ada/sem_cat.adb
index 44d5f597467..a17521cad9d 100644
--- a/gcc/ada/sem_cat.adb
+++ b/gcc/ada/sem_cat.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2004, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -1529,13 +1529,22 @@ package body Sem_Cat is
if Is_Remote_Access_To_Subprogram_Type (E)
and then not Is_Remote_Access_To_Subprogram_Type (S)
then
- Error_Msg_N ("incorrect conversion of remote operand", N);
+ Error_Msg_N
+ ("incorrect conversion of remote operand to local type", N);
+ return;
+
+ elsif not Is_Remote_Access_To_Subprogram_Type (E)
+ and then Is_Remote_Access_To_Subprogram_Type (S)
+ then
+ Error_Msg_N
+ ("incorrect conversion of local operand to remote type", N);
return;
elsif Is_Remote_Access_To_Class_Wide_Type (E)
and then not Is_Remote_Access_To_Class_Wide_Type (S)
then
- Error_Msg_N ("incorrect conversion of remote operand", N);
+ Error_Msg_N
+ ("incorrect conversion of remote operand to local type", N);
return;
end if;
diff --git a/gcc/ada/sem_ch11.adb b/gcc/ada/sem_ch11.adb
index 79dab061c25..afd72c13bd6 100644
--- a/gcc/ada/sem_ch11.adb
+++ b/gcc/ada/sem_ch11.adb
@@ -401,7 +401,7 @@ package body Sem_Ch11 is
("?assignment to pass-by-copy formal may have no effect",
P);
Error_Msg_N
- ("\?RAISE statement is abnormal return" &
+ ("\?RAISE statement may result in abnormal return" &
" ('R'M 6.4.1(17))", P);
end if;
end if;
diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb
index a7931e9c0ac..88035b8a1f4 100644
--- a/gcc/ada/sem_ch4.adb
+++ b/gcc/ada/sem_ch4.adb
@@ -1197,7 +1197,7 @@ package body Sem_Ch4 is
end if;
end Is_Function_Type;
- -- Start of processing for Analyze_Explicit_Deference
+ -- Start of processing for Analyze_Explicit_Dereference
begin
Analyze (P);
@@ -1251,8 +1251,6 @@ package body Sem_Ch4 is
Get_Next_Interp (I, It);
end loop;
- End_Interp_List;
-
-- Error if no interpretation of the prefix has an access type
if Etype (N) = Any_Type then
@@ -1281,10 +1279,11 @@ package body Sem_Ch4 is
then
-- Name is a function call with no actuals, in a context that
-- requires deproceduring (including as an actual in an enclosing
- -- function or procedure call). We can conceive of pathological cases
+ -- function or procedure call). There are some pathological cases
-- where the prefix might include functions that return access to
-- subprograms and others that return a regular type. Disambiguation
- -- of those will have to take place in Resolve. See e.g. 7117-014.
+ -- of those has to take place in Resolve.
+ -- See e.g. 7117-014 and E317-001.
New_N :=
Make_Function_Call (Loc,
@@ -1311,6 +1310,25 @@ package body Sem_Ch4 is
Rewrite (N, New_N);
Analyze (N);
+
+ elsif not Is_Function_Type
+ and then Is_Overloaded (N)
+ then
+ -- The prefix may include access to subprograms and other access
+ -- types. If the context selects the interpretation that is a call,
+ -- we cannot rewrite the node yet, but we include the result of
+ -- the call interpretation.
+
+ Get_First_Interp (N, I, It);
+ while Present (It.Nam) loop
+ if Ekind (Base_Type (It.Typ)) = E_Subprogram_Type
+ and then Etype (Base_Type (It.Typ)) /= Standard_Void_Type
+ then
+ Add_One_Interp (N, Etype (It.Typ), Etype (It.Typ));
+ end if;
+
+ Get_Next_Interp (I, It);
+ end loop;
end if;
-- A value of remote access-to-class-wide must not be dereferenced
@@ -2652,14 +2670,20 @@ package body Sem_Ch4 is
then
Set_Etype (N, Etype (Comp));
- -- In all other cases, we currently build an actual subtype. It
- -- seems likely that many of these cases can be avoided, but
- -- right now, the front end makes direct references to the
+ -- If full analysis is not enabled, we do not generate an
+ -- actual subtype, because in the absence of expansion
+ -- reference to a formal of a protected type, for example,
+ -- will not be properly transformed, and will lead to
+ -- out-of-scope references in gigi.
+
+ -- In all other cases, we currently build an actual subtype.
+ -- It seems likely that many of these cases can be avoided,
+ -- but right now, the front end makes direct references to the
-- bounds (e.g. in generating a length check), and if we do
-- not make an actual subtype, we end up getting a direct
- -- reference to a discriminant which will not do.
+ -- reference to a discriminant, which will not do.
- else
+ elsif Full_Analysis then
Act_Decl :=
Build_Actual_Subtype_Of_Component (Etype (Comp), N);
Insert_Action (N, Act_Decl);
@@ -2681,6 +2705,11 @@ package body Sem_Ch4 is
Set_Etype (N, Subt);
end;
end if;
+
+ -- If Full_Analysis not enabled, just set the Etype
+
+ else
+ Set_Etype (N, Etype (Comp));
end if;
return;
@@ -2697,17 +2726,17 @@ package body Sem_Ch4 is
then
return;
- -- If the transformation fails, it will be necessary
- -- to redo the analysis with all errors enabled, to indicate
- -- candidate interpretations and reasons for each failure ???
+ -- If the transformation fails, it will be necessary to redo the
+ -- analysis with all errors enabled, to indicate candidate
+ -- interpretations and reasons for each failure ???
end if;
elsif Is_Private_Type (Prefix_Type) then
- -- Allow access only to discriminants of the type. If the
- -- type has no full view, gigi uses the parent type for
- -- the components, so we do the same here.
+ -- Allow access only to discriminants of the type. If the type has
+ -- no full view, gigi uses the parent type for the components, so we
+ -- do the same here.
if No (Full_View (Prefix_Type)) then
Entity_List := Root_Type (Base_Type (Prefix_Type));
@@ -2747,11 +2776,11 @@ package body Sem_Ch4 is
elsif Is_Concurrent_Type (Prefix_Type) then
-- Prefix is concurrent type. Find visible operation with given name
- -- For a task, this can only include entries or discriminants if
- -- the task type is not an enclosing scope. If it is an enclosing
- -- scope (e.g. in an inner task) then all entities are visible, but
- -- the prefix must denote the enclosing scope, i.e. can only be
- -- a direct name or an expanded name.
+ -- For a task, this can only include entries or discriminants if the
+ -- task type is not an enclosing scope. If it is an enclosing scope
+ -- (e.g. in an inner task) then all entities are visible, but the
+ -- prefix must denote the enclosing scope, i.e. can only be a direct
+ -- name or an expanded name.
Set_Etype (Sel, Any_Type);
In_Scope := In_Open_Scopes (Prefix_Type);
@@ -2780,8 +2809,8 @@ package body Sem_Ch4 is
Set_Original_Discriminant (Sel, Comp);
end if;
- -- For access type case, introduce explicit deference for
- -- more uniform treatment of entry calls.
+ -- For access type case, introduce explicit deference for more
+ -- uniform treatment of entry calls.
if Is_Access_Type (Etype (Name)) then
Insert_Explicit_Dereference (Name);
@@ -2809,8 +2838,8 @@ package body Sem_Ch4 is
if Etype (N) = Any_Type then
- -- If the prefix is a single concurrent object, use its name in
- -- the error message, rather than that of its anonymous type.
+ -- If the prefix is a single concurrent object, use its name in the
+ -- error message, rather than that of its anonymous type.
if Is_Concurrent_Type (Prefix_Type)
and then Is_Internal_Name (Chars (Prefix_Type))
@@ -2828,7 +2857,7 @@ package body Sem_Ch4 is
and then Prefix_Type /= Etype (Prefix_Type)
and then Is_Record_Type (Etype (Prefix_Type))
then
- -- If this is a derived formal type, the parent may have a
+ -- If this is a derived formal type, the parent may have
-- different visibility at this point. Try for an inherited
-- component before reporting an error.
diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb
index 3f16dca9396..163365fc46a 100644
--- a/gcc/ada/sem_ch5.adb
+++ b/gcc/ada/sem_ch5.adb
@@ -1112,7 +1112,9 @@ package body Sem_Ch5 is
-- If the iteration is given by a range, create temporaries and
-- assignment statements block to capture the bounds and perform
-- required finalization actions in case a bound includes a function
- -- call that uses the temporary stack.
+ -- call that uses the temporary stack. We first pre-analyze a copy of
+ -- the range in order to determine the expected type, and analyze
+ -- and resolve the original bounds.
procedure Check_Controlled_Array_Attribute (DS : Node_Id);
-- If the bounds are given by a 'Range reference on a function call
@@ -1126,13 +1128,16 @@ package body Sem_Ch5 is
procedure Process_Bounds (R : Node_Id) is
Loc : constant Source_Ptr := Sloc (N);
+ R_Copy : constant Node_Id := New_Copy_Tree (R);
Lo : constant Node_Id := Low_Bound (R);
Hi : constant Node_Id := High_Bound (R);
New_Lo_Bound : Node_Id := Empty;
New_Hi_Bound : Node_Id := Empty;
- Typ : constant Entity_Id := Etype (R);
+ Typ : Entity_Id;
- function One_Bound (Bound : Node_Id) return Node_Id;
+ function One_Bound
+ (Original_Bound : Node_Id;
+ Analyzed_Bound : Node_Id) return Node_Id;
-- Create one declaration followed by one assignment statement
-- to capture the value of bound. We create a separate assignment
-- in order to force the creation of a block in case the bound
@@ -1142,7 +1147,10 @@ package body Sem_Ch5 is
-- One_Bound --
---------------
- function One_Bound (Bound : Node_Id) return Node_Id is
+ function One_Bound
+ (Original_Bound : Node_Id;
+ Analyzed_Bound : Node_Id) return Node_Id
+ is
Assign : Node_Id;
Id : Entity_Id;
Decl : Node_Id;
@@ -1156,11 +1164,17 @@ package body Sem_Ch5 is
-- part of the call to Make_Index (literal bounds may need to
-- be resolved to type Integer).
- if Nkind (Bound) = N_Integer_Literal
- or else Is_Entity_Name (Bound)
- or else Analyzed (Bound)
+ if Analyzed (Original_Bound) then
+ return Original_Bound;
+
+ elsif Nkind (Analyzed_Bound) = N_Integer_Literal
+ or else Is_Entity_Name (Analyzed_Bound)
then
- return Bound;
+ Analyze_And_Resolve (Original_Bound, Typ);
+ return Original_Bound;
+
+ else
+ Analyze_And_Resolve (Original_Bound, Typ);
end if;
Id :=
@@ -1188,26 +1202,32 @@ package body Sem_Ch5 is
Assign :=
Make_Assignment_Statement (Loc,
Name => New_Occurrence_Of (Id, Loc),
- Expression => Relocate_Node (Bound));
+ Expression => Relocate_Node (Original_Bound));
- Save_Interps (Bound, Expression (Assign));
Insert_Before (Parent (N), Assign);
Analyze (Assign);
- Rewrite (Bound, New_Occurrence_Of (Id, Loc));
+ Rewrite (Original_Bound, New_Occurrence_Of (Id, Loc));
if Nkind (Assign) = N_Assignment_Statement then
return Expression (Assign);
else
- return Bound;
+ return Original_Bound;
end if;
end One_Bound;
-- Start of processing for Process_Bounds
begin
- New_Lo_Bound := One_Bound (Lo);
- New_Hi_Bound := One_Bound (Hi);
+ -- Determine expected type of range by analyzing separate copy.
+
+ Set_Parent (R_Copy, Parent (R));
+ Pre_Analyze_And_Resolve (R_Copy);
+ Typ := Etype (R_Copy);
+ Set_Etype (R, Typ);
+
+ New_Lo_Bound := One_Bound (Lo, Low_Bound (R_Copy));
+ New_Hi_Bound := One_Bound (Hi, High_Bound (R_Copy));
-- Propagate staticness to loop range itself, in case the
-- corresponding subtype is static.
@@ -1332,7 +1352,6 @@ package body Sem_Ch5 is
if Nkind (DS) = N_Range
and then Expander_Active
then
- Pre_Analyze_And_Resolve (DS);
Process_Bounds (DS);
else
Analyze (DS);
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
index 27da2a72ece..024a6cb1c24 100644
--- a/gcc/ada/sem_ch6.adb
+++ b/gcc/ada/sem_ch6.adb
@@ -5089,8 +5089,8 @@ package body Sem_Ch6 is
-- Ada 2005 (AI-231): Create and decorate an internal subtype
-- declaration corresponding to the null-excluding type of the
- -- formal in the enclosing scope. In addition, replace the
- -- parameter type of the formal to this internal subtype.
+ -- formal in the enclosing scope. Finally, replace the
+ -- parameter type of the formal with the internal subtype.
if Null_Exclusion_Present (Param_Spec) then
declare
@@ -5105,7 +5105,7 @@ package body Sem_Ch6 is
Ptype : constant Node_Id := Parameter_Type (Param_Spec);
Decl : Node_Id;
- P : Node_Id := Parent (Parent (Related_Nod));
+ P : Node_Id := Parent (Related_Nod);
begin
Set_Is_Internal (Anon);
@@ -5127,12 +5127,13 @@ package body Sem_Ch6 is
Mark_Rewrite_Insertion (Decl);
-- Insert the new declaration in the nearest enclosing scope
+ -- in front of the subprogram or entry declaration.
- while not Has_Declarations (P) loop
+ while not Is_List_Member (P) loop
P := Parent (P);
end loop;
- Prepend (Decl, Declarations (P));
+ Insert_Before (P, Decl);
Rewrite (Ptype, New_Occurrence_Of (Anon, Loc));
Mark_Rewrite_Insertion (Ptype);
@@ -5456,15 +5457,24 @@ package body Sem_Ch6 is
if Nkind (Parameter_Type (Spec)) = N_Access_Definition then
- -- Ada 2005 (AI-231): This behaviour has been modified in Ada 2005.
- -- It is only forced if the null_exclusion appears.
+ -- Ada 2005 (AI-231): In Ada95, access parameters are always non-
+ -- null; In Ada 2005, only if then null_exclusion is explicit.
if Ada_Version < Ada_05
or else Null_Exclusion_Present (Spec)
+ or else Can_Never_Be_Null (Etype (Formal_Id))
then
Set_Is_Known_Non_Null (Formal_Id);
Set_Can_Never_Be_Null (Formal_Id);
end if;
+
+ elsif Is_Access_Type (Etype (Formal_Id))
+ and then Can_Never_Be_Null (Etype (Formal_Id))
+ then
+ -- Ada 2005: The access subtype may be declared with null-exclusion
+
+ Set_Is_Known_Non_Null (Formal_Id);
+ Set_Can_Never_Be_Null (Formal_Id);
end if;
Set_Mechanism (Formal_Id, Default_Mechanism);
diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb
index 5f8de03efc1..394f6dbb8e9 100644
--- a/gcc/ada/sem_ch8.adb
+++ b/gcc/ada/sem_ch8.adb
@@ -29,6 +29,7 @@ with Debug; use Debug;
with Einfo; use Einfo;
with Elists; use Elists;
with Errout; use Errout;
+with Exp_Tss; use Exp_Tss;
with Exp_Util; use Exp_Util;
with Fname; use Fname;
with Freeze; use Freeze;
@@ -1102,10 +1103,11 @@ package body Sem_Ch8 is
Save_AV : constant Ada_Version_Type := Ada_Version;
Nam : constant Node_Id := Name (N);
New_S : Entity_Id;
- Old_S : Entity_Id := Empty;
+ Old_S : Entity_Id := Empty;
Rename_Spec : Entity_Id;
- Is_Actual : Boolean := False;
- Inst_Node : Node_Id := Empty;
+ Formal_Spec : constant Node_Id := Corresponding_Formal_Spec (N);
+ Is_Actual : constant Boolean := Present (Formal_Spec);
+ Inst_Node : Node_Id := Empty;
function Original_Subprogram (Subp : Entity_Id) return Entity_Id;
-- Find renamed entity when the declaration is a renaming_as_body
@@ -1167,8 +1169,75 @@ package body Sem_Ch8 is
-- is missing an argument when it is analyzed.
if Nkind (Nam) = N_Attribute_Reference then
- Attribute_Renaming (N);
- return;
+
+ -- In the case of an abstract formal subprogram association,
+ -- rewrite an actual given by a stream attribute as the name
+ -- of the corresponding stream primitive of the type.
+
+ if Is_Actual and then Is_Abstract (Formal_Spec) then
+ declare
+ Stream_Prim : Entity_Id;
+ Prefix_Type : constant Entity_Id := Entity (Prefix (Nam));
+
+ begin
+ -- The class-wide forms of the stream attributes are not
+ -- primitive dispatching operations (even though they
+ -- internally dispatch to a stream attribute).
+
+ if Is_Class_Wide_Type (Prefix_Type) then
+ Error_Msg_N
+ ("attribute must be a primitive dispatching operation",
+ Nam);
+ return;
+ end if;
+
+ -- Retrieve the primitive subprogram associated with the
+ -- attribute. This can only be a stream attribute, since
+ -- those are the only ones that are dispatching (and the
+ -- actual for an abstract formal subprogram must be a
+ -- dispatching operation).
+
+ case Attribute_Name (Nam) is
+ when Name_Input =>
+ Stream_Prim :=
+ Find_Prim_Op (Prefix_Type, TSS_Stream_Input);
+ when Name_Output =>
+ Stream_Prim :=
+ Find_Prim_Op (Prefix_Type, TSS_Stream_Output);
+ when Name_Read =>
+ Stream_Prim :=
+ Find_Prim_Op (Prefix_Type, TSS_Stream_Read);
+ when Name_Write =>
+ Stream_Prim :=
+ Find_Prim_Op (Prefix_Type, TSS_Stream_Write);
+ when others =>
+ Error_Msg_N
+ ("attribute must be a primitive dispatching operation",
+ Nam);
+ return;
+ end case;
+
+ -- Rewrite the attribute into the name of its corresponding
+ -- primitive dispatching subprogram. We can then proceed with
+ -- the usual processing for subprogram renamings.
+
+ declare
+ Prim_Name : constant Node_Id :=
+ Make_Identifier (Sloc (Nam),
+ Chars => Chars (Stream_Prim));
+ begin
+ Set_Entity (Prim_Name, Stream_Prim);
+ Rewrite (Nam, Prim_Name);
+ Analyze (Nam);
+ end;
+ end;
+
+ -- Normal processing for a renaming of an attribute
+
+ else
+ Attribute_Renaming (N);
+ return;
+ end if;
end if;
-- Check whether this declaration corresponds to the instantiation
@@ -1183,9 +1252,8 @@ package body Sem_Ch8 is
-- is determined in Find_Renamed_Entity. If the entity is an operator,
-- Find_Renamed_Entity applies additional visibility checks.
- if Present (Corresponding_Formal_Spec (N)) then
- Is_Actual := True;
- Inst_Node := Unit_Declaration_Node (Corresponding_Formal_Spec (N));
+ if Is_Actual then
+ Inst_Node := Unit_Declaration_Node (Formal_Spec);
if Is_Entity_Name (Nam)
and then Present (Entity (Nam))
@@ -1477,9 +1545,7 @@ package body Sem_Ch8 is
-- indicate that the renaming is an abstract dispatching operation
-- with a controlling type.
- if Is_Actual
- and then Is_Abstract (Corresponding_Formal_Spec (N))
- then
+ if Is_Actual and then Is_Abstract (Formal_Spec) then
-- Mark the renaming as abstract here, so Find_Dispatching_Type
-- see it as corresponding to a generic association for a
-- formal abstract subprogram
@@ -1547,7 +1613,7 @@ package body Sem_Ch8 is
if (Ekind (Old_S) = E_Procedure or else Ekind (Old_S) = E_Function)
and then Is_Abstract (Old_S)
- and then not Is_Abstract (Corresponding_Formal_Spec (N))
+ and then not Is_Abstract (Formal_Spec)
then
Error_Msg_N
("abstract subprogram not allowed as generic actual", Nam);
@@ -2801,14 +2867,15 @@ package body Sem_Ch8 is
Case_Str : constant String := Name_Buffer (1 .. Name_Len);
Case_Stm : constant Node_Id := Parent (Parent (N));
Case_Typ : constant Entity_Id := Etype (Expression (Case_Stm));
+ Case_Rtp : constant Entity_Id := Root_Type (Case_Typ);
Lit : Node_Id;
begin
if Is_Enumeration_Type (Case_Typ)
- and then Case_Typ /= Standard_Character
- and then Case_Typ /= Standard_Wide_Character
- and then Case_Typ /= Standard_Wide_Wide_Character
+ and then Case_Rtp /= Standard_Character
+ and then Case_Rtp /= Standard_Wide_Character
+ and then Case_Rtp /= Standard_Wide_Wide_Character
then
Lit := First_Literal (Case_Typ);
Get_Name_String (Chars (Lit));
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
index b3019294715..a65c9ca7002 100644
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_prag.adb
@@ -55,6 +55,7 @@ with Sem_Ch3; use Sem_Ch3;
with Sem_Ch8; use Sem_Ch8;
with Sem_Ch13; use Sem_Ch13;
with Sem_Disp; use Sem_Disp;
+with Sem_Dist; use Sem_Dist;
with Sem_Elim; use Sem_Elim;
with Sem_Eval; use Sem_Eval;
with Sem_Intr; use Sem_Intr;
@@ -4605,13 +4606,20 @@ package body Sem_Prag is
Error_Pragma_Arg
("pragma% cannot be applied to function", Arg1);
- elsif Ekind (Nm) = E_Record_Type
- and then Present (Corresponding_Remote_Type (Nm))
- then
- -- A record type that is the Equivalent_Type for
- -- a remote access-to-subprogram type.
+ elsif Is_Remote_Access_To_Subprogram_Type (Nm) then
+
+ if Is_Record_Type (Nm) then
+ -- A record type that is the Equivalent_Type for
+ -- a remote access-to-subprogram type.
+
+ N := Declaration_Node (Corresponding_Remote_Type (Nm));
- N := Declaration_Node (Corresponding_Remote_Type (Nm));
+ else
+ -- A non-expanded RAS type (case where distribution is
+ -- not enabled).
+
+ N := Declaration_Node (Nm);
+ end if;
if Nkind (N) = N_Full_Type_Declaration
and then Nkind (Type_Definition (N)) =
@@ -4622,9 +4630,9 @@ package body Sem_Prag is
if Is_Asynchronous (Nm)
and then Expander_Active
+ and then Get_PCS_Name /= Name_No_DSA
then
- RACW_Type_Is_Asynchronous (
- Underlying_RACW_Type (Nm));
+ RACW_Type_Is_Asynchronous (Underlying_RACW_Type (Nm));
end if;
else
diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb
index 90ee6f56c7c..cc55d26d2d5 100644
--- a/gcc/ada/sem_res.adb
+++ b/gcc/ada/sem_res.adb
@@ -168,7 +168,9 @@ package body Sem_Res is
-- by other node rewriting procedures.
procedure Resolve_Actuals (N : Node_Id; Nam : Entity_Id);
- -- Resolve actuals of call, and add default expressions for missing ones
+ -- Resolve actuals of call, and add default expressions for missing ones.
+ -- N is the Node_Id for the subprogram call, and Nam is the entity of the
+ -- called subprogram.
procedure Resolve_Entry_Call (N : Node_Id; Typ : Entity_Id);
-- Called from Resolve_Call, when the prefix denotes an entry or element
@@ -626,7 +628,6 @@ package body Sem_Res is
F := First_Formal (Subp);
A := First_Actual (N);
-
while Present (F) and then Present (A) loop
if not Is_Entity_Name (A)
or else Entity (A) /= F
@@ -787,6 +788,42 @@ package body Sem_Res is
procedure Check_Parameterless_Call (N : Node_Id) is
Nam : Node_Id;
+ function Prefix_Is_Access_Subp return Boolean;
+ -- If the prefix is of an access_to_subprogram type, the node must be
+ -- rewritten as a call. Ditto if the prefix is overloaded and all its
+ -- interpretations are access to subprograms.
+
+ ---------------------------
+ -- Prefix_Is_Access_Subp --
+ ---------------------------
+
+ function Prefix_Is_Access_Subp return Boolean is
+ I : Interp_Index;
+ It : Interp;
+
+ begin
+ if not Is_Overloaded (N) then
+ return
+ Ekind (Etype (N)) = E_Subprogram_Type
+ and then Base_Type (Etype (Etype (N))) /= Standard_Void_Type;
+ else
+ Get_First_Interp (N, I, It);
+ while Present (It.Typ) loop
+ if Ekind (It.Typ) /= E_Subprogram_Type
+ or else Base_Type (Etype (It.Typ)) = Standard_Void_Type
+ then
+ return False;
+ end if;
+
+ Get_Next_Interp (I, It);
+ end loop;
+
+ return True;
+ end if;
+ end Prefix_Is_Access_Subp;
+
+ -- Start of processing for Check_Parameterless_Call
+
begin
-- Defend against junk stuff if errors already detected
@@ -832,9 +869,7 @@ package body Sem_Res is
-- procedure or entry.
or else
- (Nkind (N) = N_Explicit_Dereference
- and then Ekind (Etype (N)) = E_Subprogram_Type
- and then Base_Type (Etype (Etype (N))) /= Standard_Void_Type)
+ (Nkind (N) = N_Explicit_Dereference and then Prefix_Is_Access_Subp)
-- Rewrite as call if it is a selected component which is a function,
-- this is the case of a call to a protected function (which may be
@@ -858,7 +893,7 @@ package body Sem_Res is
then
Nam := New_Copy (N);
- -- If overloaded, overload set belongs to new copy.
+ -- If overloaded, overload set belongs to new copy
Save_Interps (N, Nam);
@@ -2515,7 +2550,6 @@ package body Sem_Res is
begin
A := First_Actual (N);
F := First_Formal (Nam);
-
while Present (F) loop
if No (A) and then Needs_No_Actuals (Nam) then
null;
@@ -4796,9 +4830,11 @@ package body Sem_Res is
----------------------------------
procedure Resolve_Explicit_Dereference (N : Node_Id; Typ : Entity_Id) is
- P : constant Node_Id := Prefix (N);
- I : Interp_Index;
- It : Interp;
+ Loc : constant Source_Ptr := Sloc (N);
+ New_N : Node_Id;
+ P : constant Node_Id := Prefix (N);
+ I : Interp_Index;
+ It : Interp;
begin
-- Now that we know the type, check that this is not a
@@ -4824,7 +4860,39 @@ package body Sem_Res is
Get_Next_Interp (I, It);
end loop;
- Resolve (P, It.Typ);
+ if Present (It.Typ) then
+ Resolve (P, It.Typ);
+ else
+ -- If no interpretation covers the designated type of the
+ -- prefix, this is the pathological case where not all
+ -- implementations of the prefix allow the interpretation
+ -- of the node as a call. Now that the expected type is known,
+ -- Remove other interpretations from prefix, rewrite it as
+ -- a call, and resolve again, so that the proper call node
+ -- is generated.
+
+ Get_First_Interp (P, I, It);
+ while Present (It.Typ) loop
+ if Ekind (It.Typ) /= E_Access_Subprogram_Type then
+ Remove_Interp (I);
+ end if;
+
+ Get_Next_Interp (I, It);
+ end loop;
+
+ New_N :=
+ Make_Function_Call (Loc,
+ Name =>
+ Make_Explicit_Dereference (Loc,
+ Prefix => P),
+ Parameter_Associations => New_List);
+
+ Save_Interps (N, New_N);
+ Rewrite (N, New_N);
+ Analyze_And_Resolve (N, Typ);
+ return;
+ end if;
+
Set_Etype (N, Designated_Type (It.Typ));
else
@@ -5667,6 +5735,16 @@ package body Sem_Res is
Error_Msg_N ("value has extraneous low order digits", N);
end if;
+ -- Generate a warning if literal from source
+
+ if Is_Static_Expression (N)
+ and then Warn_On_Bad_Fixed_Value
+ then
+ Error_Msg_N
+ ("static fixed-point value is not a multiple of Small?",
+ N);
+ end if;
+
-- Replace literal by a value that is the exact representation
-- of a value of the type, i.e. a multiple of the small value,
-- by truncation, since Machine_Rounds is false for all GNAT
@@ -5678,6 +5756,8 @@ package body Sem_Res is
Realval => Small_Value (Typ) * Cint));
Set_Is_Static_Expression (N, Stat);
+
+
end if;
-- In all cases, set the corresponding integer field
@@ -6351,8 +6431,7 @@ package body Sem_Res is
Set_Etype (Operand, Standard_Duration);
end if;
- -- Resolve the real operand with largest available precision.
-
+ -- Resolve the real operand with largest available precision
if Etype (Right_Opnd (Operand)) = Universal_Real then
Rop := New_Copy_Tree (Right_Opnd (Operand));
else
@@ -6787,7 +6866,7 @@ package body Sem_Res is
T1 := Standard_Duration;
- -- Look for fixed-point types in enclosing scopes.
+ -- Look for fixed-point types in enclosing scopes
Scop := Current_Scope;
while Scop /= Standard_Standard loop
@@ -7219,19 +7298,16 @@ package body Sem_Res is
elsif (Ekind (Target_Type) = E_Access_Subprogram_Type
or else
Ekind (Target_Type) = E_Anonymous_Access_Subprogram_Type)
+ and then No (Corresponding_Remote_Type (Opnd_Type))
and then Conversion_Check
(Ekind (Base_Type (Opnd_Type)) = E_Access_Subprogram_Type,
"illegal operand for access subprogram conversion")
then
-- Check that the designated types are subtype conformant
- if not Subtype_Conformant (Designated_Type (Opnd_Type),
- Designated_Type (Target_Type))
- then
- Error_Msg_N
- ("operand type is not subtype conformant with target type",
- Operand);
- end if;
+ Check_Subtype_Conformant (New_Id => Designated_Type (Target_Type),
+ Old_Id => Designated_Type (Opnd_Type),
+ Err_Loc => N);
-- Check the static accessibility rule of 4.6(20)
diff --git a/gcc/ada/sem_type.adb b/gcc/ada/sem_type.adb
index 8d0cf7577e0..3411194aa18 100644
--- a/gcc/ada/sem_type.adb
+++ b/gcc/ada/sem_type.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2004 Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2005 Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -585,6 +585,9 @@ package body Sem_Type is
function Covers (T1, T2 : Entity_Id) return Boolean is
+ BT1 : Entity_Id;
+ BT2 : Entity_Id;
+
function Full_View_Covers (Typ1, Typ2 : Entity_Id) return Boolean;
-- In an instance the proper view may not always be correct for
-- private types, but private and full view are compatible. This
@@ -619,6 +622,10 @@ package body Sem_Type is
else
raise Program_Error;
end if;
+
+ else
+ BT1 := Base_Type (T1);
+ BT2 := Base_Type (T2);
end if;
-- Simplest case: same types are compatible, and types that have the
@@ -639,7 +646,10 @@ package body Sem_Type is
if T1 = T2 then
return True;
- elsif Base_Type (T1) = Base_Type (T2) then
+ elsif BT1 = BT2
+ or else BT1 = T2
+ or else BT2 = T1
+ then
if not Is_Generic_Actual_Type (T1) then
return True;
else
@@ -712,9 +722,9 @@ package body Sem_Type is
-- An Access_To_Subprogram is compatible with itself, or with an
-- anonymous type created for an attribute reference Access.
- elsif (Ekind (Base_Type (T1)) = E_Access_Subprogram_Type
+ elsif (Ekind (BT1) = E_Access_Subprogram_Type
or else
- Ekind (Base_Type (T1)) = E_Access_Protected_Subprogram_Type)
+ Ekind (BT1) = E_Access_Protected_Subprogram_Type)
and then Is_Access_Type (T2)
and then (not Comes_From_Source (T1)
or else not Comes_From_Source (T2))
@@ -732,9 +742,9 @@ package body Sem_Type is
-- with itself, or with an anonymous type created for an attribute
-- reference Access.
- elsif (Ekind (Base_Type (T1)) = E_Anonymous_Access_Subprogram_Type
+ elsif (Ekind (BT1) = E_Anonymous_Access_Subprogram_Type
or else
- Ekind (Base_Type (T1))
+ Ekind (BT1)
= E_Anonymous_Access_Protected_Subprogram_Type)
and then Is_Access_Type (T2)
and then (not Comes_From_Source (T1)
@@ -768,14 +778,14 @@ package body Sem_Type is
return Covers (Corresponding_Remote_Type (T2), T1);
elsif Ekind (T2) = E_Access_Attribute_Type
- and then (Ekind (Base_Type (T1)) = E_General_Access_Type
- or else Ekind (Base_Type (T1)) = E_Access_Type)
+ and then (Ekind (BT1) = E_General_Access_Type
+ or else Ekind (BT1) = E_Access_Type)
and then Covers (Designated_Type (T1), Designated_Type (T2))
then
-- If the target type is a RACW type while the source is an access
-- attribute type, we are building a RACW that may be exported.
- if Is_Remote_Access_To_Class_Wide_Type (Base_Type (T1)) then
+ if Is_Remote_Access_To_Class_Wide_Type (BT1) then
Set_Has_RACW (Current_Sem_Unit);
end if;
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index 00fc1a19a59..fe354349b2c 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -6770,16 +6770,20 @@ package body Sem_Util is
Found_Scope := Scope (Found_Scope);
exit when Expec_Scope = Standard_Standard
- or else
- Found_Scope = Standard_Standard
- or else
- not Comes_From_Source (Expec_Scope)
- or else
- not Comes_From_Source (Found_Scope);
+ or else Found_Scope = Standard_Standard
+ or else not Comes_From_Source (Expec_Scope)
+ or else not Comes_From_Source (Found_Scope);
end loop;
end;
- Error_Msg_NE ("expected}!", Expr, Expec_Type);
+ if Is_Record_Type (Expec_Type)
+ and then Present (Corresponding_Remote_Type (Expec_Type))
+ then
+ Error_Msg_NE ("expected}!", Expr,
+ Corresponding_Remote_Type (Expec_Type));
+ else
+ Error_Msg_NE ("expected}!", Expr, Expec_Type);
+ end if;
if Is_Entity_Name (Expr)
and then Is_Package (Entity (Expr))
diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads
index 9ee56372e4d..05df20c68d3 100644
--- a/gcc/ada/sem_util.ads
+++ b/gcc/ada/sem_util.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2004, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -391,7 +391,7 @@ package Sem_Util is
-- to check if '=' has to be expanded into a bunch component comparaisons.
function In_Instance return Boolean;
- -- Returns True if the current scope is within a generic instance.
+ -- Returns True if the current scope is within a generic instance
function In_Instance_Body return Boolean;
-- Returns True if current scope is within the body of an instance, where
@@ -436,7 +436,7 @@ package Sem_Util is
-- synthesized attribute.
function Is_Actual_Parameter (N : Node_Id) return Boolean;
- -- Determines if N is an actual parameter in a subprogram call.
+ -- Determines if N is an actual parameter in a subprogram call
function Is_Aliased_View (Obj : Node_Id) return Boolean;
-- Determine if Obj is an aliased view, i.e. the name of an
@@ -542,7 +542,7 @@ package Sem_Util is
-- Return True if E is a remote access-to-class-wide-limited_private type
function Is_Remote_Access_To_Subprogram_Type (E : Entity_Id) return Boolean;
- -- Return True if E is a remote access to subprogram type.
+ -- Return True if E is a remote access to subprogram type
function Is_Remote_Call (N : Node_Id) return Boolean;
-- Return True if N denotes a potentially remote call
@@ -642,7 +642,7 @@ package Sem_Util is
-- the call order, so this does not correspond to simply taking the
-- next entry of the Parameter_Associations list. The argument is an
-- actual previously returned by a call to First_Actual or Next_Actual.
- -- Note tha the result produced is always an expression, not a parameter
+ -- Note that the result produced is always an expression, not a parameter
-- assciation node, even if named notation was used.
procedure Normalize_Actuals
@@ -783,15 +783,14 @@ package Sem_Util is
-- Set the flag Is_Transient of the current scope
procedure Set_Size_Info (T1, T2 : Entity_Id);
- -- Copies the Esize field and Has_Biased_Representation flag from
- -- (sub)type entity T2 to (sub)type entity T1. Also copies the
- -- Is_Unsigned_Type flag in the fixed-point and discrete cases,
- -- and also copies the alignment value from T2 to T1. It does NOT
- -- copy the RM_Size field, which must be separately set if this
- -- is required to be copied also.
+ -- Copies the Esize field and Has_Biased_Representation flag from sub(type)
+ -- entity T2 to (sub)type entity T1. Also copies the Is_Unsigned_Type flag
+ -- in the fixed-point and discrete cases, and also copies the alignment
+ -- value from T2 to T1. It does NOT copy the RM_Size field, which must be
+ -- separately set if this is required to be copied also.
function Scope_Is_Transient return Boolean;
- -- True if the current scope is transient.
+ -- True if the current scope is transient
function Static_Integer (N : Node_Id) return Uint;
-- This function analyzes the given expression node and then resolves it
@@ -804,10 +803,10 @@ package Sem_Util is
-- E1 and E2 refer to different objects
function Subprogram_Access_Level (Subp : Entity_Id) return Uint;
- -- Return the accessibility level of the view denoted by Subp.
+ -- Return the accessibility level of the view denoted by Subp
procedure Trace_Scope (N : Node_Id; E : Entity_Id; Msg : String);
- -- Print debugging information on entry to each unit being analyzed.
+ -- Print debugging information on entry to each unit being analyzed
procedure Transfer_Entities (From : Entity_Id; To : Entity_Id);
-- Move a list of entities from one scope to another, and recompute
@@ -817,14 +816,14 @@ package Sem_Util is
-- Return the accessibility level of Typ
function Unit_Declaration_Node (Unit_Id : Entity_Id) return Node_Id;
- -- Unit_Id is the simple name of a program unit, this function returns
- -- the corresponding xxx_Declaration node for the entity. Also applies
- -- to the body entities for subprograms, tasks and protected units, in
- -- which case it returns the subprogram, task or protected body node
- -- for it. The unit may be a child unit with any number of ancestors.
+ -- Unit_Id is the simple name of a program unit, this function returns the
+ -- corresponding xxx_Declaration node for the entity. Also applies to the
+ -- body entities for subprograms, tasks and protected units, in which case
+ -- it returns the subprogram, task or protected body node for it. The unit
+ -- may be a child unit with any number of ancestors.
function Universal_Interpretation (Opnd : Node_Id) return Entity_Id;
- -- Yields universal_Integer or Universal_Real if this is a candidate.
+ -- Yields universal_Integer or Universal_Real if this is a candidate
function Within_Init_Proc return Boolean;
-- Determines if Current_Scope is within an init proc
diff --git a/gcc/ada/snames.adb b/gcc/ada/snames.adb
index 66f13453c50..237984600d7 100644
--- a/gcc/ada/snames.adb
+++ b/gcc/ada/snames.adb
@@ -607,6 +607,7 @@ package body Snames is
"exception_message#" &
"exception_name#" &
"file#" &
+ "generic_dispatching_constructor#" &
"import_address#" &
"import_largest_value#" &
"import_value#" &
diff --git a/gcc/ada/snames.ads b/gcc/ada/snames.ads
index 9b79ae448dc..4c8d2547ef0 100644
--- a/gcc/ada/snames.ads
+++ b/gcc/ada/snames.ads
@@ -880,126 +880,127 @@ package Snames is
-- Note: Asm is missing from this list, since Asm is a legitimate
-- convention name. So is To_Adress, which is a GNAT attribute.
- First_Intrinsic_Name : constant Name_Id := N + 544;
- Name_Divide : constant Name_Id := N + 544;
- Name_Enclosing_Entity : constant Name_Id := N + 545;
- Name_Exception_Information : constant Name_Id := N + 546;
- Name_Exception_Message : constant Name_Id := N + 547;
- Name_Exception_Name : constant Name_Id := N + 548;
- Name_File : constant Name_Id := N + 549;
- Name_Import_Address : constant Name_Id := N + 550;
- Name_Import_Largest_Value : constant Name_Id := N + 551;
- Name_Import_Value : constant Name_Id := N + 552;
- Name_Is_Negative : constant Name_Id := N + 553;
- Name_Line : constant Name_Id := N + 554;
- Name_Rotate_Left : constant Name_Id := N + 555;
- Name_Rotate_Right : constant Name_Id := N + 556;
- Name_Shift_Left : constant Name_Id := N + 557;
- Name_Shift_Right : constant Name_Id := N + 558;
- Name_Shift_Right_Arithmetic : constant Name_Id := N + 559;
- Name_Source_Location : constant Name_Id := N + 560;
- Name_Unchecked_Conversion : constant Name_Id := N + 561;
- Name_Unchecked_Deallocation : constant Name_Id := N + 562;
- Name_To_Pointer : constant Name_Id := N + 563;
- Last_Intrinsic_Name : constant Name_Id := N + 563;
+ First_Intrinsic_Name : constant Name_Id := N + 544;
+ Name_Divide : constant Name_Id := N + 544;
+ Name_Enclosing_Entity : constant Name_Id := N + 545;
+ Name_Exception_Information : constant Name_Id := N + 546;
+ Name_Exception_Message : constant Name_Id := N + 547;
+ Name_Exception_Name : constant Name_Id := N + 548;
+ Name_File : constant Name_Id := N + 549;
+ Name_Generic_Dispatching_Constructor : constant Name_Id := N + 550;
+ Name_Import_Address : constant Name_Id := N + 551;
+ Name_Import_Largest_Value : constant Name_Id := N + 552;
+ Name_Import_Value : constant Name_Id := N + 553;
+ Name_Is_Negative : constant Name_Id := N + 554;
+ Name_Line : constant Name_Id := N + 555;
+ Name_Rotate_Left : constant Name_Id := N + 556;
+ Name_Rotate_Right : constant Name_Id := N + 557;
+ Name_Shift_Left : constant Name_Id := N + 558;
+ Name_Shift_Right : constant Name_Id := N + 559;
+ Name_Shift_Right_Arithmetic : constant Name_Id := N + 560;
+ Name_Source_Location : constant Name_Id := N + 561;
+ Name_Unchecked_Conversion : constant Name_Id := N + 562;
+ Name_Unchecked_Deallocation : constant Name_Id := N + 563;
+ Name_To_Pointer : constant Name_Id := N + 564;
+ Last_Intrinsic_Name : constant Name_Id := N + 564;
-- Reserved words used only in Ada 95
- First_95_Reserved_Word : constant Name_Id := N + 564;
- Name_Abstract : constant Name_Id := N + 564;
- Name_Aliased : constant Name_Id := N + 565;
- Name_Protected : constant Name_Id := N + 566;
- Name_Until : constant Name_Id := N + 567;
- Name_Requeue : constant Name_Id := N + 568;
- Name_Tagged : constant Name_Id := N + 569;
- Last_95_Reserved_Word : constant Name_Id := N + 569;
+ First_95_Reserved_Word : constant Name_Id := N + 565;
+ Name_Abstract : constant Name_Id := N + 565;
+ Name_Aliased : constant Name_Id := N + 566;
+ Name_Protected : constant Name_Id := N + 567;
+ Name_Until : constant Name_Id := N + 568;
+ Name_Requeue : constant Name_Id := N + 569;
+ Name_Tagged : constant Name_Id := N + 570;
+ Last_95_Reserved_Word : constant Name_Id := N + 570;
subtype Ada_95_Reserved_Words is
Name_Id range First_95_Reserved_Word .. Last_95_Reserved_Word;
-- Miscellaneous names used in semantic checking
- Name_Raise_Exception : constant Name_Id := N + 570;
+ Name_Raise_Exception : constant Name_Id := N + 571;
-- Additional reserved words and identifiers used in GNAT Project Files
-- Note that Name_External is already previously declared
- Name_Ada_Roots : constant Name_Id := N + 571;
- Name_Binder : constant Name_Id := N + 572;
- Name_Binder_Driver : constant Name_Id := N + 573;
- Name_Body_Suffix : constant Name_Id := N + 574;
- Name_Builder : constant Name_Id := N + 575;
- Name_Compiler : constant Name_Id := N + 576;
- Name_Compiler_Driver : constant Name_Id := N + 577;
- Name_Compiler_Kind : constant Name_Id := N + 578;
- Name_Compute_Dependency : constant Name_Id := N + 579;
- Name_Cross_Reference : constant Name_Id := N + 580;
- Name_Default_Linker : constant Name_Id := N + 581;
- Name_Default_Switches : constant Name_Id := N + 582;
- Name_Dependency_Option : constant Name_Id := N + 583;
- Name_Exec_Dir : constant Name_Id := N + 584;
- Name_Executable : constant Name_Id := N + 585;
- Name_Executable_Suffix : constant Name_Id := N + 586;
- Name_Extends : constant Name_Id := N + 587;
- Name_Externally_Built : constant Name_Id := N + 588;
- Name_Finder : constant Name_Id := N + 589;
- Name_Global_Configuration_Pragmas : constant Name_Id := N + 590;
- Name_Gnatls : constant Name_Id := N + 591;
- Name_Gnatstub : constant Name_Id := N + 592;
- Name_Implementation : constant Name_Id := N + 593;
- Name_Implementation_Exceptions : constant Name_Id := N + 594;
- Name_Implementation_Suffix : constant Name_Id := N + 595;
- Name_Include_Option : constant Name_Id := N + 596;
- Name_Language_Processing : constant Name_Id := N + 597;
- Name_Languages : constant Name_Id := N + 598;
- Name_Library_Dir : constant Name_Id := N + 599;
- Name_Library_Auto_Init : constant Name_Id := N + 600;
- Name_Library_GCC : constant Name_Id := N + 601;
- Name_Library_Interface : constant Name_Id := N + 602;
- Name_Library_Kind : constant Name_Id := N + 603;
- Name_Library_Name : constant Name_Id := N + 604;
- Name_Library_Options : constant Name_Id := N + 605;
- Name_Library_Reference_Symbol_File : constant Name_Id := N + 606;
- Name_Library_Src_Dir : constant Name_Id := N + 607;
- Name_Library_Symbol_File : constant Name_Id := N + 608;
- Name_Library_Symbol_Policy : constant Name_Id := N + 609;
- Name_Library_Version : constant Name_Id := N + 610;
- Name_Linker : constant Name_Id := N + 611;
- Name_Local_Configuration_Pragmas : constant Name_Id := N + 612;
- Name_Locally_Removed_Files : constant Name_Id := N + 613;
- Name_Metrics : constant Name_Id := N + 614;
- Name_Naming : constant Name_Id := N + 615;
- Name_Object_Dir : constant Name_Id := N + 616;
- Name_Pretty_Printer : constant Name_Id := N + 617;
- Name_Project : constant Name_Id := N + 618;
- Name_Separate_Suffix : constant Name_Id := N + 619;
- Name_Source_Dirs : constant Name_Id := N + 620;
- Name_Source_Files : constant Name_Id := N + 621;
- Name_Source_List_File : constant Name_Id := N + 622;
- Name_Spec : constant Name_Id := N + 623;
- Name_Spec_Suffix : constant Name_Id := N + 624;
- Name_Specification : constant Name_Id := N + 625;
- Name_Specification_Exceptions : constant Name_Id := N + 626;
- Name_Specification_Suffix : constant Name_Id := N + 627;
- Name_Switches : constant Name_Id := N + 628;
+ Name_Ada_Roots : constant Name_Id := N + 572;
+ Name_Binder : constant Name_Id := N + 573;
+ Name_Binder_Driver : constant Name_Id := N + 574;
+ Name_Body_Suffix : constant Name_Id := N + 575;
+ Name_Builder : constant Name_Id := N + 576;
+ Name_Compiler : constant Name_Id := N + 577;
+ Name_Compiler_Driver : constant Name_Id := N + 578;
+ Name_Compiler_Kind : constant Name_Id := N + 579;
+ Name_Compute_Dependency : constant Name_Id := N + 580;
+ Name_Cross_Reference : constant Name_Id := N + 581;
+ Name_Default_Linker : constant Name_Id := N + 582;
+ Name_Default_Switches : constant Name_Id := N + 583;
+ Name_Dependency_Option : constant Name_Id := N + 584;
+ Name_Exec_Dir : constant Name_Id := N + 585;
+ Name_Executable : constant Name_Id := N + 586;
+ Name_Executable_Suffix : constant Name_Id := N + 587;
+ Name_Extends : constant Name_Id := N + 588;
+ Name_Externally_Built : constant Name_Id := N + 589;
+ Name_Finder : constant Name_Id := N + 590;
+ Name_Global_Configuration_Pragmas : constant Name_Id := N + 591;
+ Name_Gnatls : constant Name_Id := N + 592;
+ Name_Gnatstub : constant Name_Id := N + 593;
+ Name_Implementation : constant Name_Id := N + 594;
+ Name_Implementation_Exceptions : constant Name_Id := N + 595;
+ Name_Implementation_Suffix : constant Name_Id := N + 596;
+ Name_Include_Option : constant Name_Id := N + 597;
+ Name_Language_Processing : constant Name_Id := N + 598;
+ Name_Languages : constant Name_Id := N + 599;
+ Name_Library_Dir : constant Name_Id := N + 600;
+ Name_Library_Auto_Init : constant Name_Id := N + 601;
+ Name_Library_GCC : constant Name_Id := N + 602;
+ Name_Library_Interface : constant Name_Id := N + 603;
+ Name_Library_Kind : constant Name_Id := N + 604;
+ Name_Library_Name : constant Name_Id := N + 605;
+ Name_Library_Options : constant Name_Id := N + 606;
+ Name_Library_Reference_Symbol_File : constant Name_Id := N + 607;
+ Name_Library_Src_Dir : constant Name_Id := N + 608;
+ Name_Library_Symbol_File : constant Name_Id := N + 609;
+ Name_Library_Symbol_Policy : constant Name_Id := N + 610;
+ Name_Library_Version : constant Name_Id := N + 611;
+ Name_Linker : constant Name_Id := N + 612;
+ Name_Local_Configuration_Pragmas : constant Name_Id := N + 613;
+ Name_Locally_Removed_Files : constant Name_Id := N + 614;
+ Name_Metrics : constant Name_Id := N + 615;
+ Name_Naming : constant Name_Id := N + 616;
+ Name_Object_Dir : constant Name_Id := N + 617;
+ Name_Pretty_Printer : constant Name_Id := N + 618;
+ Name_Project : constant Name_Id := N + 619;
+ Name_Separate_Suffix : constant Name_Id := N + 620;
+ Name_Source_Dirs : constant Name_Id := N + 621;
+ Name_Source_Files : constant Name_Id := N + 622;
+ Name_Source_List_File : constant Name_Id := N + 623;
+ Name_Spec : constant Name_Id := N + 624;
+ Name_Spec_Suffix : constant Name_Id := N + 625;
+ Name_Specification : constant Name_Id := N + 626;
+ Name_Specification_Exceptions : constant Name_Id := N + 627;
+ Name_Specification_Suffix : constant Name_Id := N + 628;
+ Name_Switches : constant Name_Id := N + 629;
-- Other miscellaneous names used in front end
- Name_Unaligned_Valid : constant Name_Id := N + 629;
+ Name_Unaligned_Valid : constant Name_Id := N + 630;
-- ----------------------------------------------------------------
- First_2005_Reserved_Word : constant Name_Id := N + 630;
- Name_Interface : constant Name_Id := N + 630;
- Name_Overriding : constant Name_Id := N + 631;
- Name_Synchronized : constant Name_Id := N + 632;
- Last_2005_Reserved_Word : constant Name_Id := N + 632;
+ First_2005_Reserved_Word : constant Name_Id := N + 631;
+ Name_Interface : constant Name_Id := N + 631;
+ Name_Overriding : constant Name_Id := N + 632;
+ Name_Synchronized : constant Name_Id := N + 633;
+ Last_2005_Reserved_Word : constant Name_Id := N + 633;
subtype Ada_2005_Reserved_Words is
Name_Id range First_2005_Reserved_Word .. Last_2005_Reserved_Word;
-- Mark last defined name for consistency check in Snames body
- Last_Predefined_Name : constant Name_Id := N + 632;
+ Last_Predefined_Name : constant Name_Id := N + 633;
subtype Any_Operator_Name is Name_Id range
First_Operator_Name .. Last_Operator_Name;
diff --git a/gcc/ada/styleg.adb b/gcc/ada/styleg.adb
index 91c807b1a07..aec09dd028e 100644
--- a/gcc/ada/styleg.adb
+++ b/gcc/ada/styleg.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2004 Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2005 Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -265,6 +265,8 @@ package body Styleg is
S : Source_Ptr;
begin
+ -- Do we need to worry about UTF_32 line terminators here ???
+
S := Scan_Ptr + 3;
while Source (S) not in Line_Terminator loop
S := S + 1;
@@ -462,18 +464,36 @@ package body Styleg is
end Check_Left_Paren;
---------------------------
+ -- Check_Line_Max_Length --
+ ---------------------------
+
+ -- In check max line length mode (-gnatym), the line length must
+ -- not exceed the permitted maximum value.
+
+ procedure Check_Line_Max_Length (Len : Int) is
+ begin
+ if Style_Check_Max_Line_Length then
+ if Len > Style_Max_Line_Length then
+ Error_Msg
+ ("(style) this line is too long",
+ Current_Line_Start + Source_Ptr (Style_Max_Line_Length));
+ end if;
+ end if;
+ end Check_Line_Max_Length;
+
+ ---------------------------
-- Check_Line_Terminator --
---------------------------
-- In check blanks at end mode (-gnatyb), lines may not end with a
-- trailing space.
- -- In check max line length mode (-gnatym), the line length must
- -- not exceed the permitted maximum value.
-
-- In check form feeds mode (-gnatyf), the line terminator may not
-- be either of the characters FF or VT.
+ -- In check DOS line terminators node (-gnatyd), the line terminator
+ -- must be a single LF, without a following CR.
+
procedure Check_Line_Terminator (Len : Int) is
S : Source_Ptr;
@@ -483,18 +503,30 @@ package body Styleg is
if Style_Check_Form_Feeds then
if Source (Scan_Ptr) = ASCII.FF then
Error_Msg_S ("(style) form feed not allowed");
-
elsif Source (Scan_Ptr) = ASCII.VT then
Error_Msg_S ("(style) vertical tab not allowed");
end if;
end if;
- -- We are now possibly going to check for trailing spaces and maximum
- -- line length. There is no point in doing this if the current line is
- -- empty. It is actually wrong in the case of trailing spaces, because
- -- we scan backwards for this purpose, so we would end up looking at a
- -- different line, or even at invalid buffer locations if we have the
- -- first source line at hand.
+ -- Check DOS line terminator (ignore EOF, since we only get called
+ -- with an EOF if it is the last character in the buffer, and was
+ -- therefore not present in the sources
+
+ if Style_Check_DOS_Line_Terminator then
+ if Source (Scan_Ptr) = EOF then
+ null;
+ elsif Source (Scan_Ptr) /= LF
+ or else Source (Scan_Ptr + 1) = CR
+ then
+ Error_Msg_S ("(style) incorrect line terminator");
+ end if;
+ end if;
+
+ -- We are now possibly going to check for trailing spaces. There is no
+ -- point in doing this if the current line is empty. It is actually
+ -- wrong to do so, because we scan backwards for this purpose, so we
+ -- would end up looking at different line, or even at invalid buffer
+ -- locations if we have the first source line at hand.
if Len = 0 then
return;
@@ -515,17 +547,6 @@ package body Styleg is
end if;
end if;
end if;
-
- -- Check max line length
-
- if Style_Check_Max_Line_Length then
- if Len > Style_Max_Line_Length then
- Error_Msg
- ("(style) this line is too long",
- Current_Line_Start + Source_Ptr (Style_Max_Line_Length));
- end if;
- end if;
-
end Check_Line_Terminator;
--------------------------
diff --git a/gcc/ada/styleg.ads b/gcc/ada/styleg.ads
index bf5b1e144cd..3bd0712efa5 100644
--- a/gcc/ada/styleg.ads
+++ b/gcc/ada/styleg.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2004 Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2005 Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -104,11 +104,15 @@ package Styleg is
procedure Check_Left_Paren;
-- Called after scanning out a left parenthesis to check spacing.
+ procedure Check_Line_Max_Length (Len : Int);
+ -- Called with Scan_Ptr pointing to the first line terminator character
+ -- terminating the current line. Used to check for appropriate line length.
+ -- The parameter Len is the length of the current line.
+
procedure Check_Line_Terminator (Len : Int);
-- Called with Scan_Ptr pointing to the first line terminator terminating
- -- the current line, used to check for appropriate line terminator and
- -- to check the line length (Len is the length of the current line).
- -- Note that the terminator may be the EOF character.
+ -- the current line, used to check for appropriate line terminator usage.
+ -- The parameter Len is the length of the current line.
procedure Check_Pragma_Name;
-- The current token is a pragma identifier. Check that it is spelled
diff --git a/gcc/ada/stylesw.adb b/gcc/ada/stylesw.adb
index 1b3ea5ff40c..3979f74e984 100644
--- a/gcc/ada/stylesw.adb
+++ b/gcc/ada/stylesw.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2004, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -34,25 +34,26 @@ package body Stylesw is
procedure Reset_Style_Check_Options is
begin
- Style_Check_Indentation := 0;
- Style_Check_Attribute_Casing := False;
- Style_Check_Blanks_At_End := False;
- Style_Check_Comments := False;
- Style_Check_End_Labels := False;
- Style_Check_Form_Feeds := False;
- Style_Check_Horizontal_Tabs := False;
- Style_Check_If_Then_Layout := False;
- Style_Check_Keyword_Casing := False;
- Style_Check_Layout := False;
- Style_Check_Max_Line_Length := False;
- Style_Check_Max_Nesting_Level := False;
- Style_Check_Order_Subprograms := False;
- Style_Check_Pragma_Casing := False;
- Style_Check_References := False;
- Style_Check_Specs := False;
- Style_Check_Standard := False;
- Style_Check_Tokens := False;
- Style_Check_Xtra_Parens := False;
+ Style_Check_Indentation := 0;
+ Style_Check_Attribute_Casing := False;
+ Style_Check_Blanks_At_End := False;
+ Style_Check_Comments := False;
+ Style_Check_DOS_Line_Terminator := False;
+ Style_Check_End_Labels := False;
+ Style_Check_Form_Feeds := False;
+ Style_Check_Horizontal_Tabs := False;
+ Style_Check_If_Then_Layout := False;
+ Style_Check_Keyword_Casing := False;
+ Style_Check_Layout := False;
+ Style_Check_Max_Line_Length := False;
+ Style_Check_Max_Nesting_Level := False;
+ Style_Check_Order_Subprograms := False;
+ Style_Check_Pragma_Casing := False;
+ Style_Check_References := False;
+ Style_Check_Specs := False;
+ Style_Check_Standard := False;
+ Style_Check_Tokens := False;
+ Style_Check_Xtra_Parens := False;
end Reset_Style_Check_Options;
------------------------------
@@ -107,6 +108,7 @@ package body Stylesw is
Add ('a', Style_Check_Attribute_Casing);
Add ('b', Style_Check_Blanks_At_End);
Add ('c', Style_Check_Comments);
+ Add ('d', Style_Check_DOS_Line_Terminator);
Add ('e', Style_Check_End_Labels);
Add ('f', Style_Check_Form_Feeds);
Add ('h', Style_Check_Horizontal_Tabs);
@@ -186,31 +188,34 @@ package body Stylesw is
:= Character'Pos (C) - Character'Pos ('0');
when 'a' =>
- Style_Check_Attribute_Casing := True;
+ Style_Check_Attribute_Casing := True;
when 'b' =>
- Style_Check_Blanks_At_End := True;
+ Style_Check_Blanks_At_End := True;
when 'c' =>
- Style_Check_Comments := True;
+ Style_Check_Comments := True;
+
+ when 'd' =>
+ Style_Check_DOS_Line_Terminator := True;
when 'e' =>
- Style_Check_End_Labels := True;
+ Style_Check_End_Labels := True;
when 'f' =>
- Style_Check_Form_Feeds := True;
+ Style_Check_Form_Feeds := True;
when 'h' =>
- Style_Check_Horizontal_Tabs := True;
+ Style_Check_Horizontal_Tabs := True;
when 'i' =>
- Style_Check_If_Then_Layout := True;
+ Style_Check_If_Then_Layout := True;
when 'k' =>
- Style_Check_Keyword_Casing := True;
+ Style_Check_Keyword_Casing := True;
when 'l' =>
- Style_Check_Layout := True;
+ Style_Check_Layout := True;
when 'L' =>
Style_Max_Nesting_Level := 0;
@@ -242,11 +247,11 @@ package body Stylesw is
Style_Check_Max_Nesting_Level := Style_Max_Nesting_Level /= 0;
when 'm' =>
- Style_Check_Max_Line_Length := True;
- Style_Max_Line_Length := 79;
+ Style_Check_Max_Line_Length := True;
+ Style_Max_Line_Length := 79;
when 'n' =>
- Style_Check_Standard := True;
+ Style_Check_Standard := True;
when 'N' =>
Reset_Style_Check_Options;
@@ -281,22 +286,22 @@ package body Stylesw is
Style_Check_Max_Line_Length := Style_Max_Line_Length /= 0;
when 'o' =>
- Style_Check_Order_Subprograms := True;
+ Style_Check_Order_Subprograms := True;
when 'p' =>
- Style_Check_Pragma_Casing := True;
+ Style_Check_Pragma_Casing := True;
when 'r' =>
- Style_Check_References := True;
+ Style_Check_References := True;
when 's' =>
- Style_Check_Specs := True;
+ Style_Check_Specs := True;
when 't' =>
- Style_Check_Tokens := True;
+ Style_Check_Tokens := True;
when 'x' =>
- Style_Check_Xtra_Parens := True;
+ Style_Check_Xtra_Parens := True;
when ' ' =>
null;
diff --git a/gcc/ada/stylesw.ads b/gcc/ada/stylesw.ads
index d3c46def539..bd9d1a866b3 100644
--- a/gcc/ada/stylesw.ads
+++ b/gcc/ada/stylesw.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2004, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -84,6 +84,11 @@ package Stylesw is
-- Note: the reason for the last two conditions is to allow "boxed"
-- comments where only a single space separates the comment characters.
+ Style_Check_DOS_Line_Terminator : Boolean := False;
+ -- This can be set true by using the -gnatg or -gnatyd switches. If
+ -- it is True, then the line terminator must be a single LF, without an
+ -- associated CR (e.g. DOS line terminator sequence CR/LF not allowed).
+
Style_Check_End_Labels : Boolean := False;
-- This can be set True by using the -gnatg or -gnatye switches. If
-- it is True, then optional END labels must always be present.
@@ -242,7 +247,7 @@ package Stylesw is
procedure Set_Default_Style_Check_Options;
-- This procedure is called to set the default style checking options
- -- in response to a -gnatg switch or -gnaty with no suboptions.
+ -- in response to a -gnaty switch with no suboptions.
procedure Set_Style_Check_Options
(Options : String;
diff --git a/gcc/ada/switch-c.adb b/gcc/ada/switch-c.adb
index 391347a0c22..a91f9ea464e 100644
--- a/gcc/ada/switch-c.adb
+++ b/gcc/ada/switch-c.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 2001-2004 Free Software Foundation, Inc. --
+-- Copyright (C) 2001-2005 Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -485,7 +485,7 @@ package body Switch.C is
System_Extend_Unit := Empty;
Warning_Mode := Treat_As_Error;
- -- Set default warnings (basically -gnatwa)
+ -- Set default warnings for -gnatg (same set as -gnatwa)
Check_Unreferenced := True;
Check_Unreferenced_Formals := True;
@@ -493,6 +493,7 @@ package body Switch.C is
Constant_Condition_Warnings := True;
Implementation_Unit_Warnings := True;
Ineffective_Inline_Warnings := True;
+ Warn_On_Bad_Fixed_Value := True;
Warn_On_Constant := True;
Warn_On_Export_Import := True;
Warn_On_Modified_Unread := True;
@@ -502,7 +503,7 @@ package body Switch.C is
Warn_On_Unchecked_Conversion := True;
Warn_On_Unrecognized_Pragma := True;
- Set_Default_Style_Check_Options;
+ Set_Style_Check_Options ("3abcdefhiklmnprst");
-- Processing for G switch
@@ -762,6 +763,7 @@ package body Switch.C is
Constant_Condition_Warnings := True;
Implementation_Unit_Warnings := True;
Ineffective_Inline_Warnings := True;
+ Warn_On_Bad_Fixed_Value := True;
Warn_On_Constant := True;
Warn_On_Export_Import := True;
Warn_On_Modified_Unread := True;
@@ -779,6 +781,7 @@ package body Switch.C is
Elab_Warnings := False;
Implementation_Unit_Warnings := False;
Ineffective_Inline_Warnings := False;
+ Warn_On_Bad_Fixed_Value := False;
Warn_On_Constant := False;
Warn_On_Dereference := False;
Warn_On_Export_Import := False;
@@ -790,6 +793,12 @@ package body Switch.C is
Warn_On_Unchecked_Conversion := False;
Warn_On_Unrecognized_Pragma := False;
+ when 'b' =>
+ Warn_On_Bad_Fixed_Value := True;
+
+ when 'B' =>
+ Warn_On_Bad_Fixed_Value := False;
+
when 'c' =>
Constant_Condition_Warnings := True;
diff --git a/gcc/ada/symbols-vms-alpha.adb b/gcc/ada/symbols-vms-alpha.adb
index 2151706bc43..4fb68318f99 100644
--- a/gcc/ada/symbols-vms-alpha.adb
+++ b/gcc/ada/symbols-vms-alpha.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 2003-2004 Free Software Foundation, Inc. --
+-- Copyright (C) 2003-2005 Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -36,7 +36,7 @@ package body Symbols is
Symbol_Vector : constant String := "SYMBOL_VECTOR=(";
Equal_Data : constant String := "=DATA)";
Equal_Procedure : constant String := "=PROCEDURE)";
- Gsmatch : constant String := "gsmatch=equal,";
+ Gsmatch : constant String := "gsmatch=lequal,";
Symbol_File_Name : String_Access := null;
-- Name of the symbol file
@@ -668,18 +668,15 @@ package body Symbols is
Success := False;
return;
- elsif Soft_Minor_ID then
- Minor_ID := Minor_ID + 1;
+ elsif Soft_Major_ID then
+ Major_ID := Major_ID + 1;
+ Minor_ID := 0;
+ Soft_Major_ID := False;
Soft_Minor_ID := False;
end if;
Original_Symbols.Table (Index_1).Present := False;
Free (Original_Symbols.Table (Index_1).Name);
-
- if Soft_Minor_ID then
- Minor_ID := Minor_ID + 1;
- Soft_Minor_ID := False;
- end if;
end if;
end loop;
diff --git a/gcc/ada/trans.c b/gcc/ada/trans.c
index 10955e35231..fd42e837a2b 100644
--- a/gcc/ada/trans.c
+++ b/gcc/ada/trans.c
@@ -410,8 +410,7 @@ Identifier_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p)
&& (! DECL_RENAMING_GLOBAL_P (gnu_result)
|| global_bindings_p ())
/* Make sure it's an lvalue like INDIRECT_REF. */
- && (TREE_CODE_CLASS (TREE_CODE (renamed_obj)) == 'd'
- || TREE_CODE_CLASS (TREE_CODE (renamed_obj)) == 'r'))
+ && (DECL_P (renamed_obj) || REFERENCE_CLASS_P (renamed_obj)))
gnu_result = renamed_obj;
else
gnu_result = build_unary_op (INDIRECT_REF, NULL_TREE,
diff --git a/gcc/ada/ug_words b/gcc/ada/ug_words
index 21ccc3f911c..03e43251eee 100644
--- a/gcc/ada/ug_words
+++ b/gcc/ada/ug_words
@@ -105,6 +105,8 @@ gcc -c ^ GNAT COMPILE
-gnatw ^ /WARNINGS
-gnatwa ^ /WARNINGS=OPTIONAL
-gnatwA ^ /WARNINGS=NOOPTIONAL
+-gnatwb ^ /WARNINGS=BAD_FIXED_VALUES
+-gnatwB ^ /WARNINGS=NO_BAD_FIXED_VALUES
-gnatwc ^ /WARNINGS=CONDITIONALS
-gnatwC ^ /WARNINGS=NOCONDITIONALS
-gnatwd ^ /WARNINGS=IMPLICIT_DEREFERENCE
diff --git a/gcc/ada/usage.adb b/gcc/ada/usage.adb
index 64bb0b1c892..e57f9ed5b72 100644
--- a/gcc/ada/usage.adb
+++ b/gcc/ada/usage.adb
@@ -346,6 +346,10 @@ begin
Write_Line ("Enable selected warning modes, xx = list of parameters:");
Write_Line (" a turn on all optional warnings (except d,h,l)");
Write_Line (" A turn off all optional warnings");
+ Write_Line (" b turn on warnings for bad fixed value " &
+ "(not multiple of small)");
+ Write_Line (" B* turn off warnings for bad fixed value " &
+ "(not multiple of small)");
Write_Line (" c turn on warnings for constant conditional");
Write_Line (" C* turn off warnings for constant conditional");
Write_Line (" d turn on warnings for implicit dereference");
@@ -430,6 +434,7 @@ begin
Write_Line (" a check attribute casing");
Write_Line (" b check no blanks at end of lines");
Write_Line (" c check comment format");
+ Write_Line (" d check no DOS line terminators");
Write_Line (" e check end/exit labels present");
Write_Line (" f check no form feeds/vertical tabs in source");
Write_Line (" h check no horizontal tabs in source");
diff --git a/gcc/ada/utils.c b/gcc/ada/utils.c
index 762ec307ff6..484067d87f0 100644
--- a/gcc/ada/utils.c
+++ b/gcc/ada/utils.c
@@ -668,10 +668,10 @@ finish_record_type (tree record_type, tree fieldlist, bool has_rep,
TYPE_MODE (record_type) = BLKmode;
if (!had_size_unit)
- TYPE_SIZE_UNIT (record_type) = size_zero_node;
-
+ TYPE_SIZE_UNIT (record_type) = size_zero_node;
if (!had_size)
TYPE_SIZE (record_type) = bitsize_zero_node;
+
/* For all-repped records with a size specified, lay the QUAL_UNION_TYPE
out just like a UNION_TYPE, since the size will be fixed. */
else if (code == QUAL_UNION_TYPE)
@@ -796,9 +796,11 @@ finish_record_type (tree record_type, tree fieldlist, bool has_rep,
: convert (sizetype, size_binop (CEIL_DIV_EXPR, size,
bitsize_unit_node)));
- TYPE_SIZE (record_type) = round_up (size, TYPE_ALIGN (record_type));
+ TYPE_SIZE (record_type)
+ = variable_size (round_up (size, TYPE_ALIGN (record_type)));
TYPE_SIZE_UNIT (record_type)
- = round_up (size_unit, TYPE_ALIGN (record_type) / BITS_PER_UNIT);
+ = variable_size (round_up (size_unit,
+ TYPE_ALIGN (record_type) / BITS_PER_UNIT));
compute_record_mode (record_type);
}
diff --git a/gcc/ada/vms_data.ads b/gcc/ada/vms_data.ads
index 2b028bbe2a5..40a262f684d 100644
--- a/gcc/ada/vms_data.ads
+++ b/gcc/ada/vms_data.ads
@@ -1800,6 +1800,8 @@ package VMS_Data is
"-gnatyb " &
"COMMENTS " &
"-gnatyc " &
+ "NOCRLF" &
+ "-gnatyd " &
"END " &
"-gnatye " &
"VTABS " &
@@ -2357,6 +2359,10 @@ package VMS_Data is
"-gnatwA " &
"ALL_GCC " &
"-Wall " &
+ "BAD_FIXED_VALUES " &
+ "-gnatwb " &
+ "NO_BAD_FIXED_VALUES " &
+ "-gnatwB " &
"CONDITIONALS " &
"-gnatwc " &
"NOCONDITIONALS " &
diff --git a/gcc/ada/xnmake.adb b/gcc/ada/xnmake.adb
index fc26a0bfd67..e4802f2b2f3 100644
--- a/gcc/ada/xnmake.adb
+++ b/gcc/ada/xnmake.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2002 Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2005 Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -53,6 +53,7 @@ with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
with Ada.Strings.Unbounded.Text_IO; use Ada.Strings.Unbounded.Text_IO;
with Ada.Strings.Maps; use Ada.Strings.Maps;
with Ada.Strings.Maps.Constants; use Ada.Strings.Maps.Constants;
+with Ada.Streams.Stream_IO; use Ada.Streams.Stream_IO;
with Ada.Text_IO; use Ada.Text_IO;
with GNAT.Spitbol; use GNAT.Spitbol;
@@ -76,7 +77,6 @@ procedure XNmake is
Synonym : VString := Nul;
X : VString := Nul;
- Lineno : Natural;
NWidth : Natural;
FileS : VString := V ("nmake.ads");
@@ -86,10 +86,12 @@ procedure XNmake is
Given_File : VString := Nul;
-- File name given by command line argument
- InS, InT : File_Type;
- OutS, OutB : File_Type;
+ subtype Sfile is Ada.Streams.Stream_IO.File_Type;
- wsp : Pattern := Span (' ' & ASCII.HT);
+ InS, InT : Ada.Text_IO.File_Type;
+ OutS, OutB : Sfile;
+
+ wsp : Pattern := Span (' ' & ASCII.HT);
Body_Only : Pattern := BreakX (' ') * X & Span (' ') & "-- body only";
Spec_Only : Pattern := BreakX (' ') * X & Span (' ') & "-- spec only";
@@ -130,6 +132,10 @@ procedure XNmake is
V_Elist_Id : constant VString := V ("Elist_Id");
V_Boolean : constant VString := V ("Boolean");
+ procedure Put_Line (F : Sfile; S : String);
+ procedure Put_Line (F : Sfile; S : VString);
+ -- Local version of Put_Line ensures Unix style line endings
+
procedure WriteS (S : String);
procedure WriteB (S : String);
procedure WriteBS (S : String);
@@ -188,10 +194,20 @@ procedure XNmake is
end if;
end WriteS;
+ procedure Put_Line (F : Sfile; S : String) is
+ begin
+ String'Write (Stream (F), S);
+ Character'Write (Stream (F), ASCII.LF);
+ end Put_Line;
+
+ procedure Put_Line (F : Sfile; S : VString) is
+ begin
+ Put_Line (F, To_String (S));
+ end Put_Line;
+
-- Start of processing for XNmake
begin
- Lineno := 0;
NWidth := 28;
Anchored_Mode := True;
diff --git a/gcc/ada/xtreeprs.adb b/gcc/ada/xtreeprs.adb
index 2e026d10163..55bfa96f681 100644
--- a/gcc/ada/xtreeprs.adb
+++ b/gcc/ada/xtreeprs.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2004 Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2005 Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -45,6 +45,7 @@ with Ada.Command_Line; use Ada.Command_Line;
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
with Ada.Strings.Unbounded.Text_IO; use Ada.Strings.Unbounded.Text_IO;
with Ada.Text_IO; use Ada.Text_IO;
+with Ada.Streams.Stream_IO; use Ada.Streams.Stream_IO;
with GNAT.Spitbol; use GNAT.Spitbol;
with GNAT.Spitbol.Patterns; use GNAT.Spitbol.Patterns;
@@ -75,13 +76,15 @@ procedure XTreeprs is
Synonym : VString := Nul;
Term : VString := Nul;
- OutS : File_Type;
+ subtype Sfile is Ada.Streams.Stream_IO.File_Type;
+
+ OutS : Sfile;
-- Output file
- InS : File_Type;
+ InS : Ada.Text_IO.File_Type;
-- Read sinfo.ads
- InT : File_Type;
+ InT : Ada.Text_IO.File_Type;
-- Read treeprs.adt
Special : TB.Table (20);
@@ -137,6 +140,23 @@ procedure XTreeprs is
M : Match_Result;
+ procedure Put_Line (F : Sfile; S : String);
+ procedure Put_Line (F : Sfile; S : VString);
+ -- Local version of Put_Line ensures Unix style line endings
+
+ procedure Put_Line (F : Sfile; S : String) is
+ begin
+ String'Write (Stream (F), S);
+ Character'Write (Stream (F), ASCII.LF);
+ end Put_Line;
+
+ procedure Put_Line (F : Sfile; S : VString) is
+ begin
+ Put_Line (F, To_String (S));
+ end Put_Line;
+
+-- Start of processing for XTreeprs
+
begin
Anchored_Mode := True;
diff --git a/gcc/builtin-types.def b/gcc/builtin-types.def
index 845863108b0..d9b87df309f 100644
--- a/gcc/builtin-types.def
+++ b/gcc/builtin-types.def
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GCC.
@@ -172,6 +172,8 @@ DEF_FUNCTION_TYPE_2 (BT_FN_SIZE_CONST_STRING_CONST_STRING,
BT_SIZE, BT_CONST_STRING, BT_CONST_STRING)
DEF_FUNCTION_TYPE_2 (BT_FN_STRING_CONST_STRING_INT,
BT_STRING, BT_CONST_STRING, BT_INT)
+DEF_FUNCTION_TYPE_2 (BT_FN_STRING_CONST_STRING_SIZE,
+ BT_STRING, BT_CONST_STRING, BT_SIZE)
DEF_FUNCTION_TYPE_2 (BT_FN_INT_CONST_STRING_FILEPTR,
BT_INT, BT_CONST_STRING, BT_FILEPTR)
DEF_FUNCTION_TYPE_2 (BT_FN_INT_INT_FILEPTR,
diff --git a/gcc/builtins.c b/gcc/builtins.c
index 703fb3fceff..23bb4298884 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -1761,11 +1761,10 @@ expand_builtin_mathfn (tree exp, rtx target, rtx subtarget)
case BUILT_IN_LRINT:
case BUILT_IN_LRINTF:
case BUILT_IN_LRINTL:
- builtin_optab = lrint_optab; break;
case BUILT_IN_LLRINT:
case BUILT_IN_LLRINTF:
case BUILT_IN_LLRINTL:
- builtin_optab = llrint_optab; break;
+ builtin_optab = lrint_optab; break;
default:
gcc_unreachable ();
}
diff --git a/gcc/builtins.def b/gcc/builtins.def
index d324e01a584..394723e3cd5 100644
--- a/gcc/builtins.def
+++ b/gcc/builtins.def
@@ -468,6 +468,7 @@ DEF_LIB_BUILTIN (BUILT_IN_STRCMP, "strcmp", BT_FN_INT_CONST_STRING_CONST_
DEF_LIB_BUILTIN (BUILT_IN_STRCPY, "strcpy", BT_FN_STRING_STRING_CONST_STRING, ATTR_NOTHROW_NONNULL)
DEF_LIB_BUILTIN (BUILT_IN_STRCSPN, "strcspn", BT_FN_SIZE_CONST_STRING_CONST_STRING, ATTR_PURE_NOTHROW_NONNULL)
DEF_EXT_LIB_BUILTIN (BUILT_IN_STRDUP, "strdup", BT_FN_STRING_CONST_STRING, ATTR_MALLOC_NOTHROW_NONNULL)
+DEF_EXT_LIB_BUILTIN (BUILT_IN_STRNDUP, "strndup", BT_FN_STRING_CONST_STRING_SIZE, ATTR_MALLOC_NOTHROW_NONNULL)
DEF_LIB_BUILTIN (BUILT_IN_STRLEN, "strlen", BT_FN_SIZE_CONST_STRING, ATTR_PURE_NOTHROW_NONNULL)
DEF_LIB_BUILTIN (BUILT_IN_STRNCAT, "strncat", BT_FN_STRING_STRING_CONST_STRING_SIZE, ATTR_NOTHROW_NONNULL)
DEF_LIB_BUILTIN (BUILT_IN_STRNCMP, "strncmp", BT_FN_INT_CONST_STRING_CONST_STRING_SIZE, ATTR_PURE_NOTHROW_NONNULL)
diff --git a/gcc/c-common.c b/gcc/c-common.c
index a18520d9e0d..5705f4d1eb2 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -1427,15 +1427,14 @@ check_case_value (tree value)
value = fold (value);
}
- if (TREE_CODE (value) != INTEGER_CST
- && value != error_mark_node)
+ if (TREE_CODE (value) == INTEGER_CST)
+ /* Promote char or short to int. */
+ value = perform_integral_promotions (value);
+ else if (value != error_mark_node)
{
error ("case label does not reduce to an integer constant");
value = error_mark_node;
}
- else
- /* Promote char or short to int. */
- value = default_conversion (value);
constant_expression_warning (value);
@@ -2314,7 +2313,9 @@ pointer_int_sum (enum tree_code resultcode, tree ptrop, tree intop)
}
/* Prepare expr to be an argument of a TRUTH_NOT_EXPR,
- or validate its data type for an `if' or `while' statement or ?..: exp.
+ or for an `if' or `while' statement or ?..: exp. It should already
+ have been validated to be of suitable type; otherwise, a bad
+ diagnostic may result.
This preparation consists of taking the ordinary
representation of an expression expr and producing a valid tree
@@ -2346,14 +2347,14 @@ c_common_truthvalue_conversion (tree expr)
if (TREE_TYPE (expr) == truthvalue_type_node)
return expr;
return build2 (TREE_CODE (expr), truthvalue_type_node,
- lang_hooks.truthvalue_conversion (TREE_OPERAND (expr, 0)),
- lang_hooks.truthvalue_conversion (TREE_OPERAND (expr, 1)));
+ c_common_truthvalue_conversion (TREE_OPERAND (expr, 0)),
+ c_common_truthvalue_conversion (TREE_OPERAND (expr, 1)));
case TRUTH_NOT_EXPR:
if (TREE_TYPE (expr) == truthvalue_type_node)
return expr;
return build1 (TREE_CODE (expr), truthvalue_type_node,
- lang_hooks.truthvalue_conversion (TREE_OPERAND (expr, 0)));
+ c_common_truthvalue_conversion (TREE_OPERAND (expr, 0)));
case ERROR_MARK:
return expr;
@@ -2401,15 +2402,15 @@ c_common_truthvalue_conversion (tree expr)
case COMPLEX_EXPR:
return build_binary_op ((TREE_SIDE_EFFECTS (TREE_OPERAND (expr, 1))
? TRUTH_OR_EXPR : TRUTH_ORIF_EXPR),
- lang_hooks.truthvalue_conversion (TREE_OPERAND (expr, 0)),
- lang_hooks.truthvalue_conversion (TREE_OPERAND (expr, 1)),
+ c_common_truthvalue_conversion (TREE_OPERAND (expr, 0)),
+ c_common_truthvalue_conversion (TREE_OPERAND (expr, 1)),
0);
case NEGATE_EXPR:
case ABS_EXPR:
case FLOAT_EXPR:
/* These don't change whether an object is nonzero or zero. */
- return lang_hooks.truthvalue_conversion (TREE_OPERAND (expr, 0));
+ return c_common_truthvalue_conversion (TREE_OPERAND (expr, 0));
case LROTATE_EXPR:
case RROTATE_EXPR:
@@ -2418,16 +2419,16 @@ c_common_truthvalue_conversion (tree expr)
if (TREE_SIDE_EFFECTS (TREE_OPERAND (expr, 1)))
return build2 (COMPOUND_EXPR, truthvalue_type_node,
TREE_OPERAND (expr, 1),
- lang_hooks.truthvalue_conversion (TREE_OPERAND (expr, 0)));
+ c_common_truthvalue_conversion (TREE_OPERAND (expr, 0)));
else
- return lang_hooks.truthvalue_conversion (TREE_OPERAND (expr, 0));
+ return c_common_truthvalue_conversion (TREE_OPERAND (expr, 0));
case COND_EXPR:
/* Distribute the conversion into the arms of a COND_EXPR. */
return fold (build3 (COND_EXPR, truthvalue_type_node,
TREE_OPERAND (expr, 0),
- lang_hooks.truthvalue_conversion (TREE_OPERAND (expr, 1)),
- lang_hooks.truthvalue_conversion (TREE_OPERAND (expr, 2))));
+ c_common_truthvalue_conversion (TREE_OPERAND (expr, 1)),
+ c_common_truthvalue_conversion (TREE_OPERAND (expr, 2))));
case CONVERT_EXPR:
/* Don't cancel the effect of a CONVERT_EXPR from a REFERENCE_TYPE,
@@ -2440,7 +2441,7 @@ c_common_truthvalue_conversion (tree expr)
/* If this is widening the argument, we can ignore it. */
if (TYPE_PRECISION (TREE_TYPE (expr))
>= TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (expr, 0))))
- return lang_hooks.truthvalue_conversion (TREE_OPERAND (expr, 0));
+ return c_common_truthvalue_conversion (TREE_OPERAND (expr, 0));
break;
case MINUS_EXPR:
@@ -2489,8 +2490,8 @@ c_common_truthvalue_conversion (tree expr)
return (build_binary_op
((TREE_SIDE_EFFECTS (expr)
? TRUTH_OR_EXPR : TRUTH_ORIF_EXPR),
- lang_hooks.truthvalue_conversion (build_unary_op (REALPART_EXPR, t, 0)),
- lang_hooks.truthvalue_conversion (build_unary_op (IMAGPART_EXPR, t, 0)),
+ c_common_truthvalue_conversion (build_unary_op (REALPART_EXPR, t, 0)),
+ c_common_truthvalue_conversion (build_unary_op (IMAGPART_EXPR, t, 0)),
0));
}
@@ -3514,7 +3515,10 @@ c_add_case_label (splay_tree cases, tree cond, tree orig_type,
&& POINTER_TYPE_P (TREE_TYPE (low_value)))
|| (high_value && TREE_TYPE (high_value)
&& POINTER_TYPE_P (TREE_TYPE (high_value))))
- error ("pointers are not permitted as case values");
+ {
+ error ("pointers are not permitted as case values");
+ goto error_out;
+ }
/* Case ranges are a GNU extension. */
if (high_value && pedantic)
@@ -5752,5 +5756,94 @@ lvalue_error (enum lvalue_use use)
gcc_unreachable ();
}
}
+
+/* *PTYPE is an incomplete array. Complete it with a domain based on
+ INITIAL_VALUE. If INITIAL_VALUE is not present, use 1 if DO_DEFAULT
+ is true. Return 0 if successful, 1 if INITIAL_VALUE can't be deciphered,
+ 2 if INITIAL_VALUE was NULL, and 3 if INITIAL_VALUE was empty. */
+
+int
+complete_array_type (tree *ptype, tree initial_value, bool do_default)
+{
+ tree maxindex, type, main_type, elt, unqual_elt;
+ int failure = 0, quals;
+
+ maxindex = size_zero_node;
+ if (initial_value)
+ {
+ if (TREE_CODE (initial_value) == STRING_CST)
+ {
+ int eltsize
+ = int_size_in_bytes (TREE_TYPE (TREE_TYPE (initial_value)));
+ maxindex = size_int (TREE_STRING_LENGTH (initial_value)/eltsize - 1);
+ }
+ else if (TREE_CODE (initial_value) == CONSTRUCTOR)
+ {
+ tree elts = CONSTRUCTOR_ELTS (initial_value);
+
+ if (elts == NULL)
+ {
+ if (pedantic)
+ failure = 3;
+ maxindex = integer_minus_one_node;
+ }
+ else
+ {
+ tree curindex;
+
+ if (TREE_PURPOSE (elts))
+ maxindex = fold_convert (sizetype, TREE_PURPOSE (elts));
+ curindex = maxindex;
+
+ for (elts = TREE_CHAIN (elts); elts; elts = TREE_CHAIN (elts))
+ {
+ if (TREE_PURPOSE (elts))
+ curindex = fold_convert (sizetype, TREE_PURPOSE (elts));
+ else
+ curindex = size_binop (PLUS_EXPR, curindex, size_one_node);
+
+ if (tree_int_cst_lt (maxindex, curindex))
+ maxindex = curindex;
+ }
+ }
+ }
+ else
+ {
+ /* Make an error message unless that happened already. */
+ if (initial_value != error_mark_node)
+ failure = 1;
+ }
+ }
+ else
+ {
+ failure = 2;
+ if (!do_default)
+ return failure;
+ }
+
+ type = *ptype;
+ elt = TREE_TYPE (type);
+ quals = TYPE_QUALS (strip_array_types (elt));
+ if (quals == 0)
+ unqual_elt = elt;
+ else
+ unqual_elt = c_build_qualified_type (elt, TYPE_UNQUALIFIED);
+
+ /* Using build_distinct_type_copy and modifying things afterward instead
+ of using build_array_type to create a new type preserves all of the
+ TYPE_LANG_FLAG_? bits that the front end may have set. */
+ main_type = build_distinct_type_copy (TYPE_MAIN_VARIANT (type));
+ TREE_TYPE (main_type) = unqual_elt;
+ TYPE_DOMAIN (main_type) = build_index_type (maxindex);
+ layout_type (main_type);
+
+ if (quals == 0)
+ type = main_type;
+ else
+ type = c_build_qualified_type (main_type, quals);
+
+ *ptype = type;
+ return failure;
+}
#include "gt-c-common.h"
diff --git a/gcc/c-common.h b/gcc/c-common.h
index 64daf34b440..7794adedbeb 100644
--- a/gcc/c-common.h
+++ b/gcc/c-common.h
@@ -808,7 +808,7 @@ extern tree build_break_stmt (void);
extern tree build_unary_op (enum tree_code, tree, int);
extern tree build_binary_op (enum tree_code, tree, tree, int);
-extern tree default_conversion (tree);
+extern tree perform_integral_promotions (tree);
/* Given two integer or real types, return the type for their sum.
Given two compatible ANSI C types, returns the merged type. */
@@ -888,6 +888,8 @@ enum lvalue_use {
extern void lvalue_error (enum lvalue_use);
+extern int complete_array_type (tree *, tree, bool);
+
/* In c-gimplify.c */
extern void c_genericize (tree);
extern int c_gimplify_expr (tree *, tree *, tree *);
diff --git a/gcc/c-convert.c b/gcc/c-convert.c
index 3067137c372..70e226806ca 100644
--- a/gcc/c-convert.c
+++ b/gcc/c-convert.c
@@ -1,5 +1,5 @@
/* Language-level data type conversion for GNU C.
- Copyright (C) 1987, 1988, 1991, 1998, 2002, 2003, 2004
+ Copyright (C) 1987, 1988, 1991, 1998, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of GCC.
@@ -33,6 +33,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "flags.h"
#include "convert.h"
#include "c-common.h"
+#include "c-tree.h"
#include "langhooks.h"
#include "toplev.h"
@@ -95,7 +96,7 @@ convert (tree type, tree expr)
return fold (convert_to_integer (type, e));
if (code == BOOLEAN_TYPE)
{
- tree t = lang_hooks.truthvalue_conversion (expr);
+ tree t = c_objc_common_truthvalue_conversion (expr);
if (TREE_CODE (t) == ERROR_MARK)
return t;
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 0b86086992e..cc45e26c2fd 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -529,7 +529,7 @@ c_finish_incomplete_decl (tree decl)
{
warning ("%Jarray %qD assumed to have one element", decl, decl);
- complete_array_type (type, NULL_TREE, 1);
+ complete_array_type (&TREE_TYPE (decl), NULL_TREE, true);
layout_decl (decl, 0);
}
@@ -3168,14 +3168,15 @@ finish_decl (tree decl, tree init, tree asmspec_tree)
&& TYPE_DOMAIN (type) == 0
&& TREE_CODE (decl) != TYPE_DECL)
{
- int do_default
+ bool do_default
= (TREE_STATIC (decl)
/* Even if pedantic, an external linkage array
may have incomplete type at first. */
? pedantic && !TREE_PUBLIC (decl)
: !DECL_EXTERNAL (decl));
int failure
- = complete_array_type (type, DECL_INITIAL (decl), do_default);
+ = complete_array_type (&TREE_TYPE (decl), DECL_INITIAL (decl),
+ do_default);
/* Get the completed type made by complete_array_type. */
type = TREE_TYPE (decl);
@@ -3196,14 +3197,12 @@ finish_decl (tree decl, tree init, tree asmspec_tree)
else if (!pedantic && TREE_STATIC (decl) && !TREE_PUBLIC (decl))
DECL_EXTERNAL (decl) = 1;
}
-
- /* TYPE_MAX_VALUE is always one less than the number of elements
- in the array, because we start counting at zero. Therefore,
- warn only if the value is less than zero. */
- else if (pedantic && TYPE_DOMAIN (type) != 0
- && tree_int_cst_sgn (TYPE_MAX_VALUE (TYPE_DOMAIN (type))) < 0)
+ else if (failure == 3)
error ("%Jzero or negative size array %qD", decl, decl);
+ if (DECL_INITIAL (decl))
+ TREE_TYPE (DECL_INITIAL (decl)) = type;
+
layout_decl (decl, 0);
}
@@ -3491,17 +3490,19 @@ build_compound_literal (tree type, tree init)
if (TREE_CODE (type) == ARRAY_TYPE && !COMPLETE_TYPE_P (type))
{
- int failure = complete_array_type (type, DECL_INITIAL (decl), 1);
-
+ int failure = complete_array_type (&TREE_TYPE (decl),
+ DECL_INITIAL (decl), true);
gcc_assert (!failure);
+
+ type = TREE_TYPE (decl);
+ TREE_TYPE (DECL_INITIAL (decl)) = type;
}
- type = TREE_TYPE (decl);
if (type == error_mark_node || !COMPLETE_TYPE_P (type))
return error_mark_node;
stmt = build_stmt (DECL_EXPR, decl);
- complit = build1 (COMPOUND_LITERAL_EXPR, TREE_TYPE (decl), stmt);
+ complit = build1 (COMPOUND_LITERAL_EXPR, type, stmt);
TREE_SIDE_EFFECTS (complit) = 1;
layout_decl (decl, 0);
@@ -3527,73 +3528,6 @@ build_compound_literal (tree type, tree init)
return complit;
}
-/* Make TYPE a complete type based on INITIAL_VALUE.
- Return 0 if successful, 1 if INITIAL_VALUE can't be deciphered,
- 2 if there was no information (in which case assume 1 if DO_DEFAULT). */
-
-int
-complete_array_type (tree type, tree initial_value, int do_default)
-{
- tree maxindex = NULL_TREE;
- int value = 0;
-
- if (initial_value)
- {
- /* Note MAXINDEX is really the maximum index,
- one less than the size. */
- if (TREE_CODE (initial_value) == STRING_CST)
- {
- int eltsize
- = int_size_in_bytes (TREE_TYPE (TREE_TYPE (initial_value)));
- maxindex = build_int_cst (NULL_TREE,
- (TREE_STRING_LENGTH (initial_value)
- / eltsize) - 1);
- }
- else if (TREE_CODE (initial_value) == CONSTRUCTOR)
- {
- tree elts = CONSTRUCTOR_ELTS (initial_value);
- maxindex = build_int_cst (NULL_TREE, -1);
- for (; elts; elts = TREE_CHAIN (elts))
- {
- if (TREE_PURPOSE (elts))
- maxindex = TREE_PURPOSE (elts);
- else
- maxindex = fold (build2 (PLUS_EXPR, integer_type_node,
- maxindex, integer_one_node));
- }
- }
- else
- {
- /* Make an error message unless that happened already. */
- if (initial_value != error_mark_node)
- value = 1;
-
- /* Prevent further error messages. */
- maxindex = build_int_cst (NULL_TREE, 0);
- }
- }
-
- if (!maxindex)
- {
- if (do_default)
- maxindex = build_int_cst (NULL_TREE, 0);
- value = 2;
- }
-
- if (maxindex)
- {
- TYPE_DOMAIN (type) = build_index_type (maxindex);
-
- gcc_assert (TREE_TYPE (maxindex));
- }
-
- /* Lay out the type now that we can get the real answer. */
-
- layout_type (type);
-
- return value;
-}
-
/* Determine whether TYPE is a structure with a flexible array member,
or a union containing such a structure (possibly recursively). */
diff --git a/gcc/c-format.c b/gcc/c-format.c
index a228b4b886f..20b8727795c 100644
--- a/gcc/c-format.c
+++ b/gcc/c-format.c
@@ -1,6 +1,6 @@
/* Check calls to formatted I/O functions (-Wformat).
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GCC.
diff --git a/gcc/c-objc-common.c b/gcc/c-objc-common.c
index 89fb409878e..4b09c3e40d8 100644
--- a/gcc/c-objc-common.c
+++ b/gcc/c-objc-common.c
@@ -230,34 +230,6 @@ c_tree_printer (pretty_printer *pp, text_info *text)
return true;
}
-tree
-c_objc_common_truthvalue_conversion (tree expr)
-{
- retry:
- switch (TREE_CODE (TREE_TYPE (expr)))
- {
- case ARRAY_TYPE:
- expr = default_conversion (expr);
- if (TREE_CODE (TREE_TYPE (expr)) != ARRAY_TYPE)
- goto retry;
-
- error ("used array that cannot be converted to pointer where scalar is required");
- return error_mark_node;
-
- case RECORD_TYPE:
- error ("used struct type value where scalar is required");
- return error_mark_node;
-
- case UNION_TYPE:
- error ("used union type value where scalar is required");
- return error_mark_node;
- default:
- break;
- }
-
- return c_common_truthvalue_conversion (expr);
-}
-
/* In C and ObjC, all decls have "C" linkage. */
bool
has_c_linkage (tree decl ATTRIBUTE_UNUSED)
diff --git a/gcc/c-objc-common.h b/gcc/c-objc-common.h
index 5107dce068d..de8c175c5c2 100644
--- a/gcc/c-objc-common.h
+++ b/gcc/c-objc-common.h
@@ -52,8 +52,6 @@ extern void c_initialize_diagnostics (diagnostic_context *);
#define LANG_HOOKS_MARK_ADDRESSABLE c_mark_addressable
#undef LANG_HOOKS_PARSE_FILE
#define LANG_HOOKS_PARSE_FILE c_common_parse_file
-#undef LANG_HOOKS_TRUTHVALUE_CONVERSION
-#define LANG_HOOKS_TRUTHVALUE_CONVERSION c_objc_common_truthvalue_conversion
#undef LANG_HOOKS_FINISH_INCOMPLETE_DECL
#define LANG_HOOKS_FINISH_INCOMPLETE_DECL c_finish_incomplete_decl
#undef LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS
diff --git a/gcc/c-opts.c b/gcc/c-opts.c
index 731511ab6ee..42c8236fc03 100644
--- a/gcc/c-opts.c
+++ b/gcc/c-opts.c
@@ -1102,16 +1102,18 @@ c_common_parse_file (int set_yydebug)
i = 0;
for (;;)
{
- /* Start the main input file */
- (*debug_hooks->start_source_file) (0, this_input_filename);
+ /* Start the main input file, if the debug writer wants it. */
+ if (debug_hooks->start_end_main_source_file)
+ (*debug_hooks->start_source_file) (0, this_input_filename);
finish_options ();
pch_init ();
push_file_scope ();
c_parse_file ();
finish_file ();
pop_file_scope ();
- /* And end the main input file. */
- (*debug_hooks->end_source_file) (0);
+ /* And end the main input file, if the debug writer wants it */
+ if (debug_hooks->start_end_main_source_file)
+ (*debug_hooks->end_source_file) (0);
if (++i >= num_in_fnames)
break;
cpp_undef_all (parse_in);
diff --git a/gcc/c-parser.c b/gcc/c-parser.c
index 99b6e090492..9a5d669d034 100644
--- a/gcc/c-parser.c
+++ b/gcc/c-parser.c
@@ -3238,7 +3238,7 @@ c_parser_compound_statement_nostart (c_parser *parser)
location_t loc = c_parser_peek_token (parser)->location;
if (c_parser_next_token_is (parser, CPP_EOF))
{
- parser->error = true;
+ c_parser_error (parser, "expected declaration or statement");
return;
}
if (c_parser_next_token_is_keyword (parser, RID_CASE)
@@ -3580,7 +3580,8 @@ c_parser_paren_condition (c_parser *parser)
if (!c_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>"))
return error_mark_node;
loc = c_parser_peek_token (parser)->location;
- cond = lang_hooks.truthvalue_conversion (c_parser_expression (parser).value);
+ cond = c_objc_common_truthvalue_conversion
+ (c_parser_expression (parser).value);
if (EXPR_P (cond))
SET_EXPR_LOCATION (cond, loc);
c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, "expected %<)%>");
@@ -3816,7 +3817,7 @@ c_parser_for_statement (c_parser *parser)
else
{
tree ocond = c_parser_expression (parser).value;
- cond = lang_hooks.truthvalue_conversion (ocond);
+ cond = c_objc_common_truthvalue_conversion (ocond);
if (EXPR_P (cond))
SET_EXPR_LOCATION (cond, loc);
c_parser_skip_until_found (parser, CPP_SEMICOLON, "expected %<;%>");
@@ -4151,13 +4152,14 @@ c_parser_conditional_expression (c_parser *parser, struct c_expr *after)
pedwarn ("ISO C forbids omitting the middle term of a ?: expression");
/* Make sure first operand is calculated only once. */
exp1.value = save_expr (default_conversion (cond.value));
- cond.value = lang_hooks.truthvalue_conversion (exp1.value);
+ cond.value = c_objc_common_truthvalue_conversion (exp1.value);
skip_evaluation += cond.value == truthvalue_true_node;
}
else
{
cond.value
- = lang_hooks.truthvalue_conversion (default_conversion (cond.value));
+ = c_objc_common_truthvalue_conversion
+ (default_conversion (cond.value));
skip_evaluation += cond.value == truthvalue_false_node;
exp1 = c_parser_expression (parser);
skip_evaluation += ((cond.value == truthvalue_true_node)
@@ -4394,12 +4396,12 @@ c_parser_binary_expression (c_parser *parser, struct c_expr *after)
switch (ocode)
{
case TRUTH_ANDIF_EXPR:
- stack[sp].expr.value = lang_hooks.truthvalue_conversion
+ stack[sp].expr.value = c_objc_common_truthvalue_conversion
(default_conversion (stack[sp].expr.value));
skip_evaluation += stack[sp].expr.value == truthvalue_false_node;
break;
case TRUTH_ORIF_EXPR:
- stack[sp].expr.value = lang_hooks.truthvalue_conversion
+ stack[sp].expr.value = c_objc_common_truthvalue_conversion
(default_conversion (stack[sp].expr.value));
skip_evaluation += stack[sp].expr.value == truthvalue_true_node;
break;
diff --git a/gcc/c-tree.h b/gcc/c-tree.h
index adace275c38..41b624ec5b7 100644
--- a/gcc/c-tree.h
+++ b/gcc/c-tree.h
@@ -378,7 +378,6 @@ extern struct c_declarator *build_array_declarator (tree, struct c_declspecs *,
extern tree build_enumerator (tree, tree);
extern void check_for_loop_decls (void);
extern void mark_forward_parm_decls (void);
-extern int complete_array_type (tree, tree, int);
extern void declare_parm_level (void);
extern void undeclared_variable (tree, location_t);
extern tree declare_label (tree);
@@ -460,6 +459,7 @@ extern int comptypes (tree, tree);
extern bool c_mark_addressable (tree);
extern void c_incomplete_type_error (tree, tree);
extern tree c_type_promotes_to (tree);
+extern tree default_conversion (tree);
extern tree composite_type (tree, tree);
extern tree build_component_ref (tree, tree);
extern tree build_indirect_ref (tree, const char *);
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index d5046d5f425..9ddafe10c5d 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -1352,40 +1352,17 @@ default_function_array_conversion (tree exp)
return exp;
}
-/* Perform default promotions for C data used in expressions.
- Arrays and functions are converted to pointers;
- enumeral types or short or char, to int.
- In addition, manifest constants symbols are replaced by their values. */
+
+/* EXP is an expression of integer type. Apply the integer promotions
+ to it and return the promoted value. */
tree
-default_conversion (tree exp)
+perform_integral_promotions (tree exp)
{
- tree orig_exp;
tree type = TREE_TYPE (exp);
enum tree_code code = TREE_CODE (type);
- if (code == FUNCTION_TYPE || code == ARRAY_TYPE)
- return default_function_array_conversion (exp);
-
- /* Constants can be used directly unless they're not loadable. */
- if (TREE_CODE (exp) == CONST_DECL)
- exp = DECL_INITIAL (exp);
-
- /* Replace a nonvolatile const static variable with its value unless
- it is an array, in which case we must be sure that taking the
- address of the array produces consistent results. */
- else if (optimize && TREE_CODE (exp) == VAR_DECL && code != ARRAY_TYPE)
- {
- exp = decl_constant_value_for_broken_optimization (exp);
- type = TREE_TYPE (exp);
- }
-
- /* Strip no-op conversions. */
- orig_exp = exp;
- STRIP_TYPE_NOPS (exp);
-
- if (TREE_NO_WARNING (orig_exp))
- TREE_NO_WARNING (exp) = 1;
+ gcc_assert (INTEGRAL_TYPE_P (type));
/* Normally convert enums to int,
but convert wide enums to something wider. */
@@ -1400,6 +1377,8 @@ default_conversion (tree exp)
return convert (type, exp);
}
+ /* ??? This should no longer be needed now bit-fields have their
+ proper types. */
if (TREE_CODE (exp) == COMPONENT_REF
&& DECL_C_BIT_FIELD (TREE_OPERAND (exp, 1))
/* If it's thinner than an int, promote it like a
@@ -1418,6 +1397,48 @@ default_conversion (tree exp)
return convert (integer_type_node, exp);
}
+ return exp;
+}
+
+
+/* Perform default promotions for C data used in expressions.
+ Arrays and functions are converted to pointers;
+ enumeral types or short or char, to int.
+ In addition, manifest constants symbols are replaced by their values. */
+
+tree
+default_conversion (tree exp)
+{
+ tree orig_exp;
+ tree type = TREE_TYPE (exp);
+ enum tree_code code = TREE_CODE (type);
+
+ if (code == FUNCTION_TYPE || code == ARRAY_TYPE)
+ return default_function_array_conversion (exp);
+
+ /* Constants can be used directly unless they're not loadable. */
+ if (TREE_CODE (exp) == CONST_DECL)
+ exp = DECL_INITIAL (exp);
+
+ /* Replace a nonvolatile const static variable with its value unless
+ it is an array, in which case we must be sure that taking the
+ address of the array produces consistent results. */
+ else if (optimize && TREE_CODE (exp) == VAR_DECL && code != ARRAY_TYPE)
+ {
+ exp = decl_constant_value_for_broken_optimization (exp);
+ type = TREE_TYPE (exp);
+ }
+
+ /* Strip no-op conversions. */
+ orig_exp = exp;
+ STRIP_TYPE_NOPS (exp);
+
+ if (TREE_NO_WARNING (orig_exp))
+ TREE_NO_WARNING (exp) = 1;
+
+ if (INTEGRAL_TYPE_P (type))
+ return perform_integral_promotions (exp);
+
if (code == VOID_TYPE)
{
error ("void value not ignored as it ought to be");
@@ -2540,6 +2561,8 @@ build_unary_op (enum tree_code code, tree xarg, int flag)
break;
case TRUTH_NOT_EXPR:
+ /* ??? Why do most validation here but that for non-lvalue arrays
+ in c_objc_common_truthvalue_conversion? */
if (typecode != INTEGER_TYPE
&& typecode != REAL_TYPE && typecode != POINTER_TYPE
&& typecode != COMPLEX_TYPE
@@ -2549,7 +2572,7 @@ build_unary_op (enum tree_code code, tree xarg, int flag)
error ("wrong type argument to unary exclamation mark");
return error_mark_node;
}
- arg = lang_hooks.truthvalue_conversion (arg);
+ arg = c_objc_common_truthvalue_conversion (arg);
return invert_truthvalue (arg);
case NOP_EXPR:
@@ -2905,8 +2928,6 @@ build_conditional_expr (tree ifexp, tree op1, tree op2)
tree result_type = NULL;
tree orig_op1 = op1, orig_op2 = op2;
- ifexp = lang_hooks.truthvalue_conversion (default_conversion (ifexp));
-
/* Promote both alternatives. */
if (TREE_CODE (TREE_TYPE (op1)) != VOID_TYPE)
@@ -7295,8 +7316,8 @@ build_binary_op (enum tree_code code, tree orig_op0, tree orig_op1,
but that does not mean the operands should be
converted to ints! */
result_type = integer_type_node;
- op0 = lang_hooks.truthvalue_conversion (op0);
- op1 = lang_hooks.truthvalue_conversion (op1);
+ op0 = c_common_truthvalue_conversion (op0);
+ op1 = c_common_truthvalue_conversion (op1);
converted = 1;
}
break;
@@ -7776,3 +7797,34 @@ build_binary_op (enum tree_code code, tree orig_op0, tree orig_op1,
return result;
}
}
+
+
+/* Convert EXPR to be a truth-value, validating its type for this
+ purpose. Passes EXPR to default_function_array_conversion. */
+
+tree
+c_objc_common_truthvalue_conversion (tree expr)
+{
+ expr = default_function_array_conversion (expr);
+ switch (TREE_CODE (TREE_TYPE (expr)))
+ {
+ case ARRAY_TYPE:
+ error ("used array that cannot be converted to pointer where scalar is required");
+ return error_mark_node;
+
+ case RECORD_TYPE:
+ error ("used struct type value where scalar is required");
+ return error_mark_node;
+
+ case UNION_TYPE:
+ error ("used union type value where scalar is required");
+ return error_mark_node;
+
+ default:
+ break;
+ }
+
+ /* ??? Should we also give an error for void and vectors rather than
+ leaving those to give errors later? */
+ return c_common_truthvalue_conversion (expr);
+}
diff --git a/gcc/c.opt b/gcc/c.opt
index dbeffaaaf4d..8efeae423c6 100644
--- a/gcc/c.opt
+++ b/gcc/c.opt
@@ -18,6 +18,7 @@
; Software Foundation, 59 Temple Place - Suite 330, Boston, MA
; 02111-1307, USA.
+; See the GCC internals manual for a description of this file's format.
; Please try to keep this file in ASCII collating order.
@@ -606,9 +607,6 @@ fshort-wchar
C ObjC C++ ObjC++
Force the underlying type for \"wchar_t\" to be \"unsigned short\"
-fshow-column
-C ObjC C++ ObjC++
-
fsigned-bitfields
C ObjC C++ ObjC++
When \"signed\" or \"unsigned\" is not given make the bitfield signed
@@ -655,7 +653,7 @@ C++ ObjC++
Use __cxa_atexit to register destructors
fvisibility-inlines-hidden
-C++
+C++ ObjC++
Marks all inlined methods as having hidden visibility
fvtable-gc
diff --git a/gcc/cfglayout.c b/gcc/cfglayout.c
index 981bcd9e74b..655c9a1b397 100644
--- a/gcc/cfglayout.c
+++ b/gcc/cfglayout.c
@@ -523,6 +523,12 @@ reemit_insn_block_notes (void)
{
tree this_block;
+ /* Avoid putting scope notes between jump table and its label. */
+ if (JUMP_P (insn)
+ && (GET_CODE (PATTERN (insn)) == ADDR_VEC
+ || GET_CODE (PATTERN (insn)) == ADDR_DIFF_VEC))
+ continue;
+
this_block = insn_scope (insn);
/* For sequences compute scope resulting from merging all scopes
of instructions nested inside. */
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index 3aabc4071fb..b769f841085 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -724,11 +724,11 @@ cgraph_varpool_assemble_pending_decls (void)
while (cgraph_varpool_nodes_queue)
{
- tree decl = cgraph_varpool_nodes_queue->decl;
struct cgraph_varpool_node *node = cgraph_varpool_nodes_queue;
+ tree decl = node->decl;
cgraph_varpool_nodes_queue = cgraph_varpool_nodes_queue->next_needed;
- if (!TREE_ASM_WRITTEN (decl))
+ if (!TREE_ASM_WRITTEN (decl) && !node->alias)
{
assemble_variable (decl, 0, 1, 0);
changed = true;
diff --git a/gcc/cgraph.h b/gcc/cgraph.h
index 2a1c1b3b949..46f9f0a660d 100644
--- a/gcc/cgraph.h
+++ b/gcc/cgraph.h
@@ -153,6 +153,8 @@ struct cgraph_varpool_node GTY(())
bool finalized;
/* Set when function is scheduled to be assembled. */
bool output;
+ /* Set for aliases once they got through assemble_alias. */
+ bool alias;
};
extern GTY(()) struct cgraph_node *cgraph_nodes;
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index db0aaaf2ada..6e864d5e243 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -1030,7 +1030,12 @@ static int
cgraph_estimate_size_after_inlining (int times, struct cgraph_node *to,
struct cgraph_node *what)
{
- return (what->global.insns - INSNS_PER_CALL) * times + to->global.insns;
+ tree fndecl = what->decl;
+ tree arg;
+ int call_insns = PARAM_VALUE (PARAM_INLINE_CALL_COST);
+ for (arg = DECL_ARGUMENTS (fndecl); arg; arg = TREE_CHAIN (arg))
+ call_insns += estimate_move_cost (TREE_TYPE (arg));
+ return (what->global.insns - call_insns) * times + to->global.insns;
}
/* Estimate the growth caused by inlining NODE into all callees. */
@@ -1124,7 +1129,8 @@ cgraph_mark_inline_edge (struct cgraph_edge *e)
to->global.insns = new_insns;
}
gcc_assert (what->global.inlined_to == to);
- overall_insns += new_insns - old_insns;
+ if (new_insns > old_insns)
+ overall_insns += new_insns - old_insns;
ncalls_inlined++;
}
diff --git a/gcc/collect2.c b/gcc/collect2.c
index 90ad456b5fa..063cb9fbde1 100644
--- a/gcc/collect2.c
+++ b/gcc/collect2.c
@@ -35,19 +35,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
# define SIGCHLD SIGCLD
#endif
-#ifdef vfork /* Autoconf may define this to fork for us. */
-# define VFORK_STRING "fork"
-#else
-# define VFORK_STRING "vfork"
-#endif
-#ifdef HAVE_VFORK_H
-#include <vfork.h>
-#endif
-#ifdef VMS
-#define vfork() (decc$$alloc_vfork_blocks() >= 0 ? \
- lib$get_current_invo_context(decc$$get_vfork_jmpbuf()) : -1)
-#endif /* VMS */
-
#ifndef LIBRARY_PATH_ENV
#define LIBRARY_PATH_ENV "LIBRARY_PATH"
#endif
@@ -217,9 +204,6 @@ static struct head frame_tables; /* list of frame unwind info tables */
struct obstack temporary_obstack;
char * temporary_firstobj;
-/* Holds the return value of pexecute and fork. */
-int pid;
-
/* Structure to hold all the directories in which to search for files to
execute. */
@@ -251,7 +235,7 @@ static char *find_a_file (struct path_prefix *, const char *);
static void add_prefix (struct path_prefix *, const char *);
static void prefix_from_env (const char *, struct path_prefix *);
static void prefix_from_string (const char *, struct path_prefix *);
-static void do_wait (const char *);
+static void do_wait (const char *, struct pex_obj *);
static void fork_execute (const char *, char **);
static void maybe_unlink (const char *);
static void add_to_list (struct head *, const char *);
@@ -420,7 +404,7 @@ handler (int signo)
#endif
signal (signo, SIG_DFL);
- kill (getpid (), signo);
+ raise (signo);
}
@@ -1501,11 +1485,14 @@ main (int argc, char **argv)
/* Wait for a process to finish, and exit if a nonzero status is found. */
int
-collect_wait (const char *prog)
+collect_wait (const char *prog, struct pex_obj *pex)
{
int status;
- pwait (pid, &status, 0);
+ if (!pex_get_status (pex, 1, &status))
+ fatal_perror ("can't get program status");
+ pex_free (pex);
+
if (status)
{
if (WIFSIGNALED (status))
@@ -1524,9 +1511,9 @@ collect_wait (const char *prog)
}
static void
-do_wait (const char *prog)
+do_wait (const char *prog, struct pex_obj *pex)
{
- int ret = collect_wait (prog);
+ int ret = collect_wait (prog, pex);
if (ret != 0)
{
error ("%s returned %d exit status", prog, ret);
@@ -1537,14 +1524,12 @@ do_wait (const char *prog)
/* Execute a program, and wait for the reply. */
-void
+struct pex_obj *
collect_execute (const char *prog, char **argv, const char *redir)
{
- char *errmsg_fmt;
- char *errmsg_arg;
- int redir_handle = -1;
- int stdout_save = -1;
- int stderr_save = -1;
+ struct pex_obj *pex;
+ const char *errmsg;
+ int err;
if (vflag || debug)
{
@@ -1571,47 +1556,35 @@ collect_execute (const char *prog, char **argv, const char *redir)
if (argv[0] == 0)
fatal ("cannot find '%s'", prog);
- if (redir)
- {
- /* Open response file. */
- redir_handle = open (redir, O_WRONLY | O_TRUNC | O_CREAT);
-
- /* Duplicate the stdout and stderr file handles
- so they can be restored later. */
- stdout_save = dup (STDOUT_FILENO);
- if (stdout_save == -1)
- fatal_perror ("redirecting stdout: %s", redir);
- stderr_save = dup (STDERR_FILENO);
- if (stderr_save == -1)
- fatal_perror ("redirecting stdout: %s", redir);
-
- /* Redirect stdout & stderr to our response file. */
- dup2 (redir_handle, STDOUT_FILENO);
- dup2 (redir_handle, STDERR_FILENO);
- }
-
- pid = pexecute (argv[0], argv, argv[0], NULL, &errmsg_fmt, &errmsg_arg,
- (PEXECUTE_FIRST | PEXECUTE_LAST | PEXECUTE_SEARCH));
+ pex = pex_init (0, "collect2", NULL);
+ if (pex == NULL)
+ fatal_perror ("pex_init failed");
- if (redir)
+ errmsg = pex_run (pex,
+ (PEX_LAST | PEX_SEARCH
+ | (redir ? PEX_STDERR_TO_STDOUT : 0)),
+ argv[0], argv, redir, NULL, &err);
+ if (errmsg != NULL)
{
- /* Restore stdout and stderr to their previous settings. */
- dup2 (stdout_save, STDOUT_FILENO);
- dup2 (stderr_save, STDERR_FILENO);
-
- /* Close response file. */
- close (redir_handle);
+ if (err != 0)
+ {
+ errno = err;
+ fatal_perror (errmsg);
+ }
+ else
+ fatal (errmsg);
}
- if (pid == -1)
- fatal_perror (errmsg_fmt, errmsg_arg);
+ return pex;
}
static void
fork_execute (const char *prog, char **argv)
{
- collect_execute (prog, argv, NULL);
- do_wait (prog);
+ struct pex_obj *pex;
+
+ pex = collect_execute (prog, argv, NULL);
+ do_wait (prog, pex);
}
/* Unlink a file unless we are debugging. */
@@ -2033,11 +2006,15 @@ static void
scan_prog_file (const char *prog_name, enum pass which_pass)
{
void (*int_handler) (int);
+#ifdef SIGQUIT
void (*quit_handler) (int);
+#endif
char *real_nm_argv[4];
const char **nm_argv = (const char **) real_nm_argv;
int argc = 0;
- int pipe_fd[2];
+ struct pex_obj *pex;
+ const char *errmsg;
+ int err;
char *p, buf[1024];
FILE *inf;
@@ -2055,13 +2032,6 @@ scan_prog_file (const char *prog_name, enum pass which_pass)
nm_argv[argc++] = prog_name;
nm_argv[argc++] = (char *) 0;
- if (pipe (pipe_fd) < 0)
- fatal_perror ("pipe");
-
- inf = fdopen (pipe_fd[0], "r");
- if (inf == (FILE *) 0)
- fatal_perror ("fdopen");
-
/* Trace if needed. */
if (vflag)
{
@@ -2077,35 +2047,30 @@ scan_prog_file (const char *prog_name, enum pass which_pass)
fflush (stdout);
fflush (stderr);
- /* Spawn child nm on pipe. */
- pid = vfork ();
- if (pid == -1)
- fatal_perror (VFORK_STRING);
+ pex = pex_init (PEX_USE_PIPES, "collect2", NULL);
+ if (pex == NULL)
+ fatal_perror ("pex_init failed");
- if (pid == 0) /* child context */
+ errmsg = pex_run (pex, 0, nm_file_name, real_nm_argv, NULL, NULL, &err);
+ if (errmsg != NULL)
{
- /* setup stdout */
- if (dup2 (pipe_fd[1], 1) < 0)
- fatal_perror ("dup2 %d 1", pipe_fd[1]);
-
- if (close (pipe_fd[0]) < 0)
- fatal_perror ("close %d", pipe_fd[0]);
-
- if (close (pipe_fd[1]) < 0)
- fatal_perror ("close %d", pipe_fd[1]);
-
- execv (nm_file_name, real_nm_argv);
- fatal_perror ("execv %s", nm_file_name);
+ if (err != 0)
+ {
+ errno = err;
+ fatal_perror (errmsg);
+ }
+ else
+ fatal (errmsg);
}
- /* Parent context from here on. */
int_handler = (void (*) (int)) signal (SIGINT, SIG_IGN);
#ifdef SIGQUIT
quit_handler = (void (*) (int)) signal (SIGQUIT, SIG_IGN);
#endif
- if (close (pipe_fd[1]) < 0)
- fatal_perror ("close %d", pipe_fd[1]);
+ inf = pex_read_output (pex, 0);
+ if (inf == NULL)
+ fatal_perror ("can't open nm output");
if (debug)
fprintf (stderr, "\nnm output with constructors/destructors.\n");
@@ -2179,10 +2144,7 @@ scan_prog_file (const char *prog_name, enum pass which_pass)
if (debug)
fprintf (stderr, "\n");
- if (fclose (inf) != 0)
- fatal_perror ("fclose");
-
- do_wait (nm_file_name);
+ do_wait (nm_file_name, pex);
signal (SIGINT, int_handler);
#ifdef SIGQUIT
@@ -2202,11 +2164,15 @@ scan_libraries (const char *prog_name)
static struct head libraries; /* list of shared libraries found */
struct id *list;
void (*int_handler) (int);
+#ifdef SIGQUIT
void (*quit_handler) (int);
+#endif
char *real_ldd_argv[4];
const char **ldd_argv = (const char **) real_ldd_argv;
int argc = 0;
- int pipe_fd[2];
+ struct pex_obj *pex;
+ const char *errmsg;
+ int err;
char buf[1024];
FILE *inf;
@@ -2221,13 +2187,6 @@ scan_libraries (const char *prog_name)
ldd_argv[argc++] = prog_name;
ldd_argv[argc++] = (char *) 0;
- if (pipe (pipe_fd) < 0)
- fatal_perror ("pipe");
-
- inf = fdopen (pipe_fd[0], "r");
- if (inf == (FILE *) 0)
- fatal_perror ("fdopen");
-
/* Trace if needed. */
if (vflag)
{
@@ -2243,35 +2202,30 @@ scan_libraries (const char *prog_name)
fflush (stdout);
fflush (stderr);
- /* Spawn child ldd on pipe. */
- pid = vfork ();
- if (pid == -1)
- fatal_perror (VFORK_STRING);
+ pex = pex_init (PEX_USE_PIPES, "collect2", NULL);
+ if (pex == NULL)
+ fatal_perror ("pex_init failed");
- if (pid == 0) /* child context */
+ errmsg = pex_run (pex, 0, ldd_file_name, real_ldd_argv, NULL, NULL, &err);
+ if (errmsg != NULL)
{
- /* setup stdout */
- if (dup2 (pipe_fd[1], 1) < 0)
- fatal_perror ("dup2 %d 1", pipe_fd[1]);
-
- if (close (pipe_fd[0]) < 0)
- fatal_perror ("close %d", pipe_fd[0]);
-
- if (close (pipe_fd[1]) < 0)
- fatal_perror ("close %d", pipe_fd[1]);
-
- execv (ldd_file_name, real_ldd_argv);
- fatal_perror ("execv %s", ldd_file_name);
+ if (err != 0)
+ {
+ errno = err;
+ fatal_perror (errmsg);
+ }
+ else
+ fatal (errmsg);
}
- /* Parent context from here on. */
int_handler = (void (*) (int)) signal (SIGINT, SIG_IGN);
#ifdef SIGQUIT
quit_handler = (void (*) (int)) signal (SIGQUIT, SIG_IGN);
#endif
- if (close (pipe_fd[1]) < 0)
- fatal_perror ("close %d", pipe_fd[1]);
+ inf = pex_read_output (pex, 0);
+ if (inf == NULL)
+ fatal_perror ("can't open ldd output");
if (debug)
notice ("\nldd output with constructors/destructors.\n");
@@ -2309,10 +2263,7 @@ scan_libraries (const char *prog_name)
if (debug)
fprintf (stderr, "\n");
- if (fclose (inf) != 0)
- fatal_perror ("fclose");
-
- do_wait (ldd_file_name);
+ do_wait (ldd_file_name, pex);
signal (SIGINT, int_handler);
#ifdef SIGQUIT
diff --git a/gcc/collect2.h b/gcc/collect2.h
index d25009bccaa..9eabc63b252 100644
--- a/gcc/collect2.h
+++ b/gcc/collect2.h
@@ -1,5 +1,5 @@
/* Header file for collect/tlink routines.
- Copyright (C) 1998, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GCC.
@@ -23,11 +23,11 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
extern void do_tlink (char **, char **);
-extern void collect_execute (const char *, char **, const char *);
+extern struct pex_obj *collect_execute (const char *, char **, const char *);
extern void collect_exit (int) ATTRIBUTE_NORETURN;
-extern int collect_wait (const char *);
+extern int collect_wait (const char *, struct pex_obj *);
extern void dump_file (const char *);
diff --git a/gcc/common.opt b/gcc/common.opt
index e3b64a8058f..91085fa5ad0 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -19,7 +19,7 @@
; Software Foundation, 59 Temple Place - Suite 330, Boston, MA
; 02111-1307, USA.
-; See c.opt for a description of this file's format.
+; See the GCC internals manual for a description of this file's format.
; Please try to keep this file in ASCII collating order.
@@ -732,6 +732,10 @@ fshared-data
Common Report Var(flag_shared_data)
Mark data as shared rather than private
+fshow-column
+Common C ObjC C++ ObjC++ Report Var(flag_show_column) Init(1)
+Show column numbers in diagnostics, when available. Default on.
+
fsignaling-nans
Common Report Var(flag_signaling_nans)
Disable optimizations observable by IEEE signaling NaNs
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 3eb900467ba..2bfd9e73ab7 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -592,15 +592,15 @@ alpha*-dec-osf[45]*)
extra_headers=va_list.h
case ${target} in
*-*-osf4*)
- # Set target_cpu_default except on 4.0a.
+ # Define TARGET_SUPPORT_ARCH except on 4.0a.
case ${target} in
*-*-osf4.0a) ;;
- *) target_cpu_default=MASK_SUPPORT_ARCH
+ *) tm_defines="TARGET_SUPPORT_ARCH=1"
esac
;;
*-*-osf5*)
tm_file="${tm_file} alpha/osf5.h"
- target_cpu_default=MASK_SUPPORT_ARCH
+ tm_defines="TARGET_SUPPORT_ARCH=1"
;;
esac
case ${enable_threads} in
diff --git a/gcc/config.in b/gcc/config.in
index 34fb521f4da..eb58153d8f8 100644
--- a/gcc/config.in
+++ b/gcc/config.in
@@ -54,6 +54,9 @@
that are supported for each access macro. This is relatively cheap. */
#undef ENABLE_RTL_FLAG_CHECKING
+/* Define if you want runtime assertions enabled. This is a cheap check. */
+#undef ENABLE_RUNTIME_CHECKING
+
/* Define if you want all operations on trees (the basic data structure of the
front ends) to be checked for dynamic type safety at runtime. This is
moderately expensive. The tree browser debugging routines will also be
diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
index 1b7a48291d2..7291fa93f74 100644
--- a/gcc/config/arc/arc.c
+++ b/gcc/config/arc/arc.c
@@ -1347,7 +1347,7 @@ arc_output_function_epilogue (FILE *file, HOST_WIDE_INT size)
/* ??? If stack intactness is important, always emit now. */
if (MUST_SAVE_RETURN_ADDR && epilogue_delay != NULL_RTX)
{
- final_scan_insn (XEXP (epilogue_delay, 0), file, 1, -2, 1, NULL);
+ final_scan_insn (XEXP (epilogue_delay, 0), file, 1, 0, 1, NULL);
epilogue_delay = NULL_RTX;
}
@@ -1379,7 +1379,7 @@ arc_output_function_epilogue (FILE *file, HOST_WIDE_INT size)
{
if (epilogue_delay)
{
- final_scan_insn (XEXP (epilogue_delay, 0), file, 1, -2, 1,
+ final_scan_insn (XEXP (epilogue_delay, 0), file, 1, 0, 1,
NULL);
}
}
@@ -1405,7 +1405,7 @@ arc_output_function_epilogue (FILE *file, HOST_WIDE_INT size)
abort ();
if (restored < size)
abort ();
- final_scan_insn (XEXP (epilogue_delay, 0), file, 1, -2, 1, NULL);
+ final_scan_insn (XEXP (epilogue_delay, 0), file, 1, 0, 1, NULL);
}
else if (frame_pointer_needed && !fp_restored_p)
{
diff --git a/gcc/config/arm/arm-protos.h b/gcc/config/arm/arm-protos.h
index e7811ca8c8e..f609b3907dc 100644
--- a/gcc/config/arm/arm-protos.h
+++ b/gcc/config/arm/arm-protos.h
@@ -38,6 +38,7 @@ extern HOST_WIDE_INT arm_compute_initial_elimination_offset (unsigned int,
unsigned int);
extern HOST_WIDE_INT thumb_compute_initial_elimination_offset (unsigned int,
unsigned int);
+extern unsigned int arm_dbx_register_number (unsigned int);
#ifdef TREE_CODE
extern int arm_return_in_memory (tree);
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index b307983892c..dc7d410f761 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -14641,3 +14641,30 @@ arm_shift_truncation_mask (enum machine_mode mode)
{
return mode == SImode ? 255 : 0;
}
+
+
+/* Map internal gcc register numbers to DWARF2 register numbers. */
+
+unsigned int
+arm_dbx_register_number (unsigned int regno)
+{
+ if (regno < 16)
+ return regno;
+
+ /* TODO: Legacy targets output FPA regs as registers 16-23 for backwards
+ compatibility. The EABI defines them as registers 96-103. */
+ if (IS_FPA_REGNUM (regno))
+ return (TARGET_AAPCS_BASED ? 96 : 16) + regno - FIRST_FPA_REGNUM;
+
+ if (IS_VFP_REGNUM (regno))
+ return 64 + regno - FIRST_VFP_REGNUM;
+
+ if (IS_IWMMXT_GR_REGNUM (regno))
+ return 104 + regno - FIRST_IWMMXT_GR_REGNUM;
+
+ if (IS_IWMMXT_REGNUM (regno))
+ return 112 + regno - FIRST_IWMMXT_REGNUM;
+
+ abort ();
+}
+
diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index 69958779746..9f4cc3c07ad 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -1032,6 +1032,8 @@ extern const char * structure_size_string;
/* ARM floating pointer registers. */
#define FIRST_FPA_REGNUM 16
#define LAST_FPA_REGNUM 23
+#define IS_FPA_REGNUM(REGNUM) \
+ (((REGNUM) >= FIRST_FPA_REGNUM) && ((REGNUM) <= LAST_FPA_REGNUM))
#define FIRST_IWMMXT_GR_REGNUM 43
#define LAST_IWMMXT_GR_REGNUM 46
@@ -1064,6 +1066,8 @@ extern const char * structure_size_string;
/* VFP adds 32 + 1 more. */
#define FIRST_PSEUDO_REGISTER 96
+#define DBX_REGISTER_NUMBER(REGNO) arm_dbx_register_number (REGNO)
+
/* Value should be nonzero if functions must have frame pointers.
Zero means the frame pointer need not be set up (and parms may be accessed
via the stack pointer) in functions that seem suitable.
diff --git a/gcc/config/cris/cris.c b/gcc/config/cris/cris.c
index a4c61b41e61..314ae0f7e4e 100644
--- a/gcc/config/cris/cris.c
+++ b/gcc/config/cris/cris.c
@@ -125,7 +125,7 @@ static bool cris_pass_by_reference (CUMULATIVE_ARGS *, enum machine_mode,
tree, bool);
static int cris_arg_partial_bytes (CUMULATIVE_ARGS *, enum machine_mode,
tree, bool);
-static tree cris_md_asm_clobbers (tree);
+static tree cris_md_asm_clobbers (tree, tree, tree);
/* This is the argument from the "-max-stack-stackframe=" option. */
const char *cris_max_stackframe_str;
@@ -3060,8 +3060,38 @@ cris_arg_partial_bytes (CUMULATIVE_ARGS *ca, enum machine_mode mode,
/* Worker function for TARGET_MD_ASM_CLOBBERS. */
static tree
-cris_md_asm_clobbers (tree clobbers)
+cris_md_asm_clobbers (tree outputs, tree inputs, tree clobbers)
{
+ HARD_REG_SET mof_set;
+ tree t;
+
+ CLEAR_HARD_REG_SET (mof_set);
+ SET_HARD_REG_BIT (mof_set, CRIS_MOF_REGNUM);
+
+ for (t = outputs; t != NULL; t = TREE_CHAIN (t))
+ {
+ tree val = TREE_VALUE (t);
+
+ /* The constraint letter for the singleton register class of MOF
+ is 'h'. If it's mentioned in the constraints, the asm is
+ MOF-aware and adding it to the clobbers would cause it to have
+ impossible constraints. */
+ if (strchr (TREE_STRING_POINTER (TREE_VALUE (TREE_PURPOSE (t))),
+ 'h') != NULL
+ || decl_overlaps_hard_reg_set_p (val, mof_set))
+ return clobbers;
+ }
+
+ for (t = inputs; t != NULL; t = TREE_CHAIN (t))
+ {
+ tree val = TREE_VALUE (t);
+
+ if (strchr (TREE_STRING_POINTER (TREE_VALUE (TREE_PURPOSE (t))),
+ 'h') != NULL
+ || decl_overlaps_hard_reg_set_p (val, mof_set))
+ return clobbers;
+ }
+
return tree_cons (NULL_TREE,
build_string (strlen (reg_names[CRIS_MOF_REGNUM]),
reg_names[CRIS_MOF_REGNUM]),
diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h
index 937b4977fcd..b26715e26ef 100644
--- a/gcc/config/darwin.h
+++ b/gcc/config/darwin.h
@@ -585,9 +585,11 @@ extern const char *darwin_fix_and_continue_switch;
#undef ASM_OUTPUT_ALIGNED_DECL_LOCAL
#define ASM_OUTPUT_ALIGNED_DECL_LOCAL(FILE, DECL, NAME, SIZE, ALIGN) \
do { \
+ unsigned HOST_WIDE_INT _new_size = SIZE; \
fputs (".lcomm ", (FILE)); \
assemble_name ((FILE), (NAME)); \
- fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", (SIZE), \
+ if (_new_size == 0) _new_size = 1; \
+ fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", _new_size, \
floor_log2 ((ALIGN) / BITS_PER_UNIT)); \
if ((DECL) && ((TREE_STATIC (DECL) \
&& (!DECL_COMMON (DECL) || !TREE_PUBLIC (DECL))) \
diff --git a/gcc/config/frv/frv-protos.h b/gcc/config/frv/frv-protos.h
index 534188eade1..23bb792ed89 100644
--- a/gcc/config/frv/frv-protos.h
+++ b/gcc/config/frv/frv-protos.h
@@ -20,25 +20,6 @@ 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. */
-/* Define the information needed to generate branch and scc insns. This is
- stored from the compare operation. Note that we can't use "rtx" here
- since it hasn't been defined! */
-
-/* Define global data defined in frv.c. */
-extern const char *frv_branch_cost_string; /* -mbranch-cost option */
-extern int frv_branch_cost_int; /* value of -mbranch_cost */
-
-extern const char *frv_cpu_string; /* -mcpu= option */
-
-extern const char *frv_condexec_insns_str; /* -mcond-exec-insns= option */
-extern int frv_condexec_insns; /* value of -mcond-exec-insns */
-
-extern const char *frv_condexec_temps_str; /* -mcond-exec-temps= option */
-extern int frv_condexec_temps; /* value of -mcond-exec-temps */
-
-extern const char *frv_sched_lookahead_str; /* -msched-lookahead= option */
-extern int frv_sched_lookahead; /* value -msched-lookahead= */
-
/* CPU type. This must be identical to the cpu enumeration in frv.md. */
typedef enum frv_cpu
{
diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c
index 25b2f7610d9..8c6e54ddae3 100644
--- a/gcc/config/frv/frv.c
+++ b/gcc/config/frv/frv.c
@@ -247,27 +247,12 @@ enum reg_class reg_class_from_letter[256];
/* Cached value of frv_stack_info. */
static frv_stack_t *frv_stack_cache = (frv_stack_t *)0;
-/* -mbranch-cost= support */
-const char *frv_branch_cost_string;
-int frv_branch_cost_int = DEFAULT_BRANCH_COST;
-
/* -mcpu= support */
-const char *frv_cpu_string; /* -mcpu= option */
frv_cpu_t frv_cpu_type = CPU_TYPE; /* value of -mcpu= */
-/* -mcond-exec-insns= support */
-const char *frv_condexec_insns_str; /* -mcond-exec-insns= option */
-int frv_condexec_insns = DEFAULT_CONDEXEC_INSNS; /* value of -mcond-exec-insns*/
-
-/* -mcond-exec-temps= support */
-const char *frv_condexec_temps_str; /* -mcond-exec-temps= option */
-int frv_condexec_temps = DEFAULT_CONDEXEC_TEMPS; /* value of -mcond-exec-temps*/
-
-/* -msched-lookahead=n */
-const char *frv_sched_lookahead_str; /* -msched-lookahead=n */
-int frv_sched_lookahead = 4; /* -msched-lookahead=n */
-
/* Forward references */
+
+static bool frv_handle_option (size_t, const char *, int);
static int frv_default_flags_for_cpu (void);
static int frv_string_begins_with (tree, const char *);
static FRV_INLINE bool frv_small_data_reloc_p (rtx, int);
@@ -380,6 +365,13 @@ static bool frv_must_pass_in_stack (enum machine_mode mode, tree type);
static int frv_arg_partial_bytes (CUMULATIVE_ARGS *, enum machine_mode,
tree, bool);
+/* Allow us to easily change the default for -malloc-cc. */
+#ifndef DEFAULT_NO_ALLOC_CC
+#define MASK_DEFAULT_ALLOC_CC MASK_ALLOC_CC
+#else
+#define MASK_DEFAULT_ALLOC_CC 0
+#endif
+
/* Initialize the GCC target structure. */
#undef TARGET_ASM_FUNCTION_PROLOGUE
#define TARGET_ASM_FUNCTION_PROLOGUE frv_function_prologue
@@ -387,6 +379,17 @@ static int frv_arg_partial_bytes (CUMULATIVE_ARGS *, enum machine_mode,
#define TARGET_ASM_FUNCTION_EPILOGUE frv_function_epilogue
#undef TARGET_ASM_INTEGER
#define TARGET_ASM_INTEGER frv_assemble_integer
+#undef TARGET_DEFAULT_TARGET_FLAGS
+#define TARGET_DEFAULT_TARGET_FLAGS \
+ (MASK_DEFAULT_ALLOC_CC \
+ | MASK_COND_MOVE \
+ | MASK_SCC \
+ | MASK_COND_EXEC \
+ | MASK_VLIW_BRANCH \
+ | MASK_MULTI_CE \
+ | MASK_NESTED_CE)
+#undef TARGET_HANDLE_OPTION
+#define TARGET_HANDLE_OPTION frv_handle_option
#undef TARGET_INIT_BUILTINS
#define TARGET_INIT_BUILTINS frv_init_builtins
#undef TARGET_EXPAND_BUILTIN
@@ -519,6 +522,41 @@ frv_cannot_force_const_mem (rtx x ATTRIBUTE_UNUSED)
return TARGET_FDPIC;
}
+/* Implement TARGET_HANDLE_OPTION. */
+
+static bool
+frv_handle_option (size_t code, const char *arg, int value ATTRIBUTE_UNUSED)
+{
+ switch (code)
+ {
+ case OPT_mcpu_:
+ if (strcmp (arg, "simple") == 0)
+ frv_cpu_type = FRV_CPU_SIMPLE;
+ else if (strcmp (arg, "tomcat") == 0)
+ frv_cpu_type = FRV_CPU_TOMCAT;
+ else if (strcmp (arg, "fr550") == 0)
+ frv_cpu_type = FRV_CPU_FR550;
+ else if (strcmp (arg, "fr500") == 0)
+ frv_cpu_type = FRV_CPU_FR500;
+ else if (strcmp (arg, "fr450") == 0)
+ frv_cpu_type = FRV_CPU_FR450;
+ else if (strcmp (arg, "fr405") == 0)
+ frv_cpu_type = FRV_CPU_FR405;
+ else if (strcmp (arg, "fr400") == 0)
+ frv_cpu_type = FRV_CPU_FR400;
+ else if (strcmp (arg, "fr300") == 0)
+ frv_cpu_type = FRV_CPU_FR300;
+ else if (strcmp (arg, "frv") == 0)
+ frv_cpu_type = FRV_CPU_GENERIC;
+ else
+ return false;
+ return true;
+
+ default:
+ return true;
+ }
+}
+
static int
frv_default_flags_for_cpu (void)
{
@@ -563,47 +601,6 @@ frv_override_options (void)
int regno;
unsigned int i;
- /* Set the cpu type. */
- if (frv_cpu_string)
- {
- if (strcmp (frv_cpu_string, "simple") == 0)
- frv_cpu_type = FRV_CPU_SIMPLE;
-
- else if (strcmp (frv_cpu_string, "tomcat") == 0)
- frv_cpu_type = FRV_CPU_TOMCAT;
-
- else if (strncmp (frv_cpu_string, "fr", sizeof ("fr")-1) != 0)
- error ("Unknown cpu: -mcpu=%s", frv_cpu_string);
-
- else
- {
- const char *p = frv_cpu_string + sizeof ("fr") - 1;
- if (strcmp (p, "550") == 0)
- frv_cpu_type = FRV_CPU_FR550;
-
- else if (strcmp (p, "500") == 0)
- frv_cpu_type = FRV_CPU_FR500;
-
- else if (strcmp (p, "450") == 0)
- frv_cpu_type = FRV_CPU_FR450;
-
- else if (strcmp (p, "405") == 0)
- frv_cpu_type = FRV_CPU_FR405;
-
- else if (strcmp (p, "400") == 0)
- frv_cpu_type = FRV_CPU_FR400;
-
- else if (strcmp (p, "300") == 0)
- frv_cpu_type = FRV_CPU_FR300;
-
- else if (strcmp (p, "v") == 0)
- frv_cpu_type = FRV_CPU_GENERIC;
-
- else
- error ("Unknown cpu: -mcpu=%s", frv_cpu_string);
- }
- }
-
target_flags |= (frv_default_flags_for_cpu () & ~target_flags_explicit);
/* -mlibrary-pic sets -fPIC and -G0 and also suppresses warnings from the
@@ -620,22 +617,6 @@ frv_override_options (void)
}
}
- /* Change the branch cost value. */
- if (frv_branch_cost_string)
- frv_branch_cost_int = atoi (frv_branch_cost_string);
-
- /* Change the # of insns to be converted to conditional execution. */
- if (frv_condexec_insns_str)
- frv_condexec_insns = atoi (frv_condexec_insns_str);
-
- /* Change # of temporary registers used to hold integer constants. */
- if (frv_condexec_temps_str)
- frv_condexec_temps = atoi (frv_condexec_temps_str);
-
- /* Change scheduling look ahead. */
- if (frv_sched_lookahead_str)
- frv_sched_lookahead = atoi (frv_sched_lookahead_str);
-
/* A C expression whose value is a register class containing hard
register REGNO. In general there is more than one such class;
choose a class which is "minimal", meaning that no smaller class
@@ -6793,8 +6774,8 @@ frv_ifcvt_modify_tests (ce_if_block_t *ce_info, rtx *p_true, rtx *p_false)
/* Make sure we are only dealing with hard registers. Also honor the
-mno-cond-exec switch, and -mno-nested-cond-exec switches if
applicable. */
- if (!reload_completed || TARGET_NO_COND_EXEC
- || (TARGET_NO_NESTED_CE && ce_info->pass > 1))
+ if (!reload_completed || !TARGET_COND_EXEC
+ || (!TARGET_NESTED_CE && ce_info->pass > 1))
goto fail;
/* Figure out which registers we can allocate for our own purposes. Only
@@ -7153,7 +7134,7 @@ frv_ifcvt_modify_multiple_tests (ce_if_block_t *ce_info,
debug_rtx (*p_false);
}
- if (TARGET_NO_MULTI_CE)
+ if (!TARGET_MULTI_CE)
goto fail;
if (GET_CODE (cr) != REG)
@@ -8920,7 +8901,7 @@ frv_for_each_packet (void (*handle_packet) (void))
/* Early exit if we don't want to pack insns. */
if (!optimize
|| !flag_schedule_insns_after_reload
- || TARGET_NO_VLIW_BRANCH
+ || !TARGET_VLIW_BRANCH
|| frv_packet.issue_rate == 1)
return false;
diff --git a/gcc/config/frv/frv.h b/gcc/config/frv/frv.h
index 148ecae42e6..0378d366860 100644
--- a/gcc/config/frv/frv.h
+++ b/gcc/config/frv/frv.h
@@ -212,13 +212,6 @@
#define CPU_TYPE FRV_CPU_FR500
#endif
-/* Allow us to easily change the default for -malloc-cc. */
-#ifndef DEFAULT_NO_ALLOC_CC
-#define MASK_DEFAULT_ALLOC_CC MASK_ALLOC_CC
-#else
-#define MASK_DEFAULT_ALLOC_CC 0
-#endif
-
/* Run-time target specifications */
#define TARGET_CPU_CPP_BUILTINS() \
@@ -275,104 +268,6 @@
while (0)
-/* This declaration should be present. */
-extern int target_flags;
-
-/* This series of macros is to allow compiler command arguments to enable or
- disable the use of optional features of the target machine. For example,
- one machine description serves both the 68000 and the 68020; a command
- argument tells the compiler whether it should use 68020-only instructions or
- not. This command argument works by means of a macro `TARGET_68020' that
- tests a bit in `target_flags'.
-
- Define a macro `TARGET_FEATURENAME' for each such option. Its definition
- should test a bit in `target_flags'; for example:
-
- #define TARGET_68020 (target_flags & 1)
-
- One place where these macros are used is in the condition-expressions of
- instruction patterns. Note how `TARGET_68020' appears frequently in the
- 68000 machine description file, `m68k.md'. Another place they are used is
- in the definitions of the other macros in the `MACHINE.h' file. */
-
-#define MASK_GPR_32 0x00000001 /* Limit gprs to 32 registers */
-#define MASK_FPR_32 0x00000002 /* Limit fprs to 32 registers */
-#define MASK_SOFT_FLOAT 0x00000004 /* Use software floating point */
-#define MASK_ALLOC_CC 0x00000008 /* Dynamically allocate icc/fcc's */
-#define MASK_DWORD 0x00000010 /* Change ABi to allow dbl word insns*/
-#define MASK_DOUBLE 0x00000020 /* Use double precision instructions */
-#define MASK_MEDIA 0x00000040 /* Use media instructions */
-#define MASK_MULADD 0x00000080 /* Use multiply add/subtract insns */
-#define MASK_LIBPIC 0x00000100 /* -fpic that can be linked w/o pic */
-#define MASK_ACC_4 0x00000200 /* Only use four media accumulators */
-#define MASK_PACK 0x00000400 /* Set to enable packed output */
-#define MASK_LONG_CALLS 0x00000800 /* Use indirect calls */
-#define MASK_ALIGN_LABELS 0x00001000 /* Optimize label alignments */
-#define MASK_LINKED_FP 0x00002000 /* Follow ABI linkage requirements. */
-#define MASK_BIG_TLS 0x00008000 /* Assume a big TLS segment */
-
- /* put debug masks up high */
-#define MASK_DEBUG_ARG 0x40000000 /* debug argument handling */
-#define MASK_DEBUG_ADDR 0x20000000 /* debug go_if_legitimate_address */
-#define MASK_DEBUG_STACK 0x10000000 /* debug stack frame */
-#define MASK_DEBUG 0x08000000 /* general debugging switch */
-#define MASK_DEBUG_LOC 0x04000000 /* optimize line # table */
-#define MASK_DEBUG_COND_EXEC 0x02000000 /* debug cond exec code */
-#define MASK_NO_COND_MOVE 0x01000000 /* disable conditional moves */
-#define MASK_NO_SCC 0x00800000 /* disable set conditional codes */
-#define MASK_NO_COND_EXEC 0x00400000 /* disable conditional execution */
-#define MASK_NO_VLIW_BRANCH 0x00200000 /* disable repacking branches */
-#define MASK_NO_MULTI_CE 0x00100000 /* disable multi-level cond exec */
-#define MASK_NO_NESTED_CE 0x00080000 /* disable nested cond exec */
-#define MASK_FDPIC 0x00040000 /* Follow the new uClinux ABI. */
-#define MASK_INLINE_PLT 0x00020000 /* Inline FDPIC PLTs. */
-#define MASK_GPREL_RO 0x00010000 /* Use GPREL for read-only data. */
-
-#define MASK_DEFAULT MASK_DEFAULT_ALLOC_CC
-
-#define TARGET_GPR_32 ((target_flags & MASK_GPR_32) != 0)
-#define TARGET_FPR_32 ((target_flags & MASK_FPR_32) != 0)
-#define TARGET_SOFT_FLOAT ((target_flags & MASK_SOFT_FLOAT) != 0)
-#define TARGET_ALLOC_CC ((target_flags & MASK_ALLOC_CC) != 0)
-#define TARGET_DWORD ((target_flags & MASK_DWORD) != 0)
-#define TARGET_DOUBLE ((target_flags & MASK_DOUBLE) != 0)
-#define TARGET_MEDIA ((target_flags & MASK_MEDIA) != 0)
-#define TARGET_MULADD ((target_flags & MASK_MULADD) != 0)
-#define TARGET_LIBPIC ((target_flags & MASK_LIBPIC) != 0)
-#define TARGET_ACC_4 ((target_flags & MASK_ACC_4) != 0)
-#define TARGET_DEBUG_ARG ((target_flags & MASK_DEBUG_ARG) != 0)
-#define TARGET_DEBUG_ADDR ((target_flags & MASK_DEBUG_ADDR) != 0)
-#define TARGET_DEBUG_STACK ((target_flags & MASK_DEBUG_STACK) != 0)
-#define TARGET_DEBUG ((target_flags & MASK_DEBUG) != 0)
-#define TARGET_DEBUG_LOC ((target_flags & MASK_DEBUG_LOC) != 0)
-#define TARGET_DEBUG_COND_EXEC ((target_flags & MASK_DEBUG_COND_EXEC) != 0)
-#define TARGET_NO_COND_MOVE ((target_flags & MASK_NO_COND_MOVE) != 0)
-#define TARGET_NO_SCC ((target_flags & MASK_NO_SCC) != 0)
-#define TARGET_NO_COND_EXEC ((target_flags & MASK_NO_COND_EXEC) != 0)
-#define TARGET_NO_VLIW_BRANCH ((target_flags & MASK_NO_VLIW_BRANCH) != 0)
-#define TARGET_NO_MULTI_CE ((target_flags & MASK_NO_MULTI_CE) != 0)
-#define TARGET_NO_NESTED_CE ((target_flags & MASK_NO_NESTED_CE) != 0)
-#define TARGET_FDPIC ((target_flags & MASK_FDPIC) != 0)
-#define TARGET_INLINE_PLT ((target_flags & MASK_INLINE_PLT) != 0)
-#define TARGET_BIG_TLS ((target_flags & MASK_BIG_TLS) != 0)
-#define TARGET_GPREL_RO ((target_flags & MASK_GPREL_RO) != 0)
-#define TARGET_PACK ((target_flags & MASK_PACK) != 0)
-#define TARGET_LONG_CALLS ((target_flags & MASK_LONG_CALLS) != 0)
-#define TARGET_ALIGN_LABELS ((target_flags & MASK_ALIGN_LABELS) != 0)
-#define TARGET_LINKED_FP ((target_flags & MASK_LINKED_FP) != 0)
-
-#define TARGET_GPR_64 (! TARGET_GPR_32)
-#define TARGET_FPR_64 (! TARGET_FPR_32)
-#define TARGET_HARD_FLOAT (! TARGET_SOFT_FLOAT)
-#define TARGET_FIXED_CC (! TARGET_ALLOC_CC)
-#define TARGET_COND_MOVE (! TARGET_NO_COND_MOVE)
-#define TARGET_SCC (! TARGET_NO_SCC)
-#define TARGET_COND_EXEC (! TARGET_NO_COND_EXEC)
-#define TARGET_VLIW_BRANCH (! TARGET_NO_VLIW_BRANCH)
-#define TARGET_MULTI_CE (! TARGET_NO_MULTI_CE)
-#define TARGET_NESTED_CE (! TARGET_NO_NESTED_CE)
-#define TARGET_ACC_8 (! TARGET_ACC_4)
-
#define TARGET_HAS_FPRS (TARGET_HARD_FLOAT || TARGET_MEDIA)
#define NUM_GPRS (TARGET_GPR_32? 32 : 64)
@@ -420,122 +315,6 @@ extern int target_flags;
#define HAVE_AS_TLS 0
#endif
-/* This macro defines names of command options to set and clear bits in
- `target_flags'. Its definition is an initializer with a subgrouping for
- each command option.
-
- Each subgrouping contains a string constant, that defines the option name,
- a number, which contains the bits to set in `target_flags', and an optional
- second string which is the textual description that will be displayed when
- the user passes --help on the command line. If the number entry is negative
- then the specified bits will be cleared instead of being set. If the second
- string entry is present but empty, then no help information will be displayed
- for that option, but it will not count as an undocumented option. The actual
- option name, asseen on the command line is made by appending `-m' to the
- specified name.
-
- One of the subgroupings should have a null string. The number in this
- grouping is the default value for `target_flags'. Any target options act
- starting with that value.
-
- Here is an example which defines `-m68000' and `-m68020' with opposite
- meanings, and picks the latter as the default:
-
- #define TARGET_SWITCHES \
- { { "68020", 1, ""}, \
- { "68000", -1, "Compile for the m68000"}, \
- { "", 1, }}
-
- This declaration must be present. */
-
-#define TARGET_SWITCHES \
-{{ "gpr-32", MASK_GPR_32, "Only use 32 gprs"}, \
- { "gpr-64", -MASK_GPR_32, "Use 64 gprs"}, \
- { "fpr-32", MASK_FPR_32, "Only use 32 fprs"}, \
- { "fpr-64", -MASK_FPR_32, "Use 64 fprs"}, \
- { "hard-float", -MASK_SOFT_FLOAT, "Use hardware floating point" },\
- { "soft-float", MASK_SOFT_FLOAT, "Use software floating point" },\
- { "alloc-cc", MASK_ALLOC_CC, "Dynamically allocate cc's" }, \
- { "fixed-cc", -MASK_ALLOC_CC, "Just use icc0/fcc0" }, \
- { "dword", MASK_DWORD, "Change ABI to allow double word insns" }, \
- { "no-dword", -MASK_DWORD, "Do not use double word insns" }, \
- { "double", MASK_DOUBLE, "Use fp double instructions" }, \
- { "no-double", -MASK_DOUBLE, "Do not use fp double insns" }, \
- { "media", MASK_MEDIA, "Use media instructions" }, \
- { "no-media", -MASK_MEDIA, "Do not use media insns" }, \
- { "muladd", MASK_MULADD, "Use multiply add/subtract instructions" }, \
- { "no-muladd", -MASK_MULADD, "Do not use multiply add/subtract insns" }, \
- { "ultilib-library-pic", 0, "Link with the library-pic libraries" }, \
- { "library-pic", MASK_LIBPIC, "PIC support for building libraries" }, \
- { "acc-4", MASK_ACC_4, "Use 4 media accumulators" }, \
- { "acc-8", -MASK_ACC_4, "Use 8 media accumulators" }, \
- { "pack", MASK_PACK, "Pack VLIW instructions" }, \
- { "no-pack", -MASK_PACK, "Do not pack VLIW instructions" }, \
- { "no-eflags", 0, "Do not mark ABI switches in e_flags" }, \
- { "debug-arg", MASK_DEBUG_ARG, "Internal debug switch" }, \
- { "debug-addr", MASK_DEBUG_ADDR, "Internal debug switch" }, \
- { "debug-stack", MASK_DEBUG_STACK, "Internal debug switch" }, \
- { "debug", MASK_DEBUG, "Internal debug switch" }, \
- { "debug-cond-exec", MASK_DEBUG_COND_EXEC, "Internal debug switch" }, \
- { "debug-loc", MASK_DEBUG_LOC, "Internal debug switch" }, \
- { "align-labels", MASK_ALIGN_LABELS, "Enable label alignment optimizations" }, \
- { "no-align-labels", -MASK_ALIGN_LABELS, "Disable label alignment optimizations" }, \
- { "cond-move", -MASK_NO_COND_MOVE, "Enable conditional moves" }, \
- { "no-cond-move", MASK_NO_COND_MOVE, "Disable conditional moves" }, \
- { "scc", -MASK_NO_SCC, "Enable setting gprs to the result of comparisons" }, \
- { "no-scc", MASK_NO_SCC, "Disable setting gprs to the result of comparisons" }, \
- { "cond-exec", -MASK_NO_COND_EXEC, "Enable conditional execution other than moves/scc" }, \
- { "no-cond-exec", MASK_NO_COND_EXEC, "Disable conditional execution other than moves/scc" }, \
- { "vliw-branch", -MASK_NO_VLIW_BRANCH, "Run pass to pack branches into VLIW insns" }, \
- { "no-vliw-branch", MASK_NO_VLIW_BRANCH, "Do not run pass to pack branches into VLIW insns" }, \
- { "multi-cond-exec", -MASK_NO_MULTI_CE, "Disable optimizing &&/|| in conditional execution" }, \
- { "no-multi-cond-exec", MASK_NO_MULTI_CE, "Enable optimizing &&/|| in conditional execution" }, \
- { "nested-cond-exec", -MASK_NO_NESTED_CE, "Enable nested conditional execution optimizations" }, \
- { "no-nested-cond-exec" ,MASK_NO_NESTED_CE, "Disable nested conditional execution optimizations" }, \
- { "long-calls", MASK_LONG_CALLS, "Disallow direct calls to global functions" }, \
- { "no-long-calls", -MASK_LONG_CALLS, "Allow direct calls to global functions" }, \
- { "linked-fp", MASK_LINKED_FP, "Follow the EABI linkage requirements" }, \
- { "no-linked-fp", -MASK_LINKED_FP, "Don't follow the EABI linkage requirements" }, \
- { "fdpic", MASK_FDPIC, "Enable file descriptor PIC mode" }, \
- { "no-fdpic", -MASK_FDPIC, "Disable file descriptor PIC mode" }, \
- { "inline-plt", MASK_INLINE_PLT, "Enable inlining of PLT in function calls" }, \
- { "no-inline-plt", -MASK_INLINE_PLT, "Disable inlining of PLT in function calls" }, \
- { "TLS", MASK_BIG_TLS, "Assume a large TLS segment" }, \
- { "tls", -MASK_BIG_TLS, "Do not assume a large TLS segment" }, \
- { "gprel-ro", MASK_GPREL_RO, "Enable use of GPREL for read-only data in FDPIC" }, \
- { "no-gprel-ro", -MASK_GPREL_RO, "Disable use of GPREL for read-only data in FDPIC" }, \
- { "tomcat-stats", 0, "Cause gas to print tomcat statistics" }, \
- { "", MASK_DEFAULT, "" }} \
-
-/* This macro is similar to `TARGET_SWITCHES' but defines names of command
- options that have values. Its definition is an initializer with a
- subgrouping for each command option.
-
- Each subgrouping contains a string constant, that defines the fixed part of
- the option name, the address of a variable, and an optional description string.
- The variable, of type `char *', is set to the text following the fixed part of
- the option as it is specified on the command line. The actual option name is
- made by appending `-m' to the specified name.
-
- Here is an example which defines `-mshort-data-NUMBER'. If the given option
- is `-mshort-data-512', the variable `m88k_short_data' will be set to the
- string `"512"'.
-
- extern char *m88k_short_data;
- #define TARGET_OPTIONS \
- { { "short-data-", & m88k_short_data, \
- "Specify the size of the short data section" } }
-
- This declaration is optional. */
-#define TARGET_OPTIONS \
-{ \
- { "cpu=", &frv_cpu_string, "Set cpu type", 0}, \
- { "branch-cost=", &frv_branch_cost_string, "Internal debug switch", 0}, \
- { "cond-exec-insns=", &frv_condexec_insns_str, "Internal debug switch", 0}, \
- { "cond-exec-temps=", &frv_condexec_temps_str, "Internal debug switch", 0}, \
- { "sched-lookahead=", &frv_sched_lookahead_str,"Internal debug switch", 0}, \
-}
-
/* This macro is a C statement to print on `stderr' a string describing the
particular machine description choice. Every machine description should
define `TARGET_VERSION'. For example:
@@ -819,7 +598,6 @@ extern int target_flags;
#define FPR_FIRST 64 /* First FP reg */
#define FPR_LAST 127 /* Last FP reg */
-#define DEFAULT_CONDEXEC_TEMPS 4 /* reserve 4 regs by default */
#define GPR_TEMP_NUM frv_condexec_temps /* # gprs to reserve for temps */
/* We reserve the last CR and CCR in each category to be used as a reload
@@ -2444,18 +2222,6 @@ do { \
/* A C expression for the cost of a branch instruction. A value of 1 is the
default; other values are interpreted relative to that. */
-
-/* Here are additional macros which do not specify precise relative costs, but
- only that certain actions are more expensive than GCC would ordinarily
- expect. */
-
-/* We used to default the branch cost to 2, but I changed it to 1, to avoid
- generating SCC instructions and or/and-ing them together, and then doing the
- branch on the result, which collectively generate much worse code. */
-#ifndef DEFAULT_BRANCH_COST
-#define DEFAULT_BRANCH_COST 1
-#endif
-
#define BRANCH_COST frv_branch_cost_int
/* Define this macro as a C expression which is nonzero if accessing less than
@@ -3161,9 +2927,6 @@ do { \
cc0, and 1 if it does use cc0. */
#define MAX_CONDITIONAL_EXECUTE frv_condexec_insns
-/* Default value of MAX_CONDITIONAL_EXECUTE if no -mcond-exec-insns= */
-#define DEFAULT_CONDEXEC_INSNS 8
-
/* A C expression to modify the code described by the conditional if
information CE_INFO, possibly updating the tests in TRUE_EXPR, and
FALSE_EXPR for converting if-then and if-then-else code to conditional
diff --git a/gcc/config/i386/darwin.h b/gcc/config/i386/darwin.h
index ec816259bde..7d16c36fa8f 100644
--- a/gcc/config/i386/darwin.h
+++ b/gcc/config/i386/darwin.h
@@ -76,7 +76,7 @@ Boston, MA 02111-1307, USA. */
/* By default, target has a 80387, uses IEEE compatible arithmetic,
and returns float values in the 387. */
-#define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS)
+#define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_128BIT_LONG_DOUBLE | MASK_ALIGN_DOUBLE)
/* TARGET_DEEP_BRANCH_PREDICTION is incompatible with Mach-O PIC. */
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index f76812f335f..1e9165f4412 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -923,7 +923,7 @@ static tree ix86_handle_struct_attribute (tree *, tree, tree, int, bool *);
static int extended_reg_mentioned_1 (rtx *, void *);
static bool ix86_rtx_costs (rtx, int, int, int *);
static int min_insn_size (rtx);
-static tree ix86_md_asm_clobbers (tree clobbers);
+static tree ix86_md_asm_clobbers (tree outputs, tree inputs, tree clobbers);
static bool ix86_must_pass_in_stack (enum machine_mode mode, tree type);
static bool ix86_pass_by_reference (CUMULATIVE_ARGS *, enum machine_mode,
tree, bool);
@@ -7287,6 +7287,7 @@ output_fix_trunc (rtx insn, rtx *operands, int fisttp)
{
int stack_top_dies = find_regno_note (insn, REG_DEAD, FIRST_STACK_REG) != 0;
int dimode_p = GET_MODE (operands[0]) == DImode;
+ int round_mode = get_attr_i387_cw (insn);
/* Jump through a hoop or two for DImode, since the hardware has no
non-popping instruction. We used to do this a different way, but
@@ -7304,12 +7305,14 @@ output_fix_trunc (rtx insn, rtx *operands, int fisttp)
output_asm_insn ("fisttp%z0\t%0", operands);
else
{
- output_asm_insn ("fldcw\t%3", operands);
+ if (round_mode != I387_CW_ANY)
+ output_asm_insn ("fldcw\t%3", operands);
if (stack_top_dies || dimode_p)
output_asm_insn ("fistp%z0\t%0", operands);
else
output_asm_insn ("fist%z0\t%0", operands);
- output_asm_insn ("fldcw\t%2", operands);
+ if (round_mode != I387_CW_ANY)
+ output_asm_insn ("fldcw\t%2", operands);
}
return "";
@@ -16880,7 +16883,9 @@ ix86_vector_mode_supported_p (enum machine_mode mode)
with the old cc0-based compiler. */
static tree
-ix86_md_asm_clobbers (tree clobbers)
+ix86_md_asm_clobbers (tree outputs ATTRIBUTE_UNUSED,
+ tree inputs ATTRIBUTE_UNUSED,
+ tree clobbers)
{
clobbers = tree_cons (NULL_TREE, build_string (5, "flags"),
clobbers);
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index e168d112933..9041cd0b534 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -119,7 +119,8 @@
(UNSPEC_FYL2X 66)
(UNSPEC_FYL2XP1 67)
(UNSPEC_FRNDINT 68)
- (UNSPEC_F2XM1 69)
+ (UNSPEC_FIST 69)
+ (UNSPEC_F2XM1 70)
; x87 Double output FP
(UNSPEC_SINCOS_COS 80)
@@ -16244,6 +16245,112 @@
DONE;
})
+(define_insn "fistdi2"
+ [(set (match_operand:DI 0 "memory_operand" "=m")
+ (unspec:DI [(match_operand:XF 1 "register_operand" "f")]
+ UNSPEC_FIST))
+ (clobber (match_scratch:XF 2 "=&1f"))]
+ "TARGET_USE_FANCY_MATH_387
+ && flag_unsafe_math_optimizations"
+ "* return output_fix_trunc (insn, operands, 0);"
+ [(set_attr "type" "fpspc")
+ (set_attr "mode" "DI")])
+
+(define_insn "fistdi2_with_temp"
+ [(set (match_operand:DI 0 "nonimmediate_operand" "=m,?r")
+ (unspec:DI [(match_operand:XF 1 "register_operand" "f,f")]
+ UNSPEC_FIST))
+ (clobber (match_operand:DI 2 "memory_operand" "=m,m"))
+ (clobber (match_scratch:XF 3 "=&1f,&1f"))]
+ "TARGET_USE_FANCY_MATH_387
+ && flag_unsafe_math_optimizations"
+ "#"
+ [(set_attr "type" "fpspc")
+ (set_attr "mode" "DI")])
+
+(define_split
+ [(set (match_operand:DI 0 "register_operand" "")
+ (unspec:DI [(match_operand:XF 1 "register_operand" "")]
+ UNSPEC_FIST))
+ (clobber (match_operand:DI 2 "memory_operand" ""))
+ (clobber (match_scratch 3 ""))]
+ "reload_completed"
+ [(parallel [(set (match_dup 2) (unspec:DI [(match_dup 1)] UNSPEC_FIST))
+ (clobber (match_dup 3))])
+ (set (match_dup 0) (match_dup 2))]
+ "")
+
+(define_split
+ [(set (match_operand:DI 0 "memory_operand" "")
+ (unspec:DI [(match_operand:XF 1 "register_operand" "")]
+ UNSPEC_FIST))
+ (clobber (match_operand:DI 2 "memory_operand" ""))
+ (clobber (match_scratch 3 ""))]
+ "reload_completed"
+ [(parallel [(set (match_dup 0) (unspec:DI [(match_dup 1)] UNSPEC_FIST))
+ (clobber (match_dup 3))])]
+ "")
+
+(define_insn "fist<mode>2"
+ [(set (match_operand:X87MODEI12 0 "memory_operand" "=m")
+ (unspec:X87MODEI12 [(match_operand:XF 1 "register_operand" "f")]
+ UNSPEC_FIST))]
+ "TARGET_USE_FANCY_MATH_387
+ && flag_unsafe_math_optimizations"
+ "* return output_fix_trunc (insn, operands, 0);"
+ [(set_attr "type" "fpspc")
+ (set_attr "mode" "<MODE>")])
+
+(define_insn "fist<mode>2_with_temp"
+ [(set (match_operand:X87MODEI12 0 "nonimmediate_operand" "=m,?r")
+ (unspec:X87MODEI12 [(match_operand:XF 1 "register_operand" "f,f")]
+ UNSPEC_FIST))
+ (clobber (match_operand:X87MODEI12 2 "memory_operand" "=m,m"))]
+ "TARGET_USE_FANCY_MATH_387
+ && flag_unsafe_math_optimizations"
+ "#"
+ [(set_attr "type" "fpspc")
+ (set_attr "mode" "<MODE>")])
+
+(define_split
+ [(set (match_operand:X87MODEI12 0 "register_operand" "")
+ (unspec:X87MODEI12 [(match_operand:XF 1 "register_operand" "")]
+ UNSPEC_FIST))
+ (clobber (match_operand:X87MODEI12 2 "memory_operand" ""))]
+ "reload_completed"
+ [(set (match_dup 2) (unspec:X87MODEI12 [(match_dup 1)]
+ UNSPEC_FIST))
+ (set (match_dup 0) (match_dup 2))]
+ "")
+
+(define_split
+ [(set (match_operand:X87MODEI12 0 "memory_operand" "")
+ (unspec:X87MODEI12 [(match_operand:XF 1 "register_operand" "")]
+ UNSPEC_FIST))
+ (clobber (match_scratch 2 ""))]
+ "reload_completed"
+ [(set (match_dup 0) (unspec:X87MODEI12 [(match_dup 1)]
+ UNSPEC_FIST))]
+ "")
+
+(define_expand "lrint<mode>2"
+ [(use (match_operand:X87MODEI 0 "nonimmediate_operand" ""))
+ (use (match_operand:XF 1 "register_operand" ""))]
+ "TARGET_USE_FANCY_MATH_387
+ && (!TARGET_SSE_MATH || TARGET_MIX_SSE_I387)
+ && flag_unsafe_math_optimizations"
+{
+ if (memory_operand (operands[0], VOIDmode))
+ emit_insn (gen_fist<mode>2 (operands[0], operands[1]));
+ else
+ {
+ operands[2] = assign_386_stack_local (<MODE>mode, 0);
+ emit_insn (gen_fist<mode>2_with_temp (operands[0], operands[1],
+ operands[2]));
+ }
+ DONE;
+})
+
(define_insn "frndintxf2_floor"
[(set (match_operand:XF 0 "register_operand" "=f")
(unspec:XF [(match_operand:XF 1 "register_operand" "0")]
diff --git a/gcc/config/i860/i860.h b/gcc/config/i860/i860.h
index bc61dfe568c..cf7f18738dd 100644
--- a/gcc/config/i860/i860.h
+++ b/gcc/config/i860/i860.h
@@ -36,33 +36,6 @@ do { \
/* Print subsidiary information on the compiler version in use. */
#define TARGET_VERSION fprintf (stderr, " (i860)");
-
-/* Run-time compilation parameters selecting different hardware subsets
- or supersets.
-
- On the i860, we have one: TARGET_XP. This option allows gcc to generate
- additional instructions available only on the newer i860 XP (but not on
- the older i860 XR).
-*/
-
-extern int target_flags;
-
-/* Nonzero if we should generate code to use the fpu. */
-#define TARGET_XP (target_flags & 1)
-
-/* Macro to define tables used to set the flags.
- This is a list in braces of pairs in braces,
- each pair being { "NAME", VALUE }
- where VALUE is the bits to set or minus the bits to clear.
- An empty string NAME is used to identify the default VALUE. */
-
-#define TARGET_SWITCHES \
- { {"xp", 1, N_("Generate code which uses the FPU")}, \
- {"noxp", -1, N_("Do not generate code which uses the FPU")}, \
- {"xr", -1, N_("Do not generate code which uses the FPU")}, \
- { "", TARGET_DEFAULT, NULL}}
-
-#define TARGET_DEFAULT 0
/* target machine storage layout */
diff --git a/gcc/config/m32r/little.h b/gcc/config/m32r/little.h
index 9c1b0b5a72c..f4dfbcd2bd3 100644
--- a/gcc/config/m32r/little.h
+++ b/gcc/config/m32r/little.h
@@ -19,7 +19,7 @@
Free Software Foundation, 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA. */
-#define TARGET_ENDIAN_DEFAULT LITTLE_ENDIAN_BIT
+#define TARGET_LITTLE_ENDIAN 1
#define CPP_ENDIAN_SPEC \
" %{mbe:-D__BIG_ENDIAN__} %{mbig-endian:-D__BIG_ENDIAN__}" \
diff --git a/gcc/config/m32r/m32r.c b/gcc/config/m32r/m32r.c
index dd86186d56d..ee3f0039cf4 100644
--- a/gcc/config/m32r/m32r.c
+++ b/gcc/config/m32r/m32r.c
@@ -51,12 +51,10 @@ rtx m32r_compare_op0, m32r_compare_op1;
char m32r_punct_chars[256];
/* Selected code model. */
-const char * m32r_model_string = M32R_MODEL_DEFAULT;
-enum m32r_model m32r_model;
+enum m32r_model m32r_model = M32R_MODEL_DEFAULT;
/* Selected SDA support. */
-const char * m32r_sdata_string = M32R_SDATA_DEFAULT;
-enum m32r_sdata m32r_sdata;
+enum m32r_sdata m32r_sdata = M32R_SDATA_DEFAULT;
/* Machine-specific symbol_ref flags. */
#define SYMBOL_FLAG_MODEL_SHIFT SYMBOL_FLAG_MACH_DEP_SHIFT
@@ -69,17 +67,17 @@ enum m32r_sdata m32r_sdata;
/* Cache-flush support. Cache-flush is used at trampoline.
Default cache-flush is "trap 12".
default cache-flush function is "_flush_cache" (CACHE_FLUSH_FUNC)
- default cache-flush trap-interrupt number is "12". (CACHE_FLUSH_TRAP)
+ default cache-flush trap-interrupt number is 12 (CACHE_FLUSH_TRAP)
You can change how to generate code of cache-flush with following options.
- -flush-func=FLUSH-FUNC-NAME
- -no-flush-func
- -fluch-trap=TRAP-NUMBER
- -no-flush-trap. */
+ -mflush-func=FLUSH-FUNC-NAME
+ -mno-flush-func (sets m32r_cache_flush_func to NULL)
+ -mfluch-trap=TRAP-NUMBER
+ -mno-flush-trap. (sets m32r_cache_flush_trap to -1). */
const char *m32r_cache_flush_func = CACHE_FLUSH_FUNC;
-const char *m32r_cache_flush_trap_string = CACHE_FLUSH_TRAP;
-int m32r_cache_flush_trap = 12;
+int m32r_cache_flush_trap = CACHE_FLUSH_TRAP;
/* Forward declaration. */
+static bool m32r_handle_option (size_t, const char *, int);
static void init_reg_tables (void);
static void block_move_call (rtx, rtx, rtx);
static int m32r_is_insn (rtx);
@@ -127,6 +125,11 @@ static int m32r_arg_partial_bytes (CUMULATIVE_ARGS *, enum machine_mode,
#undef TARGET_SCHED_ISSUE_RATE
#define TARGET_SCHED_ISSUE_RATE m32r_issue_rate
+#undef TARGET_DEFAULT_TARGET_FLAGS
+#define TARGET_DEFAULT_TARGET_FLAGS TARGET_CPU_DEFAULT
+#undef TARGET_HANDLE_OPTION
+#define TARGET_HANDLE_OPTION m32r_handle_option
+
#undef TARGET_ENCODE_SECTION_INFO
#define TARGET_ENCODE_SECTION_INFO m32r_encode_section_info
#undef TARGET_IN_SMALL_DATA_P
@@ -152,6 +155,60 @@ static int m32r_arg_partial_bytes (CUMULATIVE_ARGS *, enum machine_mode,
struct gcc_target targetm = TARGET_INITIALIZER;
+/* Implement TARGET_HANDLE_OPTION. */
+
+static bool
+m32r_handle_option (size_t code, const char *arg, int value)
+{
+ switch (code)
+ {
+ case OPT_m32r:
+ target_flags &= ~(MASK_M32R2 | MASK_M32RX);
+ return true;
+
+ case OPT_mmodel_:
+ if (strcmp (arg, "small") == 0)
+ m32r_model = M32R_MODEL_SMALL;
+ else if (strcmp (arg, "medium") == 0)
+ m32r_model = M32R_MODEL_MEDIUM;
+ else if (strcmp (arg, "large") == 0)
+ m32r_model = M32R_MODEL_LARGE;
+ else
+ return false;
+ return true;
+
+ case OPT_msdata_:
+ if (strcmp (arg, "none") == 0)
+ m32r_sdata = M32R_SDATA_NONE;
+ else if (strcmp (arg, "sdata") == 0)
+ m32r_sdata = M32R_SDATA_SDATA;
+ else if (strcmp (arg, "use") == 0)
+ m32r_sdata = M32R_SDATA_USE;
+ else
+ return false;
+ return true;
+
+ case OPT_mflush_func_:
+ m32r_cache_flush_func = arg;
+ return true;
+
+ case OPT_mno_flush_func:
+ m32r_cache_flush_func = NULL;
+ return true;
+
+ case OPT_mflush_trap_:
+ m32r_cache_flush_trap = value;
+ return m32r_cache_flush_trap <= 15;
+
+ case OPT_mno_flush_trap:
+ m32r_cache_flush_trap = -1;
+ return true;
+
+ default:
+ return true;
+ }
+}
+
/* Called by OVERRIDE_OPTIONS to initialize various things. */
void
@@ -167,33 +224,6 @@ m32r_init (void)
/* Provide default value if not specified. */
if (!g_switch_set)
g_switch_value = SDATA_DEFAULT_SIZE;
-
- if (strcmp (m32r_model_string, "small") == 0)
- m32r_model = M32R_MODEL_SMALL;
- else if (strcmp (m32r_model_string, "medium") == 0)
- m32r_model = M32R_MODEL_MEDIUM;
- else if (strcmp (m32r_model_string, "large") == 0)
- m32r_model = M32R_MODEL_LARGE;
- else
- error ("bad value (%s) for -mmodel switch", m32r_model_string);
-
- if (strcmp (m32r_sdata_string, "none") == 0)
- m32r_sdata = M32R_SDATA_NONE;
- else if (strcmp (m32r_sdata_string, "sdata") == 0)
- m32r_sdata = M32R_SDATA_SDATA;
- else if (strcmp (m32r_sdata_string, "use") == 0)
- m32r_sdata = M32R_SDATA_USE;
- else
- error ("bad value (%s) for -msdata switch", m32r_sdata_string);
-
- if (m32r_cache_flush_trap_string)
- {
- /* Change trap-number (12) for cache-flush to the others (0 - 15). */
- m32r_cache_flush_trap = atoi (m32r_cache_flush_trap_string);
- if (m32r_cache_flush_trap < 0 || m32r_cache_flush_trap > 15)
- error ("bad value (%s) for -flush-trap=n (0=<n<=15)",
- m32r_cache_flush_trap_string);
- }
}
/* Vectors to keep interesting information about registers where it can easily
diff --git a/gcc/config/m32r/m32r.h b/gcc/config/m32r/m32r.h
index 82c15644669..85ee3755153 100644
--- a/gcc/config/m32r/m32r.h
+++ b/gcc/config/m32r/m32r.h
@@ -36,7 +36,6 @@
#undef LINK_SPEC
#undef STARTFILE_SPEC
#undef ENDFILE_SPEC
-#undef SUBTARGET_SWITCHES
#undef ASM_APP_ON
#undef ASM_APP_OFF
@@ -60,12 +59,6 @@
#define STARTFILE_CPU_SPEC "%{!shared:crt0.o%s} %{m32rx:m32rx/crtinit.o%s} %{!m32rx:crtinit.o%s}"
#define ENDFILE_CPU_SPEC "-lgloss %{m32rx:m32rx/crtfini.o%s} %{!m32rx:crtfini.o%s}"
-/* Extra machine dependent switches. */
-#define SUBTARGET_SWITCHES \
- { "32rx", TARGET_M32RX_MASK, "Compile for the m32rx" }, \
- { "32r2", TARGET_M32R2_MASK, "Compile for the m32r2" }, \
- { "32r", -(TARGET_M32RX_MASK+TARGET_M32R2_MASK), "" },
-
/* Define this macro as a C expression for the initializer of an array of
strings to tell the driver program which options are defaults for this
target and thus do not need to be handled specially when using
@@ -204,125 +197,22 @@
/* Run-time compilation parameters selecting different hardware subsets. */
-extern int target_flags;
-
-/* If nonzero, tell the linker to do relaxing.
- We don't do anything with the option, other than recognize it.
- LINK_SPEC handles passing -relax to the linker.
- This can cause incorrect debugging information as line numbers may
- turn out wrong. This shouldn't be specified unless accompanied with -O2
- [where the user expects debugging information to be less accurate]. */
-#define TARGET_RELAX_MASK (1 << 0)
-
-/* For miscellaneous debugging purposes. */
-#define TARGET_DEBUG_MASK (1 << 1)
-#define TARGET_DEBUG (target_flags & TARGET_DEBUG_MASK)
-
-/* Align loops to 32 byte boundaries (cache line size). */
-/* ??? This option is experimental and is not documented. */
-#define TARGET_ALIGN_LOOPS_MASK (1 << 2)
-#define TARGET_ALIGN_LOOPS (target_flags & TARGET_ALIGN_LOOPS_MASK)
-
-/* Change issue rate. */
-#define TARGET_LOW_ISSUE_RATE_MASK (1 << 3)
-#define TARGET_LOW_ISSUE_RATE (target_flags & TARGET_LOW_ISSUE_RATE_MASK)
-
-/* Change branch cost */
-#define TARGET_BRANCH_COST_MASK (1 << 4)
-#define TARGET_BRANCH_COST (target_flags & TARGET_BRANCH_COST_MASK)
-
-/* Target machine to compile for. */
-#define TARGET_M32R 1
-
-/* Support extended instruction set. */
-#define TARGET_M32RX_MASK (1 << 5)
-#define TARGET_M32RX (target_flags & TARGET_M32RX_MASK)
-#undef TARGET_M32R
-#define TARGET_M32R (! TARGET_M32RX)
-
-/* Support extended instruction set of m32r2. */
-#define TARGET_M32R2_MASK (1 << 6)
-#define TARGET_M32R2 (target_flags & TARGET_M32R2_MASK)
-#undef TARGET_M32R
#define TARGET_M32R (! TARGET_M32RX && ! TARGET_M32R2)
-/* Little Endian Flag. */
-#define LITTLE_ENDIAN_BIT (1 << 7)
-#define TARGET_LITTLE_ENDIAN (target_flags & LITTLE_ENDIAN_BIT)
-#define TARGET_BIG_ENDIAN (! TARGET_LITTLE_ENDIAN)
-
-/* This defaults us to big-endian. */
-#ifndef TARGET_ENDIAN_DEFAULT
-#define TARGET_ENDIAN_DEFAULT 0
+#ifndef TARGET_LITTLE_ENDIAN
+#define TARGET_LITTLE_ENDIAN 0
#endif
+#define TARGET_BIG_ENDIAN (! TARGET_LITTLE_ENDIAN)
/* This defaults us to m32r. */
#ifndef TARGET_CPU_DEFAULT
#define TARGET_CPU_DEFAULT 0
#endif
-/* Macro to define tables used to set the flags.
- This is a list in braces of pairs in braces,
- each pair being { "NAME", VALUE }
- where VALUE is the bits to set or minus the bits to clear.
- An empty string NAME is used to identify the default VALUE. */
-
-#ifndef SUBTARGET_SWITCHES
-#define SUBTARGET_SWITCHES
-#endif
-
-#ifndef TARGET_DEFAULT
-#define TARGET_DEFAULT (TARGET_CPU_DEFAULT | TARGET_ENDIAN_DEFAULT)
-#endif
-
-#define TARGET_SWITCHES \
-{ \
-/* { "relax", TARGET_RELAX_MASK, "" }, \
- { "no-relax", -TARGET_RELAX_MASK, "" },*/ \
- { "debug", TARGET_DEBUG_MASK, \
- N_("Display compile time statistics") }, \
- { "align-loops", TARGET_ALIGN_LOOPS_MASK, \
- N_("Align all loops to 32 byte boundary") }, \
- { "no-align-loops", -TARGET_ALIGN_LOOPS_MASK, "" }, \
- { "issue-rate=1", TARGET_LOW_ISSUE_RATE_MASK, \
- N_("Only issue one instruction per cycle") }, \
- { "issue-rate=2", -TARGET_LOW_ISSUE_RATE_MASK, "" }, \
- { "branch-cost=1", TARGET_BRANCH_COST_MASK, \
- N_("Prefer branches over conditional execution") }, \
- { "branch-cost=2", -TARGET_BRANCH_COST_MASK, "" }, \
- SUBTARGET_SWITCHES \
- { "", TARGET_DEFAULT, "" } \
-}
-
-extern const char * m32r_model_string;
-extern const char * m32r_sdata_string;
-
/* Cache-flush support. */
extern const char * m32r_cache_flush_func;
-extern const char * m32r_cache_flush_trap_string;
extern int m32r_cache_flush_trap;
-#ifndef SUBTARGET_OPTIONS
-#define SUBTARGET_OPTIONS
-#endif
-
-#define TARGET_OPTIONS \
-{ \
- { "model=", & m32r_model_string, \
- N_("Code size: small, medium or large"), 0}, \
- { "sdata=", & m32r_sdata_string, \
- N_("Small data area: none, sdata, use"), 0}, \
- { "no-flush-func", & m32r_cache_flush_func, \
- N_("Don't call any cache flush functions") }, \
- { "flush-func=", & m32r_cache_flush_func, \
- N_("Specify cache flush function") }, \
- { "no-flush-trap", & m32r_cache_flush_trap_string, \
- N_("Don't call any cache flush trap") }, \
- { "flush-trap=", & m32r_cache_flush_trap_string, \
- N_("Specify cache flush trap number") } \
- SUBTARGET_OPTIONS \
-}
-
/* Code Models
Code models are used to select between two choices of two separate
@@ -357,7 +247,7 @@ extern enum m32r_model m32r_model;
/* The default is the small model. */
#ifndef M32R_MODEL_DEFAULT
-#define M32R_MODEL_DEFAULT "small"
+#define M32R_MODEL_DEFAULT M32R_MODEL_SMALL
#endif
/* Small Data Area
@@ -407,7 +297,7 @@ extern enum m32r_sdata m32r_sdata;
/* Default is to disable the SDA
[for upward compatibility with previous toolchains]. */
#ifndef M32R_SDATA_DEFAULT
-#define M32R_SDATA_DEFAULT "none"
+#define M32R_SDATA_DEFAULT M32R_SDATA_NONE
#endif
/* Define this macro as a C expression for the initializer of an array of
@@ -1191,7 +1081,7 @@ L2: .word STATIC
#define CACHE_FLUSH_FUNC "_flush_cache"
#endif
#ifndef CACHE_FLUSH_TRAP
-#define CACHE_FLUSH_TRAP "12"
+#define CACHE_FLUSH_TRAP 12
#endif
/* Length in bytes of the trampoline for entering a nested function. */
@@ -1219,7 +1109,7 @@ L2: .word STATIC
(CXT)); \
emit_move_insn (gen_rtx_MEM (SImode, plus_constant (TRAMP, 20)), \
(FNADDR)); \
- if (m32r_cache_flush_trap_string && m32r_cache_flush_trap_string[0]) \
+ if (m32r_cache_flush_trap >= 0) \
emit_insn (gen_flush_icache (validize_mem (gen_rtx_MEM (SImode, TRAMP)),\
GEN_INT (m32r_cache_flush_trap) )); \
else if (m32r_cache_flush_func && m32r_cache_flush_func[0]) \
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 2817e6733de..594d5c1a5b8 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -3973,7 +3973,8 @@ mips_gimplify_va_arg_expr (tree valist, tree type, tree *pre_p, tree *post_p)
}
/* [2] Emit code to branch if off == 0. */
- t = lang_hooks.truthvalue_conversion (off);
+ t = build (NE_EXPR, boolean_type_node, off,
+ build_int_cst (TREE_TYPE (off), 0));
addr = build (COND_EXPR, ptr_type_node, t, NULL, NULL);
/* [5] Emit code for: off -= rsize. We do this as a form of
@@ -9193,7 +9194,7 @@ mips_matching_cpu_name_p (const char *canonical, const char *given)
/* Return the mips_cpu_info entry for the processor or ISA given
- by CPU_STRING. Return null if the string isn't recognised.
+ by CPU_STRING. Return null if the string isn't recognized.
A similar function exists in GAS. */
diff --git a/gcc/config/rs6000/darwin-fallback.c b/gcc/config/rs6000/darwin-fallback.c
index a9ef4a7985e..3083b1fc50a 100644
--- a/gcc/config/rs6000/darwin-fallback.c
+++ b/gcc/config/rs6000/darwin-fallback.c
@@ -36,9 +36,8 @@
#include "unwind-dw2.h"
#include <stdint.h>
#include <stdbool.h>
+#include <sys/types.h>
#include <signal.h>
-#include <ucontext.h>
-#include <mach/thread_status.h>
typedef unsigned long reg_unit;
@@ -225,6 +224,11 @@ interpret_libc (reg_unit gprs[32], struct _Unwind_Context *context)
}
}
+/* We used to include <ucontext.h> and <mach/thread_status.h>,
+ but they change so much between different Darwin system versions
+ that it's much easier to just write the structures involved here
+ directly. */
+
/* These defines are from the kernel's bsd/dev/ppc/unix_signal.c. */
#define UC_TRAD 1
#define UC_TRAD_VEC 6
@@ -237,6 +241,44 @@ interpret_libc (reg_unit gprs[32], struct _Unwind_Context *context)
#define UC_DUAL 50
#define UC_DUAL_VEC 55
+struct gcc_ucontext
+{
+ int onstack;
+ sigset_t sigmask;
+ void * stack_sp;
+ size_t stack_sz;
+ int stack_flags;
+ struct gcc_ucontext *link;
+ size_t mcsize;
+ struct gcc_mcontext32 *mcontext;
+};
+
+struct gcc_float_vector_state
+{
+ double fpregs[32];
+ uint32_t fpscr_pad;
+ uint32_t fpscr;
+ uint32_t save_vr[32][4];
+ uint32_t save_vscr[4];
+};
+
+struct gcc_mcontext32 {
+ uint32_t dar;
+ uint32_t dsisr;
+ uint32_t exception;
+ uint32_t padding1[5];
+ uint32_t srr0;
+ uint32_t srr1;
+ uint32_t gpr[32];
+ uint32_t cr;
+ uint32_t xer;
+ uint32_t lr;
+ uint32_t ctr;
+ uint32_t mq;
+ uint32_t vrsave;
+ struct gcc_float_vector_state fvs;
+};
+
/* These are based on /usr/include/ppc/ucontext.h and
/usr/include/mach/ppc/thread_status.h, but rewritten to be more
convenient, to compile on Jaguar, and to work around Radar 3712064
@@ -256,17 +298,16 @@ struct gcc_mcontext64 {
uint32_t lr[2];
uint32_t ctr[2];
uint32_t vrsave;
- ppc_float_state_t fs;
- ppc_vector_state_t vs;
+ struct gcc_float_vector_state fvs;
};
#define UC_FLAVOR_SIZE \
- (sizeof (struct mcontext) - sizeof (ppc_vector_state_t))
+ (sizeof (struct gcc_mcontext32) - 33*16)
-#define UC_FLAVOR_VEC_SIZE (sizeof (struct mcontext))
+#define UC_FLAVOR_VEC_SIZE (sizeof (struct gcc_mcontext32))
#define UC_FLAVOR64_SIZE \
- (sizeof (struct gcc_mcontext64) - sizeof (ppc_vector_state_t))
+ (sizeof (struct gcc_mcontext64) - 33*16)
#define UC_FLAVOR64_VEC_SIZE (sizeof (struct gcc_mcontext64))
@@ -278,10 +319,9 @@ static bool
handle_syscall (_Unwind_FrameState *fs, const reg_unit gprs[32],
_Unwind_Ptr old_cfa)
{
- ucontext_t *uctx;
+ struct gcc_ucontext *uctx;
bool is_64, is_vector;
- ppc_float_state_t *float_state;
- ppc_vector_state_t *vector_state;
+ struct gcc_float_vector_state * float_vector_state;
_Unwind_Ptr new_cfa;
int i;
static _Unwind_Ptr return_addr;
@@ -293,16 +333,16 @@ handle_syscall (_Unwind_FrameState *fs, const reg_unit gprs[32],
if (gprs[0] == 0x67 /* SYS_SIGRETURN */)
{
- uctx = (ucontext_t *) gprs[3];
- is_vector = (uctx->uc_mcsize == UC_FLAVOR64_VEC_SIZE
- || uctx->uc_mcsize == UC_FLAVOR_VEC_SIZE);
- is_64 = (uctx->uc_mcsize == UC_FLAVOR64_VEC_SIZE
- || uctx->uc_mcsize == UC_FLAVOR64_SIZE);
+ uctx = (struct gcc_ucontext *) gprs[3];
+ is_vector = (uctx->mcsize == UC_FLAVOR64_VEC_SIZE
+ || uctx->mcsize == UC_FLAVOR_VEC_SIZE);
+ is_64 = (uctx->mcsize == UC_FLAVOR64_VEC_SIZE
+ || uctx->mcsize == UC_FLAVOR64_SIZE);
}
else if (gprs[0] == 0 && gprs[3] == 184)
{
int ctxstyle = gprs[5];
- uctx = (ucontext_t *) gprs[4];
+ uctx = (struct gcc_ucontext *) gprs[4];
is_vector = (ctxstyle == UC_FLAVOR_VEC || ctxstyle == UC_FLAVOR64_VEC
|| ctxstyle == UC_TRAD_VEC || ctxstyle == UC_TRAD64_VEC);
is_64 = (ctxstyle == UC_FLAVOR64_VEC || ctxstyle == UC_TRAD64_VEC
@@ -325,11 +365,10 @@ handle_syscall (_Unwind_FrameState *fs, const reg_unit gprs[32],
/* The context is 64-bit, but it doesn't carry any extra information
for us because only the low 32 bits of the registers are
call-saved. */
- struct gcc_mcontext64 *m64 = (struct gcc_mcontext64 *)uctx->uc_mcontext;
+ struct gcc_mcontext64 *m64 = (struct gcc_mcontext64 *)uctx->mcontext;
int i;
- float_state = &m64->fs;
- vector_state = &m64->vs;
+ float_vector_state = &m64->fvs;
new_cfa = m64->gpr[1][1];
@@ -354,33 +393,32 @@ handle_syscall (_Unwind_FrameState *fs, const reg_unit gprs[32],
}
else
{
- struct mcontext *m = uctx->uc_mcontext;
+ struct gcc_mcontext32 *m = uctx->mcontext;
int i;
- float_state = &m->fs;
- vector_state = &m->vs;
+ float_vector_state = &m->fvs;
- new_cfa = m->ss.r1;
+ new_cfa = m->gpr[1];
- set_offset (CR2_REGNO, &m->ss.cr);
+ set_offset (CR2_REGNO, &m->cr);
for (i = 0; i < 32; i++)
- set_offset (i, &m->ss.r0 + i);
- set_offset (XER_REGNO, &m->ss.xer);
- set_offset (LINK_REGISTER_REGNUM, &m->ss.lr);
- set_offset (COUNT_REGISTER_REGNUM, &m->ss.ctr);
+ set_offset (i, m->gpr + i);
+ set_offset (XER_REGNO, &m->xer);
+ set_offset (LINK_REGISTER_REGNUM, &m->lr);
+ set_offset (COUNT_REGISTER_REGNUM, &m->ctr);
if (is_vector)
- set_offset (VRSAVE_REGNO, &m->ss.vrsave);
+ set_offset (VRSAVE_REGNO, &m->vrsave);
/* Sometimes, srr0 points to the instruction that caused the exception,
and sometimes to the next instruction to be executed; we want
the latter. */
- if (m->es.exception == 3 || m->es.exception == 4
- || m->es.exception == 6
- || (m->es.exception == 7 && !(m->ss.srr1 & 0x10000)))
- return_addr = m->ss.srr0 + 4;
+ if (m->exception == 3 || m->exception == 4
+ || m->exception == 6
+ || (m->exception == 7 && !(m->srr1 & 0x10000)))
+ return_addr = m->srr0 + 4;
else
- return_addr = m->ss.srr0;
+ return_addr = m->srr0;
}
fs->cfa_how = CFA_REG_OFFSET;
@@ -399,14 +437,14 @@ handle_syscall (_Unwind_FrameState *fs, const reg_unit gprs[32],
set_offset (ARG_POINTER_REGNUM, &return_addr);
for (i = 0; i < 32; i++)
- set_offset (32 + i, float_state->fpregs + i);
- set_offset (SPEFSCR_REGNO, &float_state->fpscr);
+ set_offset (32 + i, float_vector_state->fpregs + i);
+ set_offset (SPEFSCR_REGNO, &float_vector_state->fpscr);
if (is_vector)
{
for (i = 0; i < 32; i++)
- set_offset (FIRST_ALTIVEC_REGNO + i, vector_state->save_vr + i);
- set_offset (VSCR_REGNO, vector_state->save_vscr);
+ set_offset (FIRST_ALTIVEC_REGNO + i, float_vector_state->save_vr + i);
+ set_offset (VSCR_REGNO, float_vector_state->save_vscr);
}
return true;
diff --git a/gcc/config/rs6000/predicates.md b/gcc/config/rs6000/predicates.md
index 110898fcec6..ab0cd8b1568 100644
--- a/gcc/config/rs6000/predicates.md
+++ b/gcc/config/rs6000/predicates.md
@@ -219,8 +219,15 @@
long k[2];
REAL_VALUE_TYPE rv;
- if (TARGET_E500_DOUBLE)
- return 0;
+ /* Force constants to memory before reload to utilize
+ compress_float_constant.
+ Avoid this when flag_unsafe_math_optimizations is enabled
+ because RDIV division to reciprocal optimization is not able
+ to regenerate the division. */
+ if (TARGET_E500_DOUBLE
+ || (!reload_in_progress && !reload_completed
+ && !flag_unsafe_math_optimizations))
+ return 0;
REAL_VALUE_FROM_CONST_DOUBLE (rv, op);
REAL_VALUE_TO_TARGET_DOUBLE (rv, k);
@@ -234,6 +241,15 @@
long l;
REAL_VALUE_TYPE rv;
+ /* Force constants to memory before reload to utilize
+ compress_float_constant.
+ Avoid this when flag_unsafe_math_optimizations is enabled
+ because RDIV division to reciprocal optimization is not able
+ to regenerate the division. */
+ if (!reload_in_progress && !reload_completed
+ && !flag_unsafe_math_optimizations)
+ return 0;
+
REAL_VALUE_FROM_CONST_DOUBLE (rv, op);
REAL_VALUE_TO_TARGET_SINGLE (rv, l);
diff --git a/gcc/config/rs6000/rs6000-protos.h b/gcc/config/rs6000/rs6000-protos.h
index 018de14ec2d..dd8590cf9e1 100644
--- a/gcc/config/rs6000/rs6000-protos.h
+++ b/gcc/config/rs6000/rs6000-protos.h
@@ -49,6 +49,7 @@ extern bool rs6000_legitimate_offset_address_p (enum machine_mode, rtx, int);
extern rtx rs6000_got_register (rtx);
extern rtx find_addr_reg (rtx);
extern int word_offset_memref_operand (rtx, enum machine_mode);
+extern int indexed_or_indirect_operand (rtx, enum machine_mode);
extern rtx gen_easy_vector_constant_add_self (rtx);
extern const char *output_vec_const_move (rtx *);
extern void build_mask64_2_operands (rtx, rtx *);
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 0cf135f01af..3ac7c833c78 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -2297,6 +2297,25 @@ word_offset_memref_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
return (off % 4) == 0;
}
+/* Return true if the operand is an indirect or indexed memory operand. */
+
+int
+indexed_or_indirect_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
+{
+ rtx addr;
+ if (!memory_operand (op, mode))
+ return 0;
+
+ addr = XEXP (op, 0);
+ if (GET_CODE (addr) == REG)
+ return 1;
+ if (GET_CODE (addr) == PLUS
+ && GET_CODE (XEXP (addr, 0)) == REG
+ && GET_CODE (XEXP (addr, 1)) == REG)
+ return 1;
+ return 0;
+}
+
/* Return true if either operand is a general purpose register. */
bool
@@ -7646,9 +7665,11 @@ altivec_init_builtins (void)
targetm.vectorize.builtin_mask_for_load. */
decl = lang_hooks.builtin_function ("__builtin_altivec_mask_for_load",
- v16qi_ftype_long_pcvoid,
- ALTIVEC_BUILTIN_MASK_FOR_LOAD,
- BUILT_IN_MD, NULL, NULL_TREE);
+ v16qi_ftype_long_pcvoid,
+ ALTIVEC_BUILTIN_MASK_FOR_LOAD,
+ BUILT_IN_MD, NULL,
+ tree_cons (get_identifier ("const"),
+ NULL_TREE, NULL_TREE));
/* Record the decl. Will be used by rs6000_builtin_mask_for_load. */
altivec_builtin_mask_for_load = decl;
}
diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h
index 8e7a2543dc1..adef69579d7 100644
--- a/gcc/config/rs6000/rs6000.h
+++ b/gcc/config/rs6000/rs6000.h
@@ -1357,6 +1357,7 @@ enum reg_class
'U' is for V.4 small data references.
'W' is a vector constant that can be easily generated (no mem refs).
'Y' is a indexed or word-aligned displacement memory operand.
+ 'Z' is an indexed or indirect memory operand.
't' is for AND masks that can be performed by two rldic{l,r} insns. */
#define EXTRA_CONSTRAINT(OP, C) \
@@ -1372,6 +1373,7 @@ enum reg_class
&& !mask64_operand (OP, DImode)) \
: (C) == 'W' ? (easy_vector_constant (OP, GET_MODE (OP))) \
: (C) == 'Y' ? (word_offset_memref_operand (OP, GET_MODE (OP))) \
+ : (C) == 'Z' ? (indexed_or_indirect_operand (OP, GET_MODE (OP))) \
: 0)
/* Define which constraints are memory constraints. Tell reload
@@ -1379,7 +1381,7 @@ enum reg_class
memory address into a base register if required. */
#define EXTRA_MEMORY_CONSTRAINT(C, STR) \
- ((C) == 'Q' || (C) == 'Y')
+ ((C) == 'Q' || (C) == 'Y' || (C) == 'Z')
/* Given an rtx X being reloaded into a reg required to be
in class CLASS, return the class of reg to actually use.
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index fc4b6f1cfb2..265c84f3bc3 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -51,6 +51,7 @@
(UNSPEC_TLSTLS 29)
(UNSPEC_FIX_TRUNC_TF 30) ; fadd, rounding towards zero
(UNSPEC_MV_CR_GT 31) ; move_from_CR_eq_bit
+ (UNSPEC_STFIWX 32)
])
;;
@@ -4422,7 +4423,7 @@
#
fmr %0,%1
lfs%U1%X1 %0,%1"
- "&& reload_completed && REGNO (operands[0]) == REGNO (operands[1])"
+ "&& reload_completed && REG_P (operands[1]) && REGNO (operands[0]) == REGNO (operands[1])"
[(const_int 0)]
{
emit_note (NOTE_INSN_DELETED);
@@ -5272,7 +5273,7 @@
}")
(define_expand "fix_truncdfsi2"
- [(parallel [(set (match_operand:SI 0 "gpc_reg_operand" "")
+ [(parallel [(set (match_operand:SI 0 "reg_or_mem_operand" "")
(fix:SI (match_operand:DF 1 "gpc_reg_operand" "")))
(clobber (match_dup 2))
(clobber (match_dup 3))])]
@@ -5286,28 +5287,29 @@
DONE;
}
operands[2] = gen_reg_rtx (DImode);
+ if (TARGET_PPC_GFXOPT)
+ {
+ rtx orig_dest = operands[0];
+ if (GET_CODE (orig_dest) != MEM)
+ operands[0] = assign_stack_temp (SImode, GET_MODE_SIZE (SImode), 0);
+ emit_insn (gen_fix_truncdfsi2_internal_gfxopt (operands[0], operands[1],
+ operands[2]));
+ if (operands[0] != orig_dest)
+ emit_move_insn (orig_dest, operands[0]);
+ DONE;
+ }
operands[3] = assign_stack_temp (DImode, GET_MODE_SIZE (DImode), 0);
}")
-(define_insn "*fix_truncdfsi2_internal"
+(define_insn_and_split "*fix_truncdfsi2_internal"
[(set (match_operand:SI 0 "gpc_reg_operand" "=r")
(fix:SI (match_operand:DF 1 "gpc_reg_operand" "f")))
(clobber (match_operand:DI 2 "gpc_reg_operand" "=f"))
(clobber (match_operand:DI 3 "memory_operand" "=o"))]
"(TARGET_POWER2 || TARGET_POWERPC) && TARGET_HARD_FLOAT && TARGET_FPRS"
"#"
- [(set_attr "length" "16")])
-
-(define_split
- [(set (match_operand:SI 0 "gpc_reg_operand" "")
- (fix:SI (match_operand:DF 1 "gpc_reg_operand" "")))
- (clobber (match_operand:DI 2 "gpc_reg_operand" ""))
- (clobber (match_operand:DI 3 "offsettable_mem_operand" ""))]
- "(TARGET_POWER2 || TARGET_POWERPC) && TARGET_HARD_FLOAT && TARGET_FPRS"
- [(set (match_operand:SI 0 "gpc_reg_operand" "")
- (fix:SI (match_operand:DF 1 "gpc_reg_operand" "")))
- (clobber (match_operand:DI 2 "gpc_reg_operand" ""))
- (clobber (match_operand:DI 3 "offsettable_mem_operand" ""))]
+ "&& 1"
+ [(pc)]
"
{
rtx lowword;
@@ -5321,20 +5323,47 @@
emit_move_insn (operands[3], operands[2]);
emit_move_insn (operands[0], gen_rtx_MEM (SImode, lowword));
DONE;
-}")
+}"
+ [(set_attr "length" "16")])
+
+(define_insn_and_split "fix_truncdfsi2_internal_gfxopt"
+ [(set (match_operand:SI 0 "memory_operand" "=Z")
+ (fix:SI (match_operand:DF 1 "gpc_reg_operand" "f")))
+ (clobber (match_operand:DI 2 "gpc_reg_operand" "=f"))]
+ "(TARGET_POWER2 || TARGET_POWERPC) && TARGET_HARD_FLOAT && TARGET_FPRS
+ && TARGET_PPC_GFXOPT"
+ "#"
+ "&& 1"
+ [(pc)]
+ "
+{
+ emit_insn (gen_fctiwz (operands[2], operands[1]));
+ emit_insn (gen_stfiwx (operands[0], operands[2]));
+ DONE;
+}"
+ [(set_attr "length" "16")])
; Here, we use (set (reg) (unspec:DI [(fix:SI ...)] UNSPEC_FCTIWZ))
; rather than (set (subreg:SI (reg)) (fix:SI ...))
; because the first makes it clear that operand 0 is not live
; before the instruction.
(define_insn "fctiwz"
- [(set (match_operand:DI 0 "gpc_reg_operand" "=*f")
+ [(set (match_operand:DI 0 "gpc_reg_operand" "=f")
(unspec:DI [(fix:SI (match_operand:DF 1 "gpc_reg_operand" "f"))]
UNSPEC_FCTIWZ))]
"(TARGET_POWER2 || TARGET_POWERPC) && TARGET_HARD_FLOAT && TARGET_FPRS"
"{fcirz|fctiwz} %0,%1"
[(set_attr "type" "fp")])
+; An UNSPEC is used so we don't have to support SImode in FP registers.
+(define_insn "stfiwx"
+ [(set (match_operand:SI 0 "memory_operand" "=Z")
+ (unspec:SI [(match_operand:DI 1 "gpc_reg_operand" "f")]
+ UNSPEC_STFIWX))]
+ "TARGET_PPC_GFXOPT"
+ "stfiwx %1,%y0"
+ [(set_attr "type" "fpstore")])
+
(define_expand "floatsisf2"
[(set (match_operand:SF 0 "gpc_reg_operand" "")
(float:SF (match_operand:SI 1 "gpc_reg_operand" "")))]
diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md
index e367d602cc9..bb799fbb092 100644
--- a/gcc/config/sh/sh.md
+++ b/gcc/config/sh/sh.md
@@ -2293,7 +2293,7 @@
FAIL;
}")
-(define_insn "ashlhi3"
+(define_insn "*ashlhi3_n"
[(set (match_operand:HI 0 "arith_reg_operand" "=r")
(ashift:HI (match_operand:HI 1 "arith_reg_operand" "0")
(match_operand:HI 2 "const_int_operand" "n")))
@@ -2308,6 +2308,22 @@
(const_string "6")))
(set_attr "type" "arith")])
+(define_expand "ashlhi3"
+ [(parallel [(set (match_operand:HI 0 "arith_reg_operand" "")
+ (ashift:HI (match_operand:HI 1 "arith_reg_operand" "")
+ (match_operand:SI 2 "nonmemory_operand" "")))
+ (clobber (reg:SI T_REG))])]
+ "TARGET_SH1"
+ "
+{
+ if (GET_CODE (operands[2]) != CONST_INT)
+ FAIL;
+ /* It may be possible to call gen_ashlhi3 directly with more generic
+ operands. Make sure operands[1] is a HImode register here. */
+ if (!arith_reg_operand (operands[1], HImode))
+ operands[1] = copy_to_mode_reg (HImode, operands[1]);
+}")
+
(define_split
[(set (match_operand:HI 0 "arith_reg_operand" "")
(ashift:HI (match_operand:HI 1 "arith_reg_operand" "")
diff --git a/gcc/config/vax/vax-protos.h b/gcc/config/vax/vax-protos.h
index bc8c02f3bc1..3b07ae4653b 100644
--- a/gcc/config/vax/vax-protos.h
+++ b/gcc/config/vax/vax-protos.h
@@ -26,6 +26,9 @@ extern void split_quadword_operands (rtx *, rtx *, int);
extern void print_operand_address (FILE *, rtx);
extern int vax_float_literal (rtx);
extern void vax_notice_update_cc (rtx, rtx);
+extern const char * vax_output_int_move (rtx, rtx *, enum machine_mode);
+extern const char * vax_output_int_add (rtx, rtx *, enum machine_mode);
+extern const char * vax_output_conditional_branch (enum rtx_code);
#endif /* RTX_CODE */
#ifdef REAL_VALUE_TYPE
diff --git a/gcc/config/vax/vax.c b/gcc/config/vax/vax.c
index ca5fb6ac629..995b1679203 100644
--- a/gcc/config/vax/vax.c
+++ b/gcc/config/vax/vax.c
@@ -50,7 +50,6 @@ static void vax_output_mi_thunk (FILE *, tree, HOST_WIDE_INT,
HOST_WIDE_INT, tree);
static int vax_address_cost_1 (rtx);
static int vax_address_cost (rtx);
-static int vax_rtx_costs_1 (rtx, enum rtx_code, enum rtx_code);
static bool vax_rtx_costs (rtx, int, int, int *);
static rtx vax_struct_value_rtx (tree, int);
@@ -529,179 +528,228 @@ vax_address_cost (rtx x)
/* Cost of an expression on a VAX. This version has costs tuned for the
CVAX chip (found in the VAX 3 series) with comments for variations on
- other models. */
+ other models.
-static int
-vax_rtx_costs_1 (register rtx x, enum rtx_code code, enum rtx_code outer_code)
+ FIXME: The costs need review, particularly for TRUNCATE, FLOAT_EXTEND
+ and FLOAT_TRUNCATE. We need a -mcpu option to allow provision of
+ costs on a per cpu basis. */
+
+static bool
+vax_rtx_costs (rtx x, int code, int outer_code, int *total)
{
enum machine_mode mode = GET_MODE (x);
- register int c;
- int i = 0; /* may be modified in switch */
+ int i = 0; /* may be modified in switch */
const char *fmt = GET_RTX_FORMAT (code); /* may be modified in switch */
switch (code)
{
/* On a VAX, constants from 0..63 are cheap because they can use the
- 1 byte literal constant format. compare to -1 should be made cheap
- so that decrement-and-branch insns can be formed more easily (if
- the value -1 is copied to a register some decrement-and-branch
+ 1 byte literal constant format. Compare to -1 should be made cheap
+ so that decrement-and-branch insns can be formed more easily (if
+ the value -1 is copied to a register some decrement-and-branch
patterns will not match). */
case CONST_INT:
if (INTVAL (x) == 0)
- return 0;
+ return true;
if (outer_code == AND)
- return ((unsigned HOST_WIDE_INT) ~INTVAL (x) <= 077) ? 1 : 2;
- if ((unsigned HOST_WIDE_INT) INTVAL (x) <= 077)
- return 1;
- if (outer_code == COMPARE && INTVAL (x) == -1)
- return 1;
- if (outer_code == PLUS && (unsigned HOST_WIDE_INT) -INTVAL (x) <= 077)
- return 1;
+ {
+ *total = ((unsigned HOST_WIDE_INT) ~INTVAL (x) <= 077) ? 1 : 2;
+ return true;
+ }
+ if ((unsigned HOST_WIDE_INT) INTVAL (x) <= 077
+ || (outer_code == COMPARE
+ && INTVAL (x) == -1)
+ || ((outer_code == PLUS || outer_code == MINUS)
+ && (unsigned HOST_WIDE_INT) -INTVAL (x) <= 077))
+ {
+ *total = 1;
+ return true;
+ }
/* FALLTHRU */
case CONST:
case LABEL_REF:
case SYMBOL_REF:
- return 3;
+ *total = 3;
+ return true;
case CONST_DOUBLE:
if (GET_MODE_CLASS (GET_MODE (x)) == MODE_FLOAT)
- return vax_float_literal (x) ? 5 : 8;
+ *total = vax_float_literal (x) ? 5 : 8;
else
- return (((CONST_DOUBLE_HIGH (x) == 0
- && (unsigned HOST_WIDE_INT) CONST_DOUBLE_LOW (x) < 64)
- || (outer_code == PLUS
- && CONST_DOUBLE_HIGH (x) == -1 \
- && (unsigned HOST_WIDE_INT)-CONST_DOUBLE_LOW (x) < 64))
- ? 2 : 5);
+ *total = ((CONST_DOUBLE_HIGH (x) == 0
+ && (unsigned HOST_WIDE_INT) CONST_DOUBLE_LOW (x) < 64)
+ || (outer_code == PLUS
+ && CONST_DOUBLE_HIGH (x) == -1
+ && (unsigned HOST_WIDE_INT)-CONST_DOUBLE_LOW (x) < 64))
+ ? 2 : 5;
+ return true;
case POST_INC:
- return 2;
+ *total = 2;
+ return true; /* Implies register operand. */
+
case PRE_DEC:
- return 3;
+ *total = 3;
+ return true; /* Implies register operand. */
+
case MULT:
switch (mode)
{
case DFmode:
- c = 16; /* 4 on VAX 9000 */
+ *total = 16; /* 4 on VAX 9000 */
break;
case SFmode:
- c = 9; /* 4 on VAX 9000, 12 on VAX 2 */
+ *total = 9; /* 4 on VAX 9000, 12 on VAX 2 */
break;
case DImode:
- c = 16; /* 6 on VAX 9000, 28 on VAX 2 */
+ *total = 16; /* 6 on VAX 9000, 28 on VAX 2 */
break;
case SImode:
case HImode:
case QImode:
- c = 10; /* 3-4 on VAX 9000, 20-28 on VAX 2 */
+ *total = 10; /* 3-4 on VAX 9000, 20-28 on VAX 2 */
break;
default:
- return MAX_COST; /* Mode is not supported. */
+ *total = MAX_COST; /* Mode is not supported. */
+ return true;
}
break;
+
case UDIV:
if (mode != SImode)
- return MAX_COST; /* Mode is not supported. */
- c = 17;
+ {
+ *total = MAX_COST; /* Mode is not supported. */
+ return true;
+ }
+ *total = 17;
break;
+
case DIV:
if (mode == DImode)
- c = 30; /* highly variable */
+ *total = 30; /* Highly variable. */
else if (mode == DFmode)
/* divide takes 28 cycles if the result is not zero, 13 otherwise */
- c = 24;
+ *total = 24;
else
- c = 11; /* 25 on VAX 2 */
+ *total = 11; /* 25 on VAX 2 */
break;
+
case MOD:
- c = 23;
+ *total = 23;
break;
+
case UMOD:
if (mode != SImode)
- return MAX_COST; /* Mode is not supported. */
- c = 29;
+ {
+ *total = MAX_COST; /* Mode is not supported. */
+ return true;
+ }
+ *total = 29;
break;
+
case FLOAT:
- c = 6 + (mode == DFmode) + (GET_MODE (XEXP (x, 0)) != SImode);
- /* 4 on VAX 9000 */
+ *total = (6 /* 4 on VAX 9000 */
+ + (mode == DFmode) + (GET_MODE (XEXP (x, 0)) != SImode));
break;
+
case FIX:
- c = 7; /* 17 on VAX 2 */
+ *total = 7; /* 17 on VAX 2 */
break;
+
case ASHIFT:
case LSHIFTRT:
case ASHIFTRT:
if (mode == DImode)
- c = 12;
+ *total = 12;
else
- c = 10; /* 6 on VAX 9000 */
+ *total = 10; /* 6 on VAX 9000 */
break;
+
case ROTATE:
case ROTATERT:
- c = 6; /* 5 on VAX 2, 4 on VAX 9000 */
+ *total = 6; /* 5 on VAX 2, 4 on VAX 9000 */
if (GET_CODE (XEXP (x, 1)) == CONST_INT)
- fmt = "e"; /* all constant rotate counts are short */
+ fmt = "e"; /* all constant rotate counts are short */
break;
+
case PLUS:
case MINUS:
- c = (mode == DFmode) ? 13 : 8; /* 6/8 on VAX 9000, 16/15 on VAX 2 */
+ *total = (mode == DFmode) ? 13 : 8; /* 6/8 on VAX 9000, 16/15 on VAX 2 */
/* Small integer operands can use subl2 and addl2. */
if ((GET_CODE (XEXP (x, 1)) == CONST_INT)
&& (unsigned HOST_WIDE_INT)(INTVAL (XEXP (x, 1)) + 63) < 127)
fmt = "e";
break;
+
case IOR:
case XOR:
- c = 3;
+ *total = 3;
break;
+
case AND:
/* AND is special because the first operand is complemented. */
- c = 3;
+ *total = 3;
if (GET_CODE (XEXP (x, 0)) == CONST_INT)
{
if ((unsigned HOST_WIDE_INT)~INTVAL (XEXP (x, 0)) > 63)
- c = 4;
+ *total = 4;
fmt = "e";
i = 1;
}
break;
+
case NEG:
if (mode == DFmode)
- return 9;
+ *total = 9;
else if (mode == SFmode)
- return 6;
+ *total = 6;
else if (mode == DImode)
- return 4;
+ *total = 4;
+ else
+ *total = 2;
+ break;
+
case NOT:
- return 2;
+ *total = 2;
+ break;
+
case ZERO_EXTRACT:
case SIGN_EXTRACT:
- c = 15;
+ *total = 15;
break;
+
case MEM:
if (mode == DImode || mode == DFmode)
- c = 5; /* 7 on VAX 2 */
+ *total = 5; /* 7 on VAX 2 */
else
- c = 3; /* 4 on VAX 2 */
+ *total = 3; /* 4 on VAX 2 */
x = XEXP (x, 0);
- if (GET_CODE (x) == REG || GET_CODE (x) == POST_INC)
- return c;
- return c + vax_address_cost_1 (x);
- default:
- c = 3;
+ if (GET_CODE (x) != REG && GET_CODE (x) != POST_INC)
+ *total += vax_address_cost_1 (x);
+ return true;
+
+ case FLOAT_EXTEND:
+ case FLOAT_TRUNCATE:
+ case TRUNCATE:
+ *total = 3; /* FIXME: Costs need to be checked */
break;
+
+ default:
+ return false;
}
/* Now look inside the expression. Operands which are not registers or
short constants add to the cost.
FMT and I may have been adjusted in the switch above for instructions
- which require special handling */
+ which require special handling. */
while (*fmt++ == 'e')
{
- register rtx op = XEXP (x, i++);
+ rtx op = XEXP (x, i);
+
+ i += 1;
code = GET_CODE (op);
/* A NOT is likely to be found as the first operand of an AND
@@ -715,12 +763,12 @@ vax_rtx_costs_1 (register rtx x, enum rtx_code code, enum rtx_code outer_code)
case CONST_INT:
if ((unsigned HOST_WIDE_INT)INTVAL (op) > 63
&& GET_MODE (x) != QImode)
- c += 1; /* 2 on VAX 2 */
+ *total += 1; /* 2 on VAX 2 */
break;
case CONST:
case LABEL_REF:
case SYMBOL_REF:
- c += 1; /* 2 on VAX 2 */
+ *total += 1; /* 2 on VAX 2 */
break;
case CONST_DOUBLE:
if (GET_MODE_CLASS (GET_MODE (op)) == MODE_FLOAT)
@@ -728,37 +776,30 @@ vax_rtx_costs_1 (register rtx x, enum rtx_code code, enum rtx_code outer_code)
/* Registers are faster than floating point constants -- even
those constants which can be encoded in a single byte. */
if (vax_float_literal (op))
- c++;
+ *total += 1;
else
- c += (GET_MODE (x) == DFmode) ? 3 : 2;
+ *total += (GET_MODE (x) == DFmode) ? 3 : 2;
}
else
{
if (CONST_DOUBLE_HIGH (op) != 0
|| (unsigned)CONST_DOUBLE_LOW (op) > 63)
- c += 2;
+ *total += 2;
}
break;
case MEM:
- c += 1; /* 2 on VAX 2 */
+ *total += 1; /* 2 on VAX 2 */
if (GET_CODE (XEXP (op, 0)) != REG)
- c += vax_address_cost_1 (XEXP (op, 0));
+ *total += vax_address_cost_1 (XEXP (op, 0));
break;
case REG:
case SUBREG:
break;
default:
- c += 1;
+ *total += 1;
break;
}
}
- return c;
-}
-
-static bool
-vax_rtx_costs (rtx x, int code, int outer_code, int * total)
-{
- *total = vax_rtx_costs_1 (x, code, outer_code);
return true;
}
@@ -858,3 +899,201 @@ vax_notice_update_cc (rtx exp, rtx insn ATTRIBUTE_UNUSED)
/* Actual condition, one line up, should be that value2's address
depends on value1, but that is too much of a pain. */
}
+
+/* Output integer move instructions. */
+
+const char *
+vax_output_int_move (rtx insn ATTRIBUTE_UNUSED, rtx *operands,
+ enum machine_mode mode)
+{
+ switch (mode)
+ {
+ case SImode:
+ if (GET_CODE (operands[1]) == SYMBOL_REF || GET_CODE (operands[1]) == CONST)
+ {
+ if (push_operand (operands[0], SImode))
+ return "pushab %a1";
+ return "movab %a1,%0";
+ }
+ if (operands[1] == const0_rtx)
+ return "clrl %0";
+ if (GET_CODE (operands[1]) == CONST_INT
+ && (unsigned) INTVAL (operands[1]) >= 64)
+ {
+ int i = INTVAL (operands[1]);
+ if ((unsigned)(~i) < 64)
+ return "mcoml %N1,%0";
+ if ((unsigned)i < 0x100)
+ return "movzbl %1,%0";
+ if (i >= -0x80 && i < 0)
+ return "cvtbl %1,%0";
+ if ((unsigned)i < 0x10000)
+ return "movzwl %1,%0";
+ if (i >= -0x8000 && i < 0)
+ return "cvtwl %1,%0";
+ }
+ if (push_operand (operands[0], SImode))
+ return "pushl %1";
+ return "movl %1,%0";
+
+ case HImode:
+ if (GET_CODE (operands[1]) == CONST_INT)
+ {
+ int i = INTVAL (operands[1]);
+ if (i == 0)
+ return "clrw %0";
+ else if ((unsigned int)i < 64)
+ return "movw %1,%0";
+ else if ((unsigned int)~i < 64)
+ return "mcomw %H1,%0";
+ else if ((unsigned int)i < 256)
+ return "movzbw %1,%0";
+ }
+ return "movw %1,%0";
+
+ case QImode:
+ if (GET_CODE (operands[1]) == CONST_INT)
+ {
+ int i = INTVAL (operands[1]);
+ if (i == 0)
+ return "clrb %0";
+ else if ((unsigned int)~i < 64)
+ return "mcomb %B1,%0";
+ }
+ return "movb %1,%0";
+
+ default:
+ gcc_unreachable ();
+ }
+}
+
+/* Output integer add instructions.
+
+ The space-time-opcode tradeoffs for addition vary by model of VAX.
+
+ On a VAX 3 "movab (r1)[r2],r3" is faster than "addl3 r1,r2,r3",
+ but it not faster on other models.
+
+ "movab #(r1),r2" is usually shorter than "addl3 #,r1,r2", and is
+ faster on a VAX 3, but some VAXen (e.g. VAX 9000) will stall if
+ a register is used in an address too soon after it is set.
+ Compromise by using movab only when it is shorter than the add
+ or the base register in the address is one of sp, ap, and fp,
+ which are not modified very often. */
+
+const char *
+vax_output_int_add (rtx insn ATTRIBUTE_UNUSED, rtx *operands,
+ enum machine_mode mode)
+{
+ switch (mode)
+ {
+ case SImode:
+ if (rtx_equal_p (operands[0], operands[1]))
+ {
+ if (operands[2] == const1_rtx)
+ return "incl %0";
+ if (operands[2] == constm1_rtx)
+ return "decl %0";
+ if (GET_CODE (operands[2]) == CONST_INT
+ && (unsigned) (- INTVAL (operands[2])) < 64)
+ return "subl2 $%n2,%0";
+ if (GET_CODE (operands[2]) == CONST_INT
+ && (unsigned) INTVAL (operands[2]) >= 64
+ && GET_CODE (operands[1]) == REG
+ && ((INTVAL (operands[2]) < 32767 && INTVAL (operands[2]) > -32768)
+ || REGNO (operands[1]) > 11))
+ return "movab %c2(%1),%0";
+ return "addl2 %2,%0";
+ }
+
+ if (rtx_equal_p (operands[0], operands[2]))
+ return "addl2 %1,%0";
+
+ if (GET_CODE (operands[2]) == CONST_INT
+ && INTVAL (operands[2]) < 32767
+ && INTVAL (operands[2]) > -32768
+ && GET_CODE (operands[1]) == REG
+ && push_operand (operands[0], SImode))
+ return "pushab %c2(%1)";
+
+ if (GET_CODE (operands[2]) == CONST_INT
+ && (unsigned) (- INTVAL (operands[2])) < 64)
+ return "subl3 $%n2,%1,%0";
+
+ if (GET_CODE (operands[2]) == CONST_INT
+ && (unsigned) INTVAL (operands[2]) >= 64
+ && GET_CODE (operands[1]) == REG
+ && ((INTVAL (operands[2]) < 32767 && INTVAL (operands[2]) > -32768)
+ || REGNO (operands[1]) > 11))
+ return "movab %c2(%1),%0";
+
+ /* Add this if using gcc on a VAX 3xxx:
+ if (REG_P (operands[1]) && REG_P (operands[2]))
+ return "movab (%1)[%2],%0";
+ */
+ return "addl3 %1,%2,%0";
+
+ case HImode:
+ if (rtx_equal_p (operands[0], operands[1]))
+ {
+ if (operands[2] == const1_rtx)
+ return "incw %0";
+ if (operands[2] == constm1_rtx)
+ return "decw %0";
+ if (GET_CODE (operands[2]) == CONST_INT
+ && (unsigned) (- INTVAL (operands[2])) < 64)
+ return "subw2 $%n2,%0";
+ return "addw2 %2,%0";
+ }
+ if (rtx_equal_p (operands[0], operands[2]))
+ return "addw2 %1,%0";
+ if (GET_CODE (operands[2]) == CONST_INT
+ && (unsigned) (- INTVAL (operands[2])) < 64)
+ return "subw3 $%n2,%1,%0";
+ return "addw3 %1,%2,%0";
+
+ case QImode:
+ if (rtx_equal_p (operands[0], operands[1]))
+ {
+ if (operands[2] == const1_rtx)
+ return "incb %0";
+ if (operands[2] == constm1_rtx)
+ return "decb %0";
+ if (GET_CODE (operands[2]) == CONST_INT
+ && (unsigned) (- INTVAL (operands[2])) < 64)
+ return "subb2 $%n2,%0";
+ return "addb2 %2,%0";
+ }
+ if (rtx_equal_p (operands[0], operands[2]))
+ return "addb2 %1,%0";
+ if (GET_CODE (operands[2]) == CONST_INT
+ && (unsigned) (- INTVAL (operands[2])) < 64)
+ return "subb3 $%n2,%1,%0";
+ return "addb3 %1,%2,%0";
+
+ default:
+ gcc_unreachable ();
+ }
+}
+
+/* Output a conditional branch. */
+const char *
+vax_output_conditional_branch (enum rtx_code code)
+{
+ switch (code)
+ {
+ case EQ: return "jeql %l0";
+ case NE: return "jneq %l0";
+ case GT: return "jgtr %l0";
+ case LT: return "jlss %l0";
+ case GTU: return "jgtru %l0";
+ case LTU: return "jlssu %l0";
+ case GE: return "jgeq %l0";
+ case LE: return "jleq %l0";
+ case GEU: return "jgequ %l0";
+ case LEU: return "jlequ %l0";
+ default:
+ gcc_unreachable ();
+ }
+}
+
diff --git a/gcc/config/vax/vax.md b/gcc/config/vax/vax.md
index b3b8ff6f396..6b10534bf4f 100644
--- a/gcc/config/vax/vax.md
+++ b/gcc/config/vax/vax.md
@@ -37,99 +37,57 @@
]
)
-;; We don't want to allow a constant operand for test insns because
-;; (set (cc0) (const_int foo)) has no mode information. Such insns will
-;; be folded while optimizing anyway.
-
-(define_insn "tstsi"
- [(set (cc0)
- (match_operand:SI 0 "nonimmediate_operand" "g"))]
- ""
- "tstl %0")
+;; Integer modes supported on VAX, withd a mapping from machine mode
+;; to mnemonic suffix. DImode is always a special case.
+(define_mode_macro VAXint [QI HI SI])
+(define_mode_attr isfx [(QI "b") (HI "w") (SI "l")])
-(define_insn "tsthi"
- [(set (cc0)
- (match_operand:HI 0 "nonimmediate_operand" "g"))]
- ""
- "tstw %0")
+;; Similar for float modes supported on VAX.
+(define_mode_macro VAXfp [SF DF])
+(define_mode_attr fsfx [(SF "f") (DF "%#")])
-(define_insn "tstqi"
- [(set (cc0)
- (match_operand:QI 0 "nonimmediate_operand" "g"))]
- ""
- "tstb %0")
+;; Some ouput patterns want integer immediates with a prefix...
+(define_mode_attr iprefx [(QI "B") (HI "H") (SI "N")])
-(define_insn "tstdf"
- [(set (cc0)
- (match_operand:DF 0 "general_operand" "gF"))]
- ""
- "tst%# %0")
-
-(define_insn "tstsf"
- [(set (cc0)
- (match_operand:SF 0 "general_operand" "gF"))]
- ""
- "tstf %0")
-
-(define_insn "cmpsi"
- [(set (cc0)
- (compare (match_operand:SI 0 "nonimmediate_operand" "g")
- (match_operand:SI 1 "general_operand" "g")))]
- ""
- "cmpl %0,%1")
+;; We don't want to allow a constant operand for test insns because
+;; We don't want to allow a constant operand for test insns because
+;; (set (cc0) (const_int foo)) has no mode information. Such insns will
+;; be folded while optimizing anyway.
-(define_insn "cmphi"
+(define_insn "tst<mode>"
[(set (cc0)
- (compare (match_operand:HI 0 "nonimmediate_operand" "g")
- (match_operand:HI 1 "general_operand" "g")))]
+ (match_operand:VAXint 0 "nonimmediate_operand" "g"))]
""
- "cmpw %0,%1")
+ "tst<VAXint:isfx> %0")
-(define_insn "cmpqi"
+(define_insn "tst<mode>"
[(set (cc0)
- (compare (match_operand:QI 0 "nonimmediate_operand" "g")
- (match_operand:QI 1 "general_operand" "g")))]
+ (match_operand:VAXfp 0 "general_operand" "gF"))]
""
- "cmpb %0,%1")
+ "tst<VAXfp:fsfx> %0")
-(define_insn "cmpdf"
+(define_insn "cmp<mode>"
[(set (cc0)
- (compare (match_operand:DF 0 "general_operand" "gF,gF")
- (match_operand:DF 1 "general_operand" "G,gF")))]
+ (compare (match_operand:VAXint 0 "nonimmediate_operand" "g")
+ (match_operand:VAXint 1 "general_operand" "g")))]
""
- "@
- tst%# %0
- cmp%# %0,%1")
+ "cmp<VAXint:isfx> %0,%1")
-(define_insn "cmpsf"
+(define_insn "cmp<mode>"
[(set (cc0)
- (compare (match_operand:SF 0 "general_operand" "gF,gF")
- (match_operand:SF 1 "general_operand" "G,gF")))]
+ (compare (match_operand:VAXfp 0 "general_operand" "gF,gF")
+ (match_operand:VAXfp 1 "general_operand" "G,gF")))]
""
"@
- tstf %0
- cmpf %0,%1")
-
-(define_insn ""
- [(set (cc0)
- (and:SI (match_operand:SI 0 "general_operand" "g")
- (match_operand:SI 1 "general_operand" "g")))]
- ""
- "bitl %0,%1")
-
-(define_insn ""
- [(set (cc0)
- (and:HI (match_operand:HI 0 "general_operand" "g")
- (match_operand:HI 1 "general_operand" "g")))]
- ""
- "bitw %0,%1")
+ tst<VAXfp:fsfx> %0
+ cmp<VAXfp:fsfx> %0,%1")
-(define_insn ""
+(define_insn "*bit<mode>"
[(set (cc0)
- (and:QI (match_operand:QI 0 "general_operand" "g")
- (match_operand:QI 1 "general_operand" "g")))]
+ (and:VAXint (match_operand:VAXint 0 "general_operand" "g")
+ (match_operand:VAXint 1 "general_operand" "g")))]
""
- "bitb %0,%1")
+ "bit<VAXint:isfx> %0,%1")
;; The VAX has no sCOND insns. It does have add/subtract with carry
;; which could be used to implement the sltu and sgeu patterns. However,
@@ -139,21 +97,13 @@
;; and has been deleted.
-(define_insn "movdf"
- [(set (match_operand:DF 0 "nonimmediate_operand" "=g,g")
- (match_operand:DF 1 "general_operand" "G,gF"))]
+(define_insn "mov<mode>"
+ [(set (match_operand:VAXfp 0 "nonimmediate_operand" "=g,g")
+ (match_operand:VAXfp 1 "general_operand" "G,gF"))]
""
"@
- clr%# %0
- mov%# %1,%0")
-
-(define_insn "movsf"
- [(set (match_operand:SF 0 "nonimmediate_operand" "=g,g")
- (match_operand:SF 1 "general_operand" "G,gF"))]
- ""
- "@
- clrf %0
- movf %1,%0")
+ clr<VAXfp:fsfx> %0
+ mov<VAXfp:fsfx> %1,%0")
;; Some VAXen don't support this instruction.
;;(define_insn "movti"
@@ -187,60 +137,11 @@
;; Loads of constants between 64 and 128 used to be done with
;; "addl3 $63,#,dst" but this is slower than movzbl and takes as much space.
-(define_insn "movsi"
- [(set (match_operand:SI 0 "nonimmediate_operand" "=g")
- (match_operand:SI 1 "general_operand" "g"))]
+(define_insn "mov<mode>"
+ [(set (match_operand:VAXint 0 "nonimmediate_operand" "=g")
+ (match_operand:VAXint 1 "general_operand" "g"))]
""
- "*
-{
- if (GET_CODE (operands[1]) == SYMBOL_REF || GET_CODE (operands[1]) == CONST)
- {
- if (push_operand (operands[0], SImode))
- return \"pushab %a1\";
- return \"movab %a1,%0\";
- }
- if (operands[1] == const0_rtx)
- return \"clrl %0\";
- if (GET_CODE (operands[1]) == CONST_INT
- && (unsigned) INTVAL (operands[1]) >= 64)
- {
- int i = INTVAL (operands[1]);
- if ((unsigned)(~i) < 64)
- return \"mcoml %N1,%0\";
- if ((unsigned)i < 0x100)
- return \"movzbl %1,%0\";
- if (i >= -0x80 && i < 0)
- return \"cvtbl %1,%0\";
- if ((unsigned)i < 0x10000)
- return \"movzwl %1,%0\";
- if (i >= -0x8000 && i < 0)
- return \"cvtwl %1,%0\";
- }
- if (push_operand (operands[0], SImode))
- return \"pushl %1\";
- return \"movl %1,%0\";
-}")
-
-(define_insn "movhi"
- [(set (match_operand:HI 0 "nonimmediate_operand" "=g")
- (match_operand:HI 1 "general_operand" "g"))]
- ""
- "*
-{
- if (GET_CODE (operands[1]) == CONST_INT)
- {
- int i = INTVAL (operands[1]);
- if (i == 0)
- return \"clrw %0\";
- else if ((unsigned int)i < 64)
- return \"movw %1,%0\";
- else if ((unsigned int)~i < 64)
- return \"mcomw %H1,%0\";
- else if ((unsigned int)i < 256)
- return \"movzbw %1,%0\";
- }
- return \"movw %1,%0\";
-}")
+ "* return vax_output_int_move (insn, operands, <MODE>mode);")
(define_insn "movstricthi"
[(set (strict_low_part (match_operand:HI 0 "register_operand" "+g"))
@@ -263,23 +164,6 @@
return \"movw %1,%0\";
}")
-(define_insn "movqi"
- [(set (match_operand:QI 0 "nonimmediate_operand" "=g")
- (match_operand:QI 1 "general_operand" "g"))]
- ""
- "*
-{
- if (GET_CODE (operands[1]) == CONST_INT)
- {
- int i = INTVAL (operands[1]);
- if (i == 0)
- return \"clrb %0\";
- else if ((unsigned int)~i < 64)
- return \"mcomb %B1,%0\";
- }
- return \"movb %1,%0\";
-}")
-
(define_insn "movstrictqi"
[(set (strict_low_part (match_operand:QI 0 "register_operand" "+g"))
(match_operand:QI 1 "general_operand" "g"))]
@@ -397,218 +281,38 @@
;; Fix-to-float conversion insns.
-(define_insn "floatsisf2"
- [(set (match_operand:SF 0 "nonimmediate_operand" "=g")
- (float:SF (match_operand:SI 1 "nonimmediate_operand" "g")))]
+(define_insn "float<VAXint:mode><VAXfp:mode>2"
+ [(set (match_operand:VAXfp 0 "nonimmediate_operand" "=g")
+ (float:VAXfp (match_operand:VAXint 1 "nonimmediate_operand" "g")))]
""
- "cvtlf %1,%0")
+ "cvt<VAXint:isfx><VAXfp:fsfx> %1,%0")
-(define_insn "floatsidf2"
- [(set (match_operand:DF 0 "nonimmediate_operand" "=g")
- (float:DF (match_operand:SI 1 "nonimmediate_operand" "g")))]
- ""
- "cvtl%# %1,%0")
-
-(define_insn "floathisf2"
- [(set (match_operand:SF 0 "nonimmediate_operand" "=g")
- (float:SF (match_operand:HI 1 "nonimmediate_operand" "g")))]
- ""
- "cvtwf %1,%0")
-
-(define_insn "floathidf2"
- [(set (match_operand:DF 0 "nonimmediate_operand" "=g")
- (float:DF (match_operand:HI 1 "nonimmediate_operand" "g")))]
- ""
- "cvtw%# %1,%0")
-
-(define_insn "floatqisf2"
- [(set (match_operand:SF 0 "nonimmediate_operand" "=g")
- (float:SF (match_operand:QI 1 "nonimmediate_operand" "g")))]
- ""
- "cvtbf %1,%0")
-
-(define_insn "floatqidf2"
- [(set (match_operand:DF 0 "nonimmediate_operand" "=g")
- (float:DF (match_operand:QI 1 "nonimmediate_operand" "g")))]
- ""
- "cvtb%# %1,%0")
-
;; Float-to-fix conversion insns.
-(define_insn "fix_truncsfqi2"
- [(set (match_operand:QI 0 "nonimmediate_operand" "=g")
- (fix:QI (fix:SF (match_operand:SF 1 "general_operand" "gF"))))]
- ""
- "cvtfb %1,%0")
-
-(define_insn "fix_truncsfhi2"
- [(set (match_operand:HI 0 "nonimmediate_operand" "=g")
- (fix:HI (fix:SF (match_operand:SF 1 "general_operand" "gF"))))]
- ""
- "cvtfw %1,%0")
-
-(define_insn "fix_truncsfsi2"
- [(set (match_operand:SI 0 "nonimmediate_operand" "=g")
- (fix:SI (fix:SF (match_operand:SF 1 "general_operand" "gF"))))]
- ""
- "cvtfl %1,%0")
-
-(define_insn "fix_truncdfqi2"
- [(set (match_operand:QI 0 "nonimmediate_operand" "=g")
- (fix:QI (fix:DF (match_operand:DF 1 "general_operand" "gF"))))]
- ""
- "cvt%#b %1,%0")
-
-(define_insn "fix_truncdfhi2"
- [(set (match_operand:HI 0 "nonimmediate_operand" "=g")
- (fix:HI (fix:DF (match_operand:DF 1 "general_operand" "gF"))))]
+(define_insn "fix_trunc<VAXfp:mode><VAXint:mode>2"
+ [(set (match_operand:VAXint 0 "nonimmediate_operand" "=g")
+ (fix:VAXint (fix:VAXfp (match_operand:VAXfp 1 "general_operand" "gF"))))]
""
- "cvt%#w %1,%0")
-
-(define_insn "fix_truncdfsi2"
- [(set (match_operand:SI 0 "nonimmediate_operand" "=g")
- (fix:SI (fix:DF (match_operand:DF 1 "general_operand" "gF"))))]
- ""
- "cvt%#l %1,%0")
+ "cvt<VAXfp:fsfx><VAXint:isfx> %1,%0")
;;- All kinds of add instructions.
-(define_insn "adddf3"
- [(set (match_operand:DF 0 "nonimmediate_operand" "=g,g,g")
- (plus:DF (match_operand:DF 1 "general_operand" "0,gF,gF")
- (match_operand:DF 2 "general_operand" "gF,0,gF")))]
+(define_insn "add<mode>3"
+ [(set (match_operand:VAXfp 0 "nonimmediate_operand" "=g,g,g")
+ (plus:VAXfp (match_operand:VAXfp 1 "general_operand" "0,gF,gF")
+ (match_operand:VAXfp 2 "general_operand" "gF,0,gF")))]
""
"@
- add%#2 %2,%0
- add%#2 %1,%0
- add%#3 %1,%2,%0")
-
-(define_insn "addsf3"
- [(set (match_operand:SF 0 "nonimmediate_operand" "=g,g,g")
- (plus:SF (match_operand:SF 1 "general_operand" "0,gF,gF")
- (match_operand:SF 2 "general_operand" "gF,0,gF")))]
- ""
- "@
- addf2 %2,%0
- addf2 %1,%0
- addf3 %1,%2,%0")
-
-/* The space-time-opcode tradeoffs for addition vary by model of VAX.
-
- On a VAX 3 "movab (r1)[r2],r3" is faster than "addl3 r1,r2,r3",
- but it not faster on other models.
-
- "movab #(r1),r2" is usually shorter than "addl3 #,r1,r2", and is
- faster on a VAX 3, but some VAXen (e.g. VAX 9000) will stall if
- a register is used in an address too soon after it is set.
- Compromise by using movab only when it is shorter than the add
- or the base register in the address is one of sp, ap, and fp,
- which are not modified very often. */
-
-
-(define_insn "addsi3"
- [(set (match_operand:SI 0 "nonimmediate_operand" "=g")
- (plus:SI (match_operand:SI 1 "general_operand" "g")
- (match_operand:SI 2 "general_operand" "g")))]
- ""
- "*
-{
- if (rtx_equal_p (operands[0], operands[1]))
- {
- if (operands[2] == const1_rtx)
- return \"incl %0\";
- if (operands[2] == constm1_rtx)
- return \"decl %0\";
- if (GET_CODE (operands[2]) == CONST_INT
- && (unsigned) (- INTVAL (operands[2])) < 64)
- return \"subl2 $%n2,%0\";
- if (GET_CODE (operands[2]) == CONST_INT
- && (unsigned) INTVAL (operands[2]) >= 64
- && GET_CODE (operands[1]) == REG
- && ((INTVAL (operands[2]) < 32767 && INTVAL (operands[2]) > -32768)
- || REGNO (operands[1]) > 11))
- return \"movab %c2(%1),%0\";
- return \"addl2 %2,%0\";
- }
- if (rtx_equal_p (operands[0], operands[2]))
- return \"addl2 %1,%0\";
-
- if (GET_CODE (operands[2]) == CONST_INT
- && INTVAL (operands[2]) < 32767
- && INTVAL (operands[2]) > -32768
- && GET_CODE (operands[1]) == REG
- && push_operand (operands[0], SImode))
- return \"pushab %c2(%1)\";
-
- if (GET_CODE (operands[2]) == CONST_INT
- && (unsigned) (- INTVAL (operands[2])) < 64)
- return \"subl3 $%n2,%1,%0\";
-
- if (GET_CODE (operands[2]) == CONST_INT
- && (unsigned) INTVAL (operands[2]) >= 64
- && GET_CODE (operands[1]) == REG
- && ((INTVAL (operands[2]) < 32767 && INTVAL (operands[2]) > -32768)
- || REGNO (operands[1]) > 11))
- return \"movab %c2(%1),%0\";
-
- /* Add this if using gcc on a VAX 3xxx:
- if (REG_P (operands[1]) && REG_P (operands[2]))
- return \"movab (%1)[%2],%0\";
- */
- return \"addl3 %1,%2,%0\";
-}")
-
-(define_insn "addhi3"
- [(set (match_operand:HI 0 "nonimmediate_operand" "=g")
- (plus:HI (match_operand:HI 1 "general_operand" "g")
- (match_operand:HI 2 "general_operand" "g")))]
- ""
- "*
-{
- if (rtx_equal_p (operands[0], operands[1]))
- {
- if (operands[2] == const1_rtx)
- return \"incw %0\";
- if (operands[2] == constm1_rtx)
- return \"decw %0\";
- if (GET_CODE (operands[2]) == CONST_INT
- && (unsigned) (- INTVAL (operands[2])) < 64)
- return \"subw2 $%n2,%0\";
- return \"addw2 %2,%0\";
- }
- if (rtx_equal_p (operands[0], operands[2]))
- return \"addw2 %1,%0\";
- if (GET_CODE (operands[2]) == CONST_INT
- && (unsigned) (- INTVAL (operands[2])) < 64)
- return \"subw3 $%n2,%1,%0\";
- return \"addw3 %1,%2,%0\";
-}")
+ add<VAXfp:fsfx>2 %2,%0
+ add<VAXfp:fsfx>2 %1,%0
+ add<VAXfp:fsfx>3 %1,%2,%0")
-(define_insn "addqi3"
- [(set (match_operand:QI 0 "nonimmediate_operand" "=g")
- (plus:QI (match_operand:QI 1 "general_operand" "g")
- (match_operand:QI 2 "general_operand" "g")))]
+(define_insn "add<mode>3"
+ [(set (match_operand:VAXint 0 "nonimmediate_operand" "=g")
+ (plus:VAXint (match_operand:VAXint 1 "general_operand" "g")
+ (match_operand:VAXint 2 "general_operand" "g")))]
""
- "*
-{
- if (rtx_equal_p (operands[0], operands[1]))
- {
- if (operands[2] == const1_rtx)
- return \"incb %0\";
- if (operands[2] == constm1_rtx)
- return \"decb %0\";
- if (GET_CODE (operands[2]) == CONST_INT
- && (unsigned) (- INTVAL (operands[2])) < 64)
- return \"subb2 $%n2,%0\";
- return \"addb2 %2,%0\";
- }
- if (rtx_equal_p (operands[0], operands[2]))
- return \"addb2 %1,%0\";
- if (GET_CODE (operands[2]) == CONST_INT
- && (unsigned) (- INTVAL (operands[2])) < 64)
- return \"subb3 $%n2,%1,%0\";
- return \"addb3 %1,%2,%0\";
-}")
+ "* return vax_output_int_add (insn, operands, <MODE>mode);")
;; The add-with-carry (adwc) instruction only accepts two operands.
(define_insn "adddi3"
@@ -656,50 +360,23 @@
;;- All kinds of subtract instructions.
-(define_insn "subdf3"
- [(set (match_operand:DF 0 "nonimmediate_operand" "=g,g")
- (minus:DF (match_operand:DF 1 "general_operand" "0,gF")
- (match_operand:DF 2 "general_operand" "gF,gF")))]
+(define_insn "sub<mode>3"
+ [(set (match_operand:VAXfp 0 "nonimmediate_operand" "=g,g")
+ (minus:VAXfp (match_operand:VAXfp 1 "general_operand" "0,gF")
+ (match_operand:VAXfp 2 "general_operand" "gF,gF")))]
""
"@
- sub%#2 %2,%0
- sub%#3 %2,%1,%0")
+ sub<VAXfp:fsfx>2 %2,%0
+ sub<VAXfp:fsfx>3 %2,%1,%0")
-(define_insn "subsf3"
- [(set (match_operand:SF 0 "nonimmediate_operand" "=g,g")
- (minus:SF (match_operand:SF 1 "general_operand" "0,gF")
- (match_operand:SF 2 "general_operand" "gF,gF")))]
+(define_insn "sub<mode>3"
+ [(set (match_operand:VAXint 0 "nonimmediate_operand" "=g,g")
+ (minus:VAXint (match_operand:VAXint 1 "general_operand" "0,g")
+ (match_operand:VAXint 2 "general_operand" "g,g")))]
""
"@
- subf2 %2,%0
- subf3 %2,%1,%0")
-
-(define_insn "subsi3"
- [(set (match_operand:SI 0 "nonimmediate_operand" "=g,g")
- (minus:SI (match_operand:SI 1 "general_operand" "0,g")
- (match_operand:SI 2 "general_operand" "g,g")))]
- ""
- "@
- subl2 %2,%0
- subl3 %2,%1,%0")
-
-(define_insn "subhi3"
- [(set (match_operand:HI 0 "nonimmediate_operand" "=g,g")
- (minus:HI (match_operand:HI 1 "general_operand" "0,g")
- (match_operand:HI 2 "general_operand" "g,g")))]
- ""
- "@
- subw2 %2,%0
- subw3 %2,%1,%0")
-
-(define_insn "subqi3"
- [(set (match_operand:QI 0 "nonimmediate_operand" "=g,g")
- (minus:QI (match_operand:QI 1 "general_operand" "0,g")
- (match_operand:QI 2 "general_operand" "g,g")))]
- ""
- "@
- subb2 %2,%0
- subb3 %2,%1,%0")
+ sub<VAXint:isfx>2 %2,%0
+ sub<VAXint:isfx>3 %2,%1,%0")
;; The subtract-with-carry (sbwc) instruction only takes two operands.
(define_insn "subdi3"
@@ -747,55 +424,25 @@
;;- Multiply instructions.
-(define_insn "muldf3"
- [(set (match_operand:DF 0 "nonimmediate_operand" "=g,g,g")
- (mult:DF (match_operand:DF 1 "general_operand" "0,gF,gF")
- (match_operand:DF 2 "general_operand" "gF,0,gF")))]
+(define_insn "mul<mode>3"
+ [(set (match_operand:VAXfp 0 "nonimmediate_operand" "=g,g,g")
+ (mult:VAXfp (match_operand:VAXfp 1 "general_operand" "0,gF,gF")
+ (match_operand:VAXfp 2 "general_operand" "gF,0,gF")))]
""
"@
- mul%#2 %2,%0
- mul%#2 %1,%0
- mul%#3 %1,%2,%0")
+ mul<VAXfp:fsfx>2 %2,%0
+ mul<VAXfp:fsfx>2 %1,%0
+ mul<VAXfp:fsfx>3 %1,%2,%0")
-(define_insn "mulsf3"
- [(set (match_operand:SF 0 "nonimmediate_operand" "=g,g,g")
- (mult:SF (match_operand:SF 1 "general_operand" "0,gF,gF")
- (match_operand:SF 2 "general_operand" "gF,0,gF")))]
+(define_insn "mul<mode>3"
+ [(set (match_operand:VAXint 0 "nonimmediate_operand" "=g,g,g")
+ (mult:VAXint (match_operand:VAXint 1 "general_operand" "0,g,g")
+ (match_operand:VAXint 2 "general_operand" "g,0,g")))]
""
"@
- mulf2 %2,%0
- mulf2 %1,%0
- mulf3 %1,%2,%0")
-
-(define_insn "mulsi3"
- [(set (match_operand:SI 0 "nonimmediate_operand" "=g,g,g")
- (mult:SI (match_operand:SI 1 "general_operand" "0,g,g")
- (match_operand:SI 2 "general_operand" "g,0,g")))]
- ""
- "@
- mull2 %2,%0
- mull2 %1,%0
- mull3 %1,%2,%0")
-
-(define_insn "mulhi3"
- [(set (match_operand:HI 0 "nonimmediate_operand" "=g,g,")
- (mult:HI (match_operand:HI 1 "general_operand" "0,g,g")
- (match_operand:HI 2 "general_operand" "g,0,g")))]
- ""
- "@
- mulw2 %2,%0
- mulw2 %1,%0
- mulw3 %1,%2,%0")
-
-(define_insn "mulqi3"
- [(set (match_operand:QI 0 "nonimmediate_operand" "=g,g,g")
- (mult:QI (match_operand:QI 1 "general_operand" "0,g,g")
- (match_operand:QI 2 "general_operand" "g,0,g")))]
- ""
- "@
- mulb2 %2,%0
- mulb2 %1,%0
- mulb3 %1,%2,%0")
+ mul<VAXint:isfx>2 %2,%0
+ mul<VAXint:isfx>2 %1,%0
+ mul<VAXint:isfx>3 %1,%2,%0")
(define_insn "mulsidi3"
[(set (match_operand:DI 0 "nonimmediate_operand" "=g")
@@ -837,50 +484,23 @@
;;- Divide instructions.
-(define_insn "divdf3"
- [(set (match_operand:DF 0 "nonimmediate_operand" "=g,g")
- (div:DF (match_operand:DF 1 "general_operand" "0,gF")
- (match_operand:DF 2 "general_operand" "gF,gF")))]
+(define_insn "div<mode>3"
+ [(set (match_operand:VAXfp 0 "nonimmediate_operand" "=g,g")
+ (div:VAXfp (match_operand:VAXfp 1 "general_operand" "0,gF")
+ (match_operand:VAXfp 2 "general_operand" "gF,gF")))]
""
"@
- div%#2 %2,%0
- div%#3 %2,%1,%0")
+ div<VAXfp:fsfx>2 %2,%0
+ div<VAXfp:fsfx>3 %2,%1,%0")
-(define_insn "divsf3"
- [(set (match_operand:SF 0 "nonimmediate_operand" "=g,g")
- (div:SF (match_operand:SF 1 "general_operand" "0,gF")
- (match_operand:SF 2 "general_operand" "gF,gF")))]
+(define_insn "div<mode>3"
+ [(set (match_operand:VAXint 0 "nonimmediate_operand" "=g,g")
+ (div:VAXint (match_operand:VAXint 1 "general_operand" "0,g")
+ (match_operand:VAXint 2 "general_operand" "g,g")))]
""
"@
- divf2 %2,%0
- divf3 %2,%1,%0")
-
-(define_insn "divsi3"
- [(set (match_operand:SI 0 "nonimmediate_operand" "=g,g")
- (div:SI (match_operand:SI 1 "general_operand" "0,g")
- (match_operand:SI 2 "general_operand" "g,g")))]
- ""
- "@
- divl2 %2,%0
- divl3 %2,%1,%0")
-
-(define_insn "divhi3"
- [(set (match_operand:HI 0 "nonimmediate_operand" "=g,g")
- (div:HI (match_operand:HI 1 "general_operand" "0,g")
- (match_operand:HI 2 "general_operand" "g,g")))]
- ""
- "@
- divw2 %2,%0
- divw3 %2,%1,%0")
-
-(define_insn "divqi3"
- [(set (match_operand:QI 0 "nonimmediate_operand" "=g,g")
- (div:QI (match_operand:QI 1 "general_operand" "0,g")
- (match_operand:QI 2 "general_operand" "g,g")))]
- ""
- "@
- divb2 %2,%0
- divb3 %2,%1,%0")
+ div<VAXint:isfx>2 %2,%0
+ div<VAXint:isfx>3 %2,%1,%0")
;This is left out because it is very slow;
;we are better off programming around the "lack" of this insn.
@@ -895,10 +515,10 @@
; "ediv %2,%1,%0,%3")
;; Bit-and on the VAX is done with a clear-bits insn.
-(define_expand "andsi3"
- [(set (match_operand:SI 0 "nonimmediate_operand" "")
- (and:SI (not:SI (match_operand:SI 1 "general_operand" ""))
- (match_operand:SI 2 "general_operand" "")))]
+(define_expand "and<mode>3"
+ [(set (match_operand:VAXint 0 "nonimmediate_operand" "")
+ (and:VAXint (not:VAXint (match_operand:VAXint 1 "general_operand" ""))
+ (match_operand:VAXint 2 "general_operand" "")))]
""
"
{
@@ -915,223 +535,76 @@
if (GET_CODE (op1) == CONST_INT)
operands[1] = GEN_INT (~INTVAL (op1));
else
- operands[1] = expand_unop (SImode, one_cmpl_optab, op1, 0, 1);
+ operands[1] = expand_unop (<MODE>mode, one_cmpl_optab, op1, 0, 1);
}")
-(define_expand "andhi3"
- [(set (match_operand:HI 0 "nonimmediate_operand" "")
- (and:HI (not:HI (match_operand:HI 1 "general_operand" ""))
- (match_operand:HI 2 "general_operand" "")))]
- ""
- "
-{
- rtx op1 = operands[1];
-
- if (GET_CODE (operands[2]) == CONST_INT && GET_CODE (op1) != CONST_INT)
- {
- operands[1] = operands[2];
- operands[2] = op1;
- op1 = operands[1];
- }
-
- if (GET_CODE (op1) == CONST_INT)
- operands[1] = GEN_INT (~INTVAL (op1));
- else
- operands[1] = expand_unop (HImode, one_cmpl_optab, op1, 0, 1);
-}")
-
-(define_expand "andqi3"
- [(set (match_operand:QI 0 "nonimmediate_operand" "")
- (and:QI (not:QI (match_operand:QI 1 "general_operand" ""))
- (match_operand:QI 2 "general_operand" "")))]
- ""
- "
-{
- rtx op1 = operands[1];
-
- if (GET_CODE (operands[2]) == CONST_INT && GET_CODE (op1) != CONST_INT)
- {
- operands[1] = operands[2];
- operands[2] = op1;
- op1 = operands[1];
- }
-
- if (GET_CODE (op1) == CONST_INT)
- operands[1] = GEN_INT (~INTVAL (op1));
- else
- operands[1] = expand_unop (QImode, one_cmpl_optab, op1, 0, 1);
-}")
-
-(define_insn ""
- [(set (match_operand:SI 0 "nonimmediate_operand" "=g,g")
- (and:SI (not:SI (match_operand:SI 1 "general_operand" "g,g"))
- (match_operand:SI 2 "general_operand" "0,g")))]
- ""
- "@
- bicl2 %1,%0
- bicl3 %1,%2,%0")
-
-(define_insn ""
- [(set (match_operand:HI 0 "nonimmediate_operand" "=g,g")
- (and:HI (not:HI (match_operand:HI 1 "general_operand" "g,g"))
- (match_operand:HI 2 "general_operand" "0,g")))]
- ""
- "@
- bicw2 %1,%0
- bicw3 %1,%2,%0")
-
-(define_insn ""
- [(set (match_operand:QI 0 "nonimmediate_operand" "=g,g")
- (and:QI (not:QI (match_operand:QI 1 "general_operand" "g,g"))
- (match_operand:QI 2 "general_operand" "0,g")))]
+(define_insn "*and<mode>"
+ [(set (match_operand:VAXint 0 "nonimmediate_operand" "=g,g")
+ (and:VAXint (not:VAXint (match_operand:VAXint 1 "general_operand" "g,g"))
+ (match_operand:VAXint 2 "general_operand" "0,g")))]
""
"@
- bicb2 %1,%0
- bicb3 %1,%2,%0")
+ bic<VAXint:isfx>2 %1,%0
+ bic<VAXint:isfx>3 %1,%2,%0")
;; The following used to be needed because constant propagation can
;; create them starting from the bic insn patterns above. This is no
;; longer a problem. However, having these patterns allows optimization
;; opportunities in combine.c.
-(define_insn ""
- [(set (match_operand:SI 0 "nonimmediate_operand" "=g,g")
- (and:SI (match_operand:SI 1 "general_operand" "0,g")
- (match_operand:SI 2 "const_int_operand" "n,n")))]
+(define_insn "*and<mode>_const_int"
+ [(set (match_operand:VAXint 0 "nonimmediate_operand" "=g,g")
+ (and:VAXint (match_operand:VAXint 1 "general_operand" "0,g")
+ (match_operand:VAXint 2 "const_int_operand" "n,n")))]
""
"@
- bicl2 %N2,%0
- bicl3 %N2,%1,%0")
+ bic<VAXint:isfx>2 %<VAXint:iprefx>2,%0
+ bic<VAXint:isfx>3 %<VAXint:iprefx>2,%1,%0")
-(define_insn ""
- [(set (match_operand:HI 0 "nonimmediate_operand" "=g,g")
- (and:HI (match_operand:HI 1 "general_operand" "0,g")
- (match_operand:HI 2 "const_int_operand" "n,n")))]
- ""
- "@
- bicw2 %H2,%0
- bicw3 %H2,%1,%0")
-
-(define_insn ""
- [(set (match_operand:QI 0 "nonimmediate_operand" "=g,g")
- (and:QI (match_operand:QI 1 "general_operand" "0,g")
- (match_operand:QI 2 "const_int_operand" "n,n")))]
- ""
- "@
- bicb2 %B2,%0
- bicb3 %B2,%1,%0")
;;- Bit set instructions.
-(define_insn "iorsi3"
- [(set (match_operand:SI 0 "nonimmediate_operand" "=g,g,g")
- (ior:SI (match_operand:SI 1 "general_operand" "0,g,g")
- (match_operand:SI 2 "general_operand" "g,0,g")))]
+(define_insn "ior<mode>3"
+ [(set (match_operand:VAXint 0 "nonimmediate_operand" "=g,g,g")
+ (ior:VAXint (match_operand:VAXint 1 "general_operand" "0,g,g")
+ (match_operand:VAXint 2 "general_operand" "g,0,g")))]
""
"@
- bisl2 %2,%0
- bisl2 %1,%0
- bisl3 %2,%1,%0")
-
-(define_insn "iorhi3"
- [(set (match_operand:HI 0 "nonimmediate_operand" "=g,g,g")
- (ior:HI (match_operand:HI 1 "general_operand" "0,g,g")
- (match_operand:HI 2 "general_operand" "g,0,g")))]
- ""
- "@
- bisw2 %2,%0
- bisw2 %1,%0
- bisw3 %2,%1,%0")
-
-(define_insn "iorqi3"
- [(set (match_operand:QI 0 "nonimmediate_operand" "=g,g,g")
- (ior:QI (match_operand:QI 1 "general_operand" "0,g,g")
- (match_operand:QI 2 "general_operand" "g,0,g")))]
- ""
- "@
- bisb2 %2,%0
- bisb2 %1,%0
- bisb3 %2,%1,%0")
+ bis<VAXint:isfx>2 %2,%0
+ bis<VAXint:isfx>2 %1,%0
+ bis<VAXint:isfx>3 %2,%1,%0")
;;- xor instructions.
-(define_insn "xorsi3"
- [(set (match_operand:SI 0 "nonimmediate_operand" "=g,g,g")
- (xor:SI (match_operand:SI 1 "general_operand" "0,g,g")
- (match_operand:SI 2 "general_operand" "g,0,g")))]
- ""
- "@
- xorl2 %2,%0
- xorl2 %1,%0
- xorl3 %2,%1,%0")
-
-(define_insn "xorhi3"
- [(set (match_operand:HI 0 "nonimmediate_operand" "=g,g,g")
- (xor:HI (match_operand:HI 1 "general_operand" "0,g,g")
- (match_operand:HI 2 "general_operand" "g,0,g")))]
+(define_insn "xor<mode>3"
+ [(set (match_operand:VAXint 0 "nonimmediate_operand" "=g,g,g")
+ (xor:VAXint (match_operand:VAXint 1 "general_operand" "0,g,g")
+ (match_operand:VAXint 2 "general_operand" "g,0,g")))]
""
"@
- xorw2 %2,%0
- xorw2 %1,%0
- xorw3 %2,%1,%0")
+ xor<VAXint:isfx>2 %2,%0
+ xor<VAXint:isfx>2 %1,%0
+ xor<VAXint:isfx>3 %2,%1,%0")
-(define_insn "xorqi3"
- [(set (match_operand:QI 0 "nonimmediate_operand" "=g,g,g")
- (xor:QI (match_operand:QI 1 "general_operand" "0,g,g")
- (match_operand:QI 2 "general_operand" "g,0,g")))]
- ""
- "@
- xorb2 %2,%0
- xorb2 %1,%0
- xorb3 %2,%1,%0")
-(define_insn "negdf2"
- [(set (match_operand:DF 0 "nonimmediate_operand" "=g")
- (neg:DF (match_operand:DF 1 "general_operand" "gF")))]
- ""
- "mneg%# %1,%0")
-
-(define_insn "negsf2"
- [(set (match_operand:SF 0 "nonimmediate_operand" "=g")
- (neg:SF (match_operand:SF 1 "general_operand" "gF")))]
- ""
- "mnegf %1,%0")
-
-(define_insn "negsi2"
- [(set (match_operand:SI 0 "nonimmediate_operand" "=g")
- (neg:SI (match_operand:SI 1 "general_operand" "g")))]
+(define_insn "neg<mode>2"
+ [(set (match_operand:VAXfp 0 "nonimmediate_operand" "=g")
+ (neg:VAXfp (match_operand:VAXfp 1 "general_operand" "gF")))]
""
- "mnegl %1,%0")
+ "mneg<VAXfp:fsfx> %1,%0")
-(define_insn "neghi2"
- [(set (match_operand:HI 0 "nonimmediate_operand" "=g")
- (neg:HI (match_operand:HI 1 "general_operand" "g")))]
+(define_insn "neg<mode>2"
+ [(set (match_operand:VAXint 0 "nonimmediate_operand" "=g")
+ (neg:VAXint (match_operand:VAXint 1 "general_operand" "g")))]
""
- "mnegw %1,%0")
+ "mneg<VAXint:isfx> %1,%0")
-(define_insn "negqi2"
- [(set (match_operand:QI 0 "nonimmediate_operand" "=g")
- (neg:QI (match_operand:QI 1 "general_operand" "g")))]
- ""
- "mnegb %1,%0")
-
-(define_insn "one_cmplsi2"
- [(set (match_operand:SI 0 "nonimmediate_operand" "=g")
- (not:SI (match_operand:SI 1 "general_operand" "g")))]
+(define_insn "one_cmpl<mode>2"
+ [(set (match_operand:VAXint 0 "nonimmediate_operand" "=g")
+ (not:VAXint (match_operand:VAXint 1 "general_operand" "g")))]
""
- "mcoml %1,%0")
+ "mcom<VAXint:isfx> %1,%0")
-(define_insn "one_cmplhi2"
- [(set (match_operand:HI 0 "nonimmediate_operand" "=g")
- (not:HI (match_operand:HI 1 "general_operand" "g")))]
- ""
- "mcomw %1,%0")
-
-(define_insn "one_cmplqi2"
- [(set (match_operand:QI 0 "nonimmediate_operand" "=g")
- (not:QI (match_operand:QI 1 "general_operand" "g")))]
- ""
- "mcomb %1,%0")
;; Arithmetic right shift on the VAX works by negating the shift count,
;; then emitting a right shift with the shift count negated. This means
@@ -1525,101 +998,24 @@
""
"insv %3,%2,%1,%0")
+;; Unconditional jump
(define_insn "jump"
[(set (pc)
(label_ref (match_operand 0 "" "")))]
""
"jbr %l0")
-(define_insn "beq"
- [(set (pc)
- (if_then_else (eq (cc0)
- (const_int 0))
- (label_ref (match_operand 0 "" ""))
- (pc)))]
- ""
- "jeql %l0")
-
-(define_insn "bne"
- [(set (pc)
- (if_then_else (ne (cc0)
- (const_int 0))
- (label_ref (match_operand 0 "" ""))
- (pc)))]
- ""
- "jneq %l0")
-
-(define_insn "bgt"
- [(set (pc)
- (if_then_else (gt (cc0)
- (const_int 0))
- (label_ref (match_operand 0 "" ""))
- (pc)))]
- ""
- "jgtr %l0")
-
-(define_insn "bgtu"
- [(set (pc)
- (if_then_else (gtu (cc0)
- (const_int 0))
- (label_ref (match_operand 0 "" ""))
- (pc)))]
- ""
- "jgtru %l0")
-
-(define_insn "blt"
- [(set (pc)
- (if_then_else (lt (cc0)
- (const_int 0))
- (label_ref (match_operand 0 "" ""))
- (pc)))]
- ""
- "jlss %l0")
-
-(define_insn "bltu"
- [(set (pc)
- (if_then_else (ltu (cc0)
- (const_int 0))
- (label_ref (match_operand 0 "" ""))
- (pc)))]
- ""
- "jlssu %l0")
-
-(define_insn "bge"
- [(set (pc)
- (if_then_else (ge (cc0)
- (const_int 0))
- (label_ref (match_operand 0 "" ""))
- (pc)))]
- ""
- "jgeq %l0")
-
-(define_insn "bgeu"
- [(set (pc)
- (if_then_else (geu (cc0)
- (const_int 0))
- (label_ref (match_operand 0 "" ""))
- (pc)))]
- ""
- "jgequ %l0")
-
-(define_insn "ble"
- [(set (pc)
- (if_then_else (le (cc0)
- (const_int 0))
- (label_ref (match_operand 0 "" ""))
- (pc)))]
- ""
- "jleq %l0")
+;; Conditional jumps
+(define_code_macro any_cond [eq ne gt lt gtu ltu ge le geu leu])
-(define_insn "bleu"
+(define_insn "b<code>"
[(set (pc)
- (if_then_else (leu (cc0)
- (const_int 0))
+ (if_then_else (any_cond (cc0)
+ (const_int 0))
(label_ref (match_operand 0 "" ""))
(pc)))]
""
- "jlequ %l0")
+ "* return vax_output_conditional_branch (<CODE>);")
;; Recognize reversed jumps.
(define_insn ""
diff --git a/gcc/configure b/gcc/configure
index dfefaebfd17..a8dd3da4cd6 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -868,7 +868,7 @@ Optional Features:
enable expensive run-time checks. With LIST,
enable only specific categories of checks.
Categories are: assert,fold,gc,gcac,misc,
- rtlflag,rtl,tree,valgrind,release,yes,all;
+ rtlflag,rtl,runtime,tree,valgrind,release,yes,all;
--enable-mapped-location location_t is fileline integer cookie
--enable-coverage=LEVEL
enable compiler's code coverage collection.
@@ -6278,6 +6278,7 @@ ac_checking=
ac_tree_checking=
ac_rtl_checking=
ac_rtlflag_checking=
+ac_runtime_checking=1
ac_gc_checking=
ac_gc_always_collect=
ac_fold_checking=
@@ -6287,16 +6288,17 @@ do
case $check in
yes) ac_assert_checking=1 ; ac_checking=1 ;
ac_tree_checking=1 ; ac_gc_checking=1 ;
- ac_rtlflag_checking=1 ;;
+ ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;;
no) ac_assert_checking= ; ac_checking= ;
ac_tree_checking= ; ac_rtl_checking= ;
ac_rtlflag_checking= ; ac_gc_checking= ;
ac_gc_always_collect= ; ac_fold_checking= ;;
all) ac_assert_checking=1 ; ac_checking=1 ;
ac_tree_checking=1 ; ac_rtl_checking=1 ;
- ac_rtlflag_checking=1 ; ac_gc_checking=1 ;
- ac_gc_always_collect=1 ; ac_fold_checking=1 ;;
- release) ac_assert_checking=1 ;;
+ ac_rtlflag_checking=1 ; ac_runtime_checking=1;
+ ac_gc_checking=1 ; ac_gc_always_collect=1 ;
+ ac_fold_checking=1 ;;
+ release) ac_assert_checking=1 ; ac_runtime_checking=1 ;;
assert) ac_assert_checking=1 ;;
fold) ac_fold_checking=1 ;;
gc) ac_gc_checking=1 ;;
@@ -6304,6 +6306,7 @@ do
misc) ac_checking=1 ;;
rtlflag) ac_rtlflag_checking=1 ;;
rtl) ac_rtl_checking=1 ;;
+ runtime) ac_runtime_checking=1 ;;
tree) ac_tree_checking=1 ;;
valgrind) ac_checking_valgrind=1 ;;
*) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5
@@ -6330,6 +6333,13 @@ cat >>confdefs.h <<\_ACEOF
_ACEOF
fi
+if test x$ac_runtime_checking != x ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_RUNTIME_CHECKING 1
+_ACEOF
+
+fi
if test x$ac_tree_checking != x ; then
cat >>confdefs.h <<\_ACEOF
diff --git a/gcc/configure.ac b/gcc/configure.ac
index d8be15830ff..1d6ced18686 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -394,7 +394,7 @@ AC_ARG_ENABLE(checking,
enable expensive run-time checks. With LIST,
enable only specific categories of checks.
Categories are: assert,fold,gc,gcac,misc,
- rtlflag,rtl,tree,valgrind,release,yes,all;],
+ rtlflag,rtl,runtime,tree,valgrind,release,yes,all;],
[ac_checking_flags="${enableval}"],[
# Determine the default checks.
if test x$is_release = x ; then
@@ -407,6 +407,7 @@ ac_checking=
ac_tree_checking=
ac_rtl_checking=
ac_rtlflag_checking=
+ac_runtime_checking=1
ac_gc_checking=
ac_gc_always_collect=
ac_fold_checking=
@@ -416,16 +417,17 @@ do
case $check in
yes) ac_assert_checking=1 ; ac_checking=1 ;
ac_tree_checking=1 ; ac_gc_checking=1 ;
- ac_rtlflag_checking=1 ;;
+ ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;;
no) ac_assert_checking= ; ac_checking= ;
ac_tree_checking= ; ac_rtl_checking= ;
ac_rtlflag_checking= ; ac_gc_checking= ;
ac_gc_always_collect= ; ac_fold_checking= ;;
all) ac_assert_checking=1 ; ac_checking=1 ;
ac_tree_checking=1 ; ac_rtl_checking=1 ;
- ac_rtlflag_checking=1 ; ac_gc_checking=1 ;
- ac_gc_always_collect=1 ; ac_fold_checking=1 ;;
- release) ac_assert_checking=1 ;;
+ ac_rtlflag_checking=1 ; ac_runtime_checking=1;
+ ac_gc_checking=1 ; ac_gc_always_collect=1 ;
+ ac_fold_checking=1 ;;
+ release) ac_assert_checking=1 ; ac_runtime_checking=1 ;;
assert) ac_assert_checking=1 ;;
fold) ac_fold_checking=1 ;;
gc) ac_gc_checking=1 ;;
@@ -433,6 +435,7 @@ do
misc) ac_checking=1 ;;
rtlflag) ac_rtlflag_checking=1 ;;
rtl) ac_rtl_checking=1 ;;
+ runtime) ac_runtime_checking=1 ;;
tree) ac_tree_checking=1 ;;
valgrind) ac_checking_valgrind=1 ;;
*) AC_MSG_ERROR(unknown check category $check) ;;
@@ -452,6 +455,10 @@ if test x$ac_assert_checking != x ; then
AC_DEFINE(ENABLE_ASSERT_CHECKING, 1,
[Define if you want assertions enabled. This is a cheap check.])
fi
+if test x$ac_runtime_checking != x ; then
+ AC_DEFINE(ENABLE_RUNTIME_CHECKING, 1,
+[Define if you want runtime assertions enabled. This is a cheap check.])
+fi
if test x$ac_tree_checking != x ; then
AC_DEFINE(ENABLE_TREE_CHECKING, 1,
[Define if you want all operations on trees (the basic data
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 1f79100a21d..859be9d0d39 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,68 @@
+2005-03-29 Richard Henderson <rth@redhat.com>
+
+ PR c/20519
+ * decl.c (cp_complete_array_type): Rename from complete_array_type.
+ Use the new complete_array_type in c-common.c. Update all callers.
+ * cp-tree.h (cp_complete_array_type): Update to match.
+
+2005-03-24 Geoffrey Keating <geoffk@apple.com>
+
+ * typeck.c (build_static_cast_1): Allow scalar_cast between
+ any integral, floating, or enumeration type.
+
+2005-03-24 Steven Bosscher <stevenb@suse.de>
+
+ * typeck.c (comptypes): First determine if the types are compatible
+ from a target-independent point of view. Check target attributes
+ last.
+
+ * class.c (build_base_path):
+ (build_vbase_offset_vtbl_entries):
+ (add_vcall_offset): Replace fold (buildN (...)) with fold_buildN.
+ * error.c (dump_expr): Likewise.
+ * init.c (build_zero_init, expand_cleanup_for_base,
+ build_vec_delete_1): Likewise.
+ * mangle.c (write_integer_cst): Likewise.
+ * method.c (thunk_adjust): Likewise.
+ * pt.c (convert_nontype_argument, tsubst, unify): Likewise.
+ * tree.c (cxx_print_statistics, array_type_nelts_total): Likewise.
+ * typeck.c (build_ptrmemfunc_access_expr,
+ (get_member_function_from_ptrfunc): Likewise.
+
+2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
+
+ * cp-objcp-common.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
+
+2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
+
+ * cp-tree.h (perform_integral_promotions): Remove.
+ (default_conversion): Add.
+
+2005-03-22 Mark Mitchell <mark@codesourcery.com>
+
+ * parser.c (cp_parser_warn_min_max): New function.
+ (cp_parser_binary_expression): Use it.
+ (cp_parser_assignment_operator_opt): Likewise.
+ (cp_parser_operator): Likewise.
+
+2005-03-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR c++/19980
+ * decl.c (start_preparsed_function): Robustify.
+
+2005-03-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR c++/20499
+ * parser.c (cp_parser_class_head): Return NULL_TREE when
+ encountering a redefinition.
+
+2005-03-22 Nathan Sidwell <nathan@codesourcery.com>
+
+ PR c++/20465
+ PR c++/20381
+ * typeck.c (build_ptrmemfunc): Allow OFFSET_REF when processing a
+ template.
+
2005-03-21 Paolo Carlini <pcarlini@suse.de>
PR c++/20461
@@ -256,7 +321,7 @@
Add qualifiers when declaring a typedef of a function type.
Member function pointers pick up the qualifiers of the typedef
used to declare them.
- Don't complain about creating cv-qualified function types.
+ Don't complain about creating cv-qualified function types.
Complain about qualified function typedefs that are used to
declare non-static member functions or free functions.
Use cp_apply_type_quals_to_decl.
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 89346d6cf4a..c684e81aedf 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -296,8 +296,8 @@ build_base_path (enum tree_code code,
if (null_test)
{
tree zero = cp_convert (TREE_TYPE (expr), integer_zero_node);
- null_test = fold (build2 (NE_EXPR, boolean_type_node,
- expr, zero));
+ null_test = fold_build2 (NE_EXPR, boolean_type_node,
+ expr, zero);
}
/* If this is a simple base reference, express it as a COMPONENT_REF. */
@@ -388,9 +388,9 @@ build_base_path (enum tree_code code,
out:
if (null_test)
- expr = fold (build3 (COND_EXPR, target_type, null_test, expr,
- fold (build1 (NOP_EXPR, target_type,
- integer_zero_node))));
+ expr = fold_build3 (COND_EXPR, target_type, null_test, expr,
+ fold_build1 (NOP_EXPR, target_type,
+ integer_zero_node));
return expr;
}
@@ -7406,9 +7406,9 @@ build_vbase_offset_vtbl_entries (tree binfo, vtbl_init_data* vid)
*vid->last_init
= build_tree_list (NULL_TREE,
- fold (build1 (NOP_EXPR,
- vtable_entry_type,
- delta)));
+ fold_build1 (NOP_EXPR,
+ vtable_entry_type,
+ delta));
vid->last_init = &TREE_CHAIN (*vid->last_init);
}
}
@@ -7633,8 +7633,8 @@ add_vcall_offset (tree orig_fn, tree binfo, vtbl_init_data *vid)
BINFO_OFFSET from vid->binfo. */
vcall_offset = size_diffop (BINFO_OFFSET (base),
BINFO_OFFSET (vid->binfo));
- vcall_offset = fold (build1 (NOP_EXPR, vtable_entry_type,
- vcall_offset));
+ vcall_offset = fold_build1 (NOP_EXPR, vtable_entry_type,
+ vcall_offset);
}
/* Add the initializer to the vtable. */
*vid->last_init = build_tree_list (NULL_TREE, vcall_offset);
diff --git a/gcc/cp/cp-objcp-common.h b/gcc/cp/cp-objcp-common.h
index 210a383e461..65a01c367f6 100644
--- a/gcc/cp/cp-objcp-common.h
+++ b/gcc/cp/cp-objcp-common.h
@@ -71,8 +71,6 @@ extern tree objcp_tsubst_copy_and_build (tree, tree, tsubst_flags_t,
#define LANG_HOOKS_PARSE_FILE c_common_parse_file
#undef LANG_HOOKS_DUP_LANG_SPECIFIC_DECL
#define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL cxx_dup_lang_specific_decl
-#undef LANG_HOOKS_TRUTHVALUE_CONVERSION
-#define LANG_HOOKS_TRUTHVALUE_CONVERSION c_common_truthvalue_conversion
#undef LANG_HOOKS_SET_DECL_ASSEMBLER_NAME
#define LANG_HOOKS_SET_DECL_ASSEMBLER_NAME mangle_decl
#undef LANG_HOOKS_MARK_ADDRESSABLE
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index e76e216a065..ac025d67674 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -3787,7 +3787,7 @@ extern tree start_decl (const cp_declarator *, cp_decl_specifier_seq *, int,
extern void start_decl_1 (tree);
extern void cp_finish_decl (tree, tree, tree, int);
extern void finish_decl (tree, tree, tree);
-extern int complete_array_type (tree, tree, int);
+extern int cp_complete_array_type (tree *, tree, bool);
extern tree build_ptrmemfunc_type (tree);
extern tree build_ptrmem_type (tree, tree);
/* the grokdeclarator prototype is in decl.h */
@@ -4283,7 +4283,7 @@ extern tree cxx_sizeof_or_alignof_type (tree, enum tree_code, bool);
#define cxx_sizeof_nowarn(T) cxx_sizeof_or_alignof_type (T, SIZEOF_EXPR, false)
extern tree inline_conversion (tree);
extern tree decay_conversion (tree);
-extern tree perform_integral_promotions (tree);
+extern tree default_conversion (tree);
extern tree build_class_member_access_expr (tree, tree, tree, bool);
extern tree finish_class_member_access_expr (tree, tree);
extern tree build_x_indirect_ref (tree, const char *);
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 4887080fa30..eef2cb1744a 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -3913,7 +3913,8 @@ maybe_deduce_size_from_array_init (tree decl, tree init)
But let's leave it here to ease the eventual merge. */
int do_default = !DECL_EXTERNAL (decl);
tree initializer = init ? init : DECL_INITIAL (decl);
- int failure = complete_array_type (type, initializer, do_default);
+ int failure = cp_complete_array_type (&TREE_TYPE (decl), initializer,
+ do_default);
if (failure == 1)
error ("initializer fails to determine size of %qD", decl);
@@ -5331,102 +5332,41 @@ expand_static_init (tree decl, tree init)
3 if the initializer list is empty (in pedantic mode). */
int
-complete_array_type (tree type, tree initial_value, int do_default)
+cp_complete_array_type (tree *ptype, tree initial_value, bool do_default)
{
- tree maxindex = NULL_TREE;
- int value = 0;
+ int failure;
+ tree type, elt_type;
if (initial_value)
{
/* An array of character type can be initialized from a
brace-enclosed string constant. */
- if (char_type_p (TYPE_MAIN_VARIANT (TREE_TYPE (type)))
+ if (char_type_p (TYPE_MAIN_VARIANT (TREE_TYPE (*ptype)))
&& TREE_CODE (initial_value) == CONSTRUCTOR
&& CONSTRUCTOR_ELTS (initial_value)
&& (TREE_CODE (TREE_VALUE (CONSTRUCTOR_ELTS (initial_value)))
== STRING_CST)
&& TREE_CHAIN (CONSTRUCTOR_ELTS (initial_value)) == NULL_TREE)
initial_value = TREE_VALUE (CONSTRUCTOR_ELTS (initial_value));
-
- /* Note MAXINDEX is really the maximum index, one less than the
- size. */
- if (TREE_CODE (initial_value) == STRING_CST)
- {
- int eltsize
- = int_size_in_bytes (TREE_TYPE (TREE_TYPE (initial_value)));
- maxindex = build_int_cst (NULL_TREE,
- (TREE_STRING_LENGTH (initial_value)
- / eltsize) - 1);
- }
- else if (TREE_CODE (initial_value) == CONSTRUCTOR)
- {
- tree elts = CONSTRUCTOR_ELTS (initial_value);
-
- maxindex = ssize_int (-1);
- for (; elts; elts = TREE_CHAIN (elts))
- {
- if (TREE_PURPOSE (elts))
- maxindex = TREE_PURPOSE (elts);
- else
- maxindex = size_binop (PLUS_EXPR, maxindex, ssize_int (1));
- }
-
- if (pedantic && tree_int_cst_equal (maxindex, ssize_int (-1)))
- value = 3;
- }
- else
- {
- /* Make an error message unless that happened already. */
- if (initial_value != error_mark_node)
- value = 1;
- else
- initial_value = NULL_TREE;
-
- /* Prevent further error messages. */
- maxindex = build_int_cst (NULL_TREE, 0);
- }
}
- if (!maxindex)
- {
- if (do_default)
- maxindex = build_int_cst (NULL_TREE, 0);
- value = 2;
- }
+ failure = complete_array_type (ptype, initial_value, do_default);
- if (maxindex)
+ /* We can create the array before the element type is complete, which
+ means that we didn't have these two bits set in the original type
+ either. In completing the type, we are expected to propagate these
+ bits. See also complete_type which does the same thing for arrays
+ of fixed size. */
+ type = *ptype;
+ if (TYPE_DOMAIN (type))
{
- tree itype;
- tree domain;
- tree elt_type;
-
- domain = build_index_type (maxindex);
- TYPE_DOMAIN (type) = domain;
-
- if (initial_value)
- itype = TREE_TYPE (initial_value);
- else
- itype = NULL;
- if (itype && !TYPE_DOMAIN (itype))
- TYPE_DOMAIN (itype) = domain;
- /* The type of the main variant should never be used for arrays
- of different sizes. It should only ever be completed with the
- size of the array. */
- if (! TYPE_DOMAIN (TYPE_MAIN_VARIANT (type)))
- TYPE_DOMAIN (TYPE_MAIN_VARIANT (type)) = domain;
-
elt_type = TREE_TYPE (type);
- TYPE_NEEDS_CONSTRUCTING (type)
- = TYPE_NEEDS_CONSTRUCTING (TYPE_MAIN_VARIANT (elt_type));
+ TYPE_NEEDS_CONSTRUCTING (type) = TYPE_NEEDS_CONSTRUCTING (elt_type);
TYPE_HAS_NONTRIVIAL_DESTRUCTOR (type)
- = TYPE_HAS_NONTRIVIAL_DESTRUCTOR (TYPE_MAIN_VARIANT (elt_type));
+ = TYPE_HAS_NONTRIVIAL_DESTRUCTOR (elt_type);
}
- /* Lay out the type now that we can get the real answer. */
-
- layout_type (type);
-
- return value;
+ return failure;
}
/* Return zero if something is declared to be a member of type
@@ -10009,7 +9949,12 @@ start_preparsed_function (tree decl1, tree attrs, int flags)
class scope, current_class_type will be NULL_TREE until set above
by push_nested_class.) */
if (processing_template_decl)
- decl1 = push_template_decl (decl1);
+ {
+ /* FIXME: Handle error_mark_node more gracefully. */
+ tree newdecl1 = push_template_decl (decl1);
+ if (newdecl1 != error_mark_node)
+ decl1 = newdecl1;
+ }
/* We are now in the scope of the function being defined. */
current_function_decl = decl1;
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index c53e0328cd0..1748fe0aa69 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -1413,9 +1413,9 @@ dump_expr (tree t, int flags)
if (TREE_CODE (type) == ARRAY_REF)
type = build_cplus_array_type
(TREE_OPERAND (type, 0),
- build_index_type (fold (build2 (MINUS_EXPR, integer_type_node,
- TREE_OPERAND (type, 1),
- integer_one_node))));
+ build_index_type (fold_build2 (MINUS_EXPR, integer_type_node,
+ TREE_OPERAND (type, 1),
+ integer_one_node)));
dump_type (type, flags);
if (init)
{
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index ddf39bfd690..69089fe8269 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -222,8 +222,8 @@ build_zero_init (tree type, tree nelts, bool static_storage_p)
/* Iterate over the array elements, building initializations. */
inits = NULL_TREE;
if (nelts)
- max_index = fold (build2 (MINUS_EXPR, TREE_TYPE (nelts),
- nelts, integer_one_node));
+ max_index = fold_build2 (MINUS_EXPR, TREE_TYPE (nelts),
+ nelts, integer_one_node);
else
max_index = array_type_nelts (type);
gcc_assert (TREE_CODE (max_index) == INTEGER_CST);
@@ -826,9 +826,9 @@ expand_cleanup_for_base (tree binfo, tree flag)
binfo,
LOOKUP_NORMAL | LOOKUP_NONVIRTUAL);
if (flag)
- expr = fold (build3 (COND_EXPR, void_type_node,
- c_common_truthvalue_conversion (flag),
- expr, integer_zero_node));
+ expr = fold_build3 (COND_EXPR, void_type_node,
+ c_common_truthvalue_conversion (flag),
+ expr, integer_zero_node);
finish_eh_cleanup (expr);
}
@@ -2241,9 +2241,9 @@ build_vec_delete_1 (tree base, tree maxindex, tree type,
tbase = create_temporary_var (ptype);
tbase_init = build_modify_expr (tbase, NOP_EXPR,
- fold (build2 (PLUS_EXPR, ptype,
- base,
- virtual_size)));
+ fold_build2 (PLUS_EXPR, ptype,
+ base,
+ virtual_size));
DECL_REGISTER (tbase) = 1;
controller = build3 (BIND_EXPR, void_type_node, tbase,
NULL_TREE, NULL_TREE);
@@ -2308,11 +2308,11 @@ build_vec_delete_1 (tree base, tree maxindex, tree type,
body = integer_zero_node;
/* Outermost wrapper: If pointer is null, punt. */
- body = fold (build3 (COND_EXPR, void_type_node,
- fold (build2 (NE_EXPR, boolean_type_node, base,
- convert (TREE_TYPE (base),
- integer_zero_node))),
- body, integer_zero_node));
+ body = fold_build3 (COND_EXPR, void_type_node,
+ fold_build2 (NE_EXPR, boolean_type_node, base,
+ convert (TREE_TYPE (base),
+ integer_zero_node)),
+ body, integer_zero_node);
body = build1 (NOP_EXPR, void_type_node, body);
if (controller)
diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c
index 1d49490a81d..0f358cd98e5 100644
--- a/gcc/cp/mangle.c
+++ b/gcc/cp/mangle.c
@@ -1249,16 +1249,16 @@ write_integer_cst (const tree cst)
if (sign < 0)
{
write_char ('n');
- n = fold (build1 (NEGATE_EXPR, type, n));
+ n = fold_build1 (NEGATE_EXPR, type, n);
}
do
{
- tree d = fold (build2 (FLOOR_DIV_EXPR, type, n, base));
- tree tmp = fold (build2 (MULT_EXPR, type, d, base));
+ tree d = fold_build2 (FLOOR_DIV_EXPR, type, n, base);
+ tree tmp = fold_build2 (MULT_EXPR, type, d, base);
unsigned c;
done = integer_zerop (d);
- tmp = fold (build2 (MINUS_EXPR, type, n, tmp));
+ tmp = fold_build2 (MINUS_EXPR, type, n, tmp);
c = hwint_to_ascii (TREE_INT_CST_LOW (tmp), 10, ptr,
done ? 1 : chunk_digits);
ptr -= c;
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index 7a99c262471..70d664283bb 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -220,8 +220,8 @@ thunk_adjust (tree ptr, bool this_adjusting,
{
if (this_adjusting)
/* Adjust the pointer by the constant. */
- ptr = fold (build2 (PLUS_EXPR, TREE_TYPE (ptr), ptr,
- ssize_int (fixed_offset)));
+ ptr = fold_build2 (PLUS_EXPR, TREE_TYPE (ptr), ptr,
+ ssize_int (fixed_offset));
/* If there's a virtual offset, look up that value in the vtable and
adjust the pointer again. */
@@ -242,13 +242,13 @@ thunk_adjust (tree ptr, bool this_adjusting,
/* Get the offset itself. */
vtable = build1 (INDIRECT_REF, TREE_TYPE (TREE_TYPE (vtable)), vtable);
/* Adjust the `this' pointer. */
- ptr = fold (build2 (PLUS_EXPR, TREE_TYPE (ptr), ptr, vtable));
+ ptr = fold_build2 (PLUS_EXPR, TREE_TYPE (ptr), ptr, vtable);
}
if (!this_adjusting)
/* Adjust the pointer by the constant. */
- ptr = fold (build2 (PLUS_EXPR, TREE_TYPE (ptr), ptr,
- ssize_int (fixed_offset)));
+ ptr = fold_build2 (PLUS_EXPR, TREE_TYPE (ptr), ptr,
+ ssize_int (fixed_offset));
return ptr;
}
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 6df7bad1d81..d682f3a38aa 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -1787,6 +1787,16 @@ cp_parser_is_keyword (cp_token* token, enum rid keyword)
return token->keyword == keyword;
}
+/* A minimum or maximum operator has been seen. As these are
+ deprecated, issue a warning. */
+
+static inline void
+cp_parser_warn_min_max (void)
+{
+ if (warn_deprecated && !in_system_header)
+ warning ("minimum/maximum operators are deprecated");
+}
+
/* If not parsing tentatively, issue a diagnostic of the form
FILE:LINE: MESSAGE before TOKEN
where TOKEN is the next token in the input stream. MESSAGE
@@ -5401,6 +5411,9 @@ cp_parser_binary_expression (cp_parser* parser, bool cast_p)
{
/* Get an operator token. */
token = cp_lexer_peek_token (parser->lexer);
+ if (token->type == CPP_MIN || token->type == CPP_MAX)
+ cp_parser_warn_min_max ();
+
new_prec = TOKEN_PRECEDENCE (token);
/* Popping an entry off the stack means we completed a subexpression:
@@ -5656,10 +5669,12 @@ cp_parser_assignment_operator_opt (cp_parser* parser)
case CPP_MIN_EQ:
op = MIN_EXPR;
+ cp_parser_warn_min_max ();
break;
case CPP_MAX_EQ:
op = MAX_EXPR;
+ cp_parser_warn_min_max ();
break;
default:
@@ -8039,18 +8054,22 @@ cp_parser_operator (cp_parser* parser)
/* Extensions. */
case CPP_MIN:
id = ansi_opname (MIN_EXPR);
+ cp_parser_warn_min_max ();
break;
case CPP_MAX:
id = ansi_opname (MAX_EXPR);
+ cp_parser_warn_min_max ();
break;
case CPP_MIN_EQ:
id = ansi_assopname (MIN_EXPR);
+ cp_parser_warn_min_max ();
break;
case CPP_MAX_EQ:
id = ansi_assopname (MAX_EXPR);
+ cp_parser_warn_min_max ();
break;
default:
@@ -12858,7 +12877,8 @@ cp_parser_class_head (cp_parser* parser,
{
error ("redefinition of %q#T", type);
cp_error_at ("previous definition of %q#T", type);
- type = error_mark_node;
+ type = NULL_TREE;
+ goto done;
}
/* We will have entered the scope containing the class; the names of
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 77ca2b9fc04..d5514f32aa3 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -3612,7 +3612,7 @@ convert_nontype_argument (tree type, tree expr)
if (!expr || expr == error_mark_node)
return expr;
- expr = build_nop(type, build_address (expr));
+ expr = build_nop (type, build_address (expr));
}
/* [temp.arg.nontype]/5, bullet 6
@@ -7342,7 +7342,7 @@ tsubst (tree t, tree args, tsubst_flags_t complain, tree in_decl)
if (e1 == error_mark_node || e2 == error_mark_node)
return error_mark_node;
- return fold (build2 (TREE_CODE (t), TREE_TYPE (t), e1, e2));
+ return fold_build2 (TREE_CODE (t), TREE_TYPE (t), e1, e2);
}
case NEGATE_EXPR:
@@ -7352,7 +7352,7 @@ tsubst (tree t, tree args, tsubst_flags_t complain, tree in_decl)
if (e == error_mark_node)
return error_mark_node;
- return fold (build1 (TREE_CODE (t), TREE_TYPE (t), e));
+ return fold_build1 (TREE_CODE (t), TREE_TYPE (t), e);
}
case TYPENAME_TYPE:
@@ -10158,10 +10158,10 @@ unify (tree tparms, tree targs, tree parm, tree arg, int strict)
not an integer constant. */
if (TREE_CODE (parm_max) == MINUS_EXPR)
{
- arg_max = fold (build2 (PLUS_EXPR,
- integer_type_node,
- arg_max,
- TREE_OPERAND (parm_max, 1)));
+ arg_max = fold_build2 (PLUS_EXPR,
+ integer_type_node,
+ arg_max,
+ TREE_OPERAND (parm_max, 1));
parm_max = TREE_OPERAND (parm_max, 0);
}
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index f0dc8c2f7d6..07f614bedd3 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -1996,7 +1996,8 @@ finish_compound_literal (tree type, tree initializer_list)
implies that the array has two elements. */
if (TREE_CODE (type) == ARRAY_TYPE && !COMPLETE_TYPE_P (type))
- complete_array_type (type, compound_literal, 1);
+ cp_complete_array_type (&TREE_TYPE (compound_literal),
+ compound_literal, 1);
}
return compound_literal;
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 321ba4bdbc7..8b0d9aa872f 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -1112,9 +1112,9 @@ cxx_print_statistics (void)
tree
array_type_nelts_top (tree type)
{
- return fold (build2 (PLUS_EXPR, sizetype,
- array_type_nelts (type),
- integer_one_node));
+ return fold_build2 (PLUS_EXPR, sizetype,
+ array_type_nelts (type),
+ integer_one_node);
}
/* Return, as an INTEGER_CST node, the number of elements for TYPE
@@ -1129,7 +1129,7 @@ array_type_nelts_total (tree type)
while (TREE_CODE (type) == ARRAY_TYPE)
{
tree n = array_type_nelts_top (type);
- sz = fold (build2 (MULT_EXPR, sizetype, sz, n));
+ sz = fold_build2 (MULT_EXPR, sizetype, sz, n);
type = TREE_TYPE (type);
}
return sz;
@@ -1459,6 +1459,7 @@ cp_tree_equal (tree t1, tree t2)
case FUNCTION_DECL:
case TEMPLATE_DECL:
case IDENTIFIER_NODE:
+ case SSA_NAME:
return false;
case BASELINK:
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index c2adb1c7fd4..a3bf1c0281f 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -905,8 +905,6 @@ comp_array_types (tree t1, tree t2, bool allow_redeclaration)
bool
comptypes (tree t1, tree t2, int strict)
{
- int retval;
-
if (t1 == t2)
return true;
@@ -969,9 +967,7 @@ comptypes (tree t1, tree t2, int strict)
&& TYPE_MAIN_VARIANT (t1) == TYPE_MAIN_VARIANT (t2))
return true;
- if (!(*targetm.comp_type_attributes) (t1, t2))
- return false;
-
+ /* Compare the types. Break out if they could be the same. */
switch (TREE_CODE (t1))
{
case TEMPLATE_TEMPLATE_PARM:
@@ -984,7 +980,7 @@ comptypes (tree t1, tree t2, int strict)
DECL_TEMPLATE_PARMS (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL (t2))))
return false;
if (TREE_CODE (t1) == TEMPLATE_TEMPLATE_PARM)
- return true;
+ break;
/* Don't check inheritance. */
strict = COMPARE_STRICT;
/* Fall through. */
@@ -995,18 +991,17 @@ comptypes (tree t1, tree t2, int strict)
&& (TYPE_TI_TEMPLATE (t1) == TYPE_TI_TEMPLATE (t2)
|| TREE_CODE (t1) == BOUND_TEMPLATE_TEMPLATE_PARM)
&& comp_template_args (TYPE_TI_ARGS (t1), TYPE_TI_ARGS (t2)))
- return true;
+ break;
if ((strict & COMPARE_BASE) && DERIVED_FROM_P (t1, t2))
- return true;
+ break;
else if ((strict & COMPARE_DERIVED) && DERIVED_FROM_P (t2, t1))
- return true;
+ break;
- /* We may be dealing with Objective-C instances... */
+ /* We may be dealing with Objective-C instances. */
if (TREE_CODE (t1) == RECORD_TYPE
- && ((retval = objc_comptypes (t1, t2, 0)) >= 0))
- return retval;
- /* ...but fall through if we are not. */
+ && objc_comptypes (t1, t2, 0) > 0)
+ break;
return false;
@@ -1014,51 +1009,72 @@ comptypes (tree t1, tree t2, int strict)
if (!comptypes (TYPE_OFFSET_BASETYPE (t1), TYPE_OFFSET_BASETYPE (t2),
strict & ~COMPARE_REDECLARATION))
return false;
- return same_type_p (TREE_TYPE (t1), TREE_TYPE (t2));
+ if (!same_type_p (TREE_TYPE (t1), TREE_TYPE (t2)))
+ return false;
+ break;
case POINTER_TYPE:
case REFERENCE_TYPE:
- return TYPE_MODE (t1) == TYPE_MODE (t2)
- && TYPE_REF_CAN_ALIAS_ALL (t1) == TYPE_REF_CAN_ALIAS_ALL (t2)
- && same_type_p (TREE_TYPE (t1), TREE_TYPE (t2));
+ if (TYPE_MODE (t1) != TYPE_MODE (t2)
+ || TYPE_REF_CAN_ALIAS_ALL (t1) != TYPE_REF_CAN_ALIAS_ALL (t2)
+ || !same_type_p (TREE_TYPE (t1), TREE_TYPE (t2)))
+ return false;
+ break;
case METHOD_TYPE:
case FUNCTION_TYPE:
if (!same_type_p (TREE_TYPE (t1), TREE_TYPE (t2)))
return false;
- return compparms (TYPE_ARG_TYPES (t1), TYPE_ARG_TYPES (t2));
+ if (!compparms (TYPE_ARG_TYPES (t1), TYPE_ARG_TYPES (t2)))
+ return false;
+ break;
case ARRAY_TYPE:
/* Target types must match incl. qualifiers. */
- return comp_array_types (t1, t2, !!(strict & COMPARE_REDECLARATION));
+ if (!comp_array_types (t1, t2, !!(strict & COMPARE_REDECLARATION)))
+ return false;
+ break;
case TEMPLATE_TYPE_PARM:
- return (TEMPLATE_TYPE_IDX (t1) == TEMPLATE_TYPE_IDX (t2)
- && TEMPLATE_TYPE_LEVEL (t1) == TEMPLATE_TYPE_LEVEL (t2));
+ if (TEMPLATE_TYPE_IDX (t1) != TEMPLATE_TYPE_IDX (t2)
+ || TEMPLATE_TYPE_LEVEL (t1) != TEMPLATE_TYPE_LEVEL (t2))
+ return false;
+ break;
case TYPENAME_TYPE:
if (!cp_tree_equal (TYPENAME_TYPE_FULLNAME (t1),
TYPENAME_TYPE_FULLNAME (t2)))
return false;
- return same_type_p (TYPE_CONTEXT (t1), TYPE_CONTEXT (t2));
+ if (!same_type_p (TYPE_CONTEXT (t1), TYPE_CONTEXT (t2)))
+ return false;
+ break;
case UNBOUND_CLASS_TEMPLATE:
if (!cp_tree_equal (TYPE_IDENTIFIER (t1), TYPE_IDENTIFIER (t2)))
return false;
- return same_type_p (TYPE_CONTEXT (t1), TYPE_CONTEXT (t2));
+ if (!same_type_p (TYPE_CONTEXT (t1), TYPE_CONTEXT (t2)))
+ return false;
+ break;
case COMPLEX_TYPE:
- return same_type_p (TREE_TYPE (t1), TREE_TYPE (t2));
+ if (!same_type_p (TREE_TYPE (t1), TREE_TYPE (t2)))
+ return false;
+ break;
case VECTOR_TYPE:
- return TYPE_VECTOR_SUBPARTS (t1) == TYPE_VECTOR_SUBPARTS (t2)
- && same_type_p (TREE_TYPE (t1), TREE_TYPE (t2));
+ if (TYPE_VECTOR_SUBPARTS (t1) != TYPE_VECTOR_SUBPARTS (t2)
+ || !same_type_p (TREE_TYPE (t1), TREE_TYPE (t2)))
+ return false;
break;
default:
- break;
+ return false;
}
- return false;
+
+ /* If we get here, we know that from a target independent POV the
+ types are the same. Make sure the target attributes are also
+ the same. */
+ return targetm.comp_type_attributes (t1, t2);
}
/* Returns 1 if TYPE1 is at least as qualified as TYPE2. */
@@ -1995,8 +2011,8 @@ build_ptrmemfunc_access_expr (tree ptrmem, tree member_name)
/*want_type=*/false);
member_type = cp_build_qualified_type (TREE_TYPE (member),
cp_type_quals (ptrmem_type));
- return fold (build3 (COMPONENT_REF, member_type,
- ptrmem, member, NULL_TREE));
+ return fold_build3 (COMPONENT_REF, member_type,
+ ptrmem, member, NULL_TREE);
}
/* Given an expression PTR for a pointer, return an expression
@@ -2343,7 +2359,7 @@ get_member_function_from_ptrfunc (tree *instance_ptrptr, tree function)
vtbl = build_indirect_ref (vtbl, NULL);
/* Finally, extract the function pointer from the vtable. */
- e2 = fold (build2 (PLUS_EXPR, TREE_TYPE (vtbl), vtbl, idx));
+ e2 = fold_build2 (PLUS_EXPR, TREE_TYPE (vtbl), vtbl, idx);
e2 = build_indirect_ref (e2, NULL);
TREE_CONSTANT (e2) = 1;
TREE_INVARIANT (e2) = 1;
@@ -4608,13 +4624,15 @@ build_static_cast_1 (tree type, tree expr, bool c_cast_p,
promotions, floating point promotion, integral conversions,
floating point conversions, floating-integral conversions,
pointer conversions, and pointer to member conversions. */
- if ((ARITHMETIC_TYPE_P (type) && ARITHMETIC_TYPE_P (intype))
- /* DR 128
-
- A value of integral _or enumeration_ type can be explicitly
- converted to an enumeration type. */
- || (INTEGRAL_OR_ENUMERATION_TYPE_P (type)
- && INTEGRAL_OR_ENUMERATION_TYPE_P (intype)))
+ /* DR 128
+
+ A value of integral _or enumeration_ type can be explicitly
+ converted to an enumeration type. */
+ /* The effect of all that is that any conversion between any two
+ types which are integral, floating, or enumeration types can be
+ performed. */
+ if ((INTEGRAL_TYPE_P (type) || SCALAR_FLOAT_TYPE_P (type))
+ && (INTEGRAL_TYPE_P (intype) || SCALAR_FLOAT_TYPE_P (intype)))
{
expr = ocp_convert (type, expr, CONV_C_CAST, LOOKUP_NORMAL);
@@ -5683,7 +5701,10 @@ build_ptrmemfunc (tree type, tree pfn, int force, bool c_cast_p)
return instantiate_type (type, pfn, tf_error | tf_warning);
fn = TREE_OPERAND (pfn, 0);
- gcc_assert (TREE_CODE (fn) == FUNCTION_DECL);
+ gcc_assert (TREE_CODE (fn) == FUNCTION_DECL
+ /* In a template, we will have preserved the
+ OFFSET_REF. */
+ || (processing_template_decl && TREE_CODE (fn) == OFFSET_REF));
return make_ptrmem_cst (to_type, fn);
}
diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c
index 8017af3dd25..daa23993425 100644
--- a/gcc/cp/typeck2.c
+++ b/gcc/cp/typeck2.c
@@ -1123,7 +1123,7 @@ process_init_constructor (tree type, tree init, tree* elts)
result = build_constructor (type, nreverse (members));
if (TREE_CODE (type) == ARRAY_TYPE && TYPE_DOMAIN (type) == NULL_TREE)
- complete_array_type (type, result, /*do_default=*/0);
+ cp_complete_array_type (&TREE_TYPE (result), result, /*do_default=*/0);
if (init)
TREE_HAS_CONSTRUCTOR (result) = TREE_HAS_CONSTRUCTOR (init);
if (allconstant)
diff --git a/gcc/cse.c b/gcc/cse.c
index fd5e21ac2ee..4d6f76d9328 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -1234,7 +1234,24 @@ insert_regs (rtx x, struct table_elt *classp, int modified)
if (REG_P (classp->exp)
&& GET_MODE (classp->exp) == GET_MODE (x))
{
- make_regs_eqv (regno, REGNO (classp->exp));
+ unsigned c_regno = REGNO (classp->exp);
+
+ gcc_assert (REGNO_QTY_VALID_P (c_regno));
+
+ /* Suppose that 5 is hard reg and 100 and 101 are
+ pseudos. Consider
+
+ (set (reg:si 100) (reg:si 5))
+ (set (reg:si 5) (reg:si 100))
+ (set (reg:di 101) (reg:di 5))
+
+ We would now set REG_QTY (101) = REG_QTY (5), but the
+ entry for 5 is in SImode. When we use this later in
+ copy propagation, we get the register in wrong mode. */
+ if (qty_table[REG_QTY (c_regno)].mode != GET_MODE (x))
+ continue;
+
+ make_regs_eqv (regno, c_regno);
return 1;
}
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index 6383d48d0e9..271cc198403 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -378,7 +378,8 @@ const struct gcc_debug_hooks dbx_debug_hooks =
debug_nothing_tree, /* outlining_inline_function */
debug_nothing_rtx, /* label */
dbxout_handle_pch, /* handle_pch */
- debug_nothing_rtx /* var_location */
+ debug_nothing_rtx, /* var_location */
+ 0 /* start_end_main_source_file */
};
#endif /* DBX_DEBUGGING_INFO */
@@ -408,7 +409,8 @@ const struct gcc_debug_hooks xcoff_debug_hooks =
debug_nothing_tree, /* outlining_inline_function */
debug_nothing_rtx, /* label */
dbxout_handle_pch, /* handle_pch */
- debug_nothing_rtx /* var_location */
+ debug_nothing_rtx, /* var_location */
+ 0 /* start_end_main_source_file */
};
#endif /* XCOFF_DEBUGGING_INFO */
diff --git a/gcc/ddg.c b/gcc/ddg.c
index 5a2cbeee109..ea65835a324 100644
--- a/gcc/ddg.c
+++ b/gcc/ddg.c
@@ -1,5 +1,5 @@
/* DDG - Data Dependence Graph implementation.
- Copyright (C) 2004
+ Copyright (C) 2004, 2005
Free Software Foundation, Inc.
Contributed by Ayal Zaks and Mustafa Hagog <zaks,mustafa@il.ibm.com>
diff --git a/gcc/debug.c b/gcc/debug.c
index 812920604ba..ab26bc1cae5 100644
--- a/gcc/debug.c
+++ b/gcc/debug.c
@@ -1,5 +1,5 @@
/* Do-nothing debug hooks for GCC.
- Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
@@ -47,7 +47,8 @@ const struct gcc_debug_hooks do_nothing_debug_hooks =
debug_nothing_tree, /* outlining_inline_function */
debug_nothing_rtx, /* label */
debug_nothing_int, /* handle_pch */
- debug_nothing_rtx /* var_location */
+ debug_nothing_rtx, /* var_location */
+ 0 /* start_end_main_source_file */
};
/* This file contains implementations of each debug hook that do
diff --git a/gcc/debug.h b/gcc/debug.h
index 547b7f68eab..ca0ad77adba 100644
--- a/gcc/debug.h
+++ b/gcc/debug.h
@@ -1,5 +1,5 @@
/* Debug hooks for GCC.
- Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
@@ -119,6 +119,10 @@ struct gcc_debug_hooks
/* Called from final_scan_insn for any NOTE_INSN_VAR_LOCATION note. */
void (* var_location) (rtx);
+
+ /* This is 1 if the debug writer wants to see start and end commands for the
+ main source files, and 0 otherwise. */
+ int start_end_main_source_file;
};
extern const struct gcc_debug_hooks *debug_hooks;
diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c
index 39b46fc7aef..5d10f0cb211 100644
--- a/gcc/diagnostic.c
+++ b/gcc/diagnostic.c
@@ -141,7 +141,7 @@ diagnostic_build_prefix (diagnostic_info *diagnostic)
(s.file == NULL
? build_message_string ("%s: %s", progname, text)
#ifdef USE_MAPPED_LOCATION
- : s.column != 0
+ : flag_show_column && s.column != 0
? build_message_string ("%s:%d:%d: %s", s.file, s.line, s.column, text)
#endif
: build_message_string ("%s:%d: %s", s.file, s.line, text));
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 1258a60949c..f09338fbbfe 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -9130,7 +9130,6 @@ test specifically for GNU C++ (@pxref{Common Predefined Macros,,
Predefined Macros,cpp,The GNU C Preprocessor}).
@menu
-* Min and Max:: C++ Minimum and maximum operators.
* Volatiles:: What constitutes an access to a volatile object.
* Restricted Pointers:: C99 restricted pointers and references.
* Vague Linkage:: Where G++ puts inlines, vtables and such.
@@ -9147,51 +9146,6 @@ Predefined Macros,cpp,The GNU C Preprocessor}).
* Backwards Compatibility:: Compatibilities with earlier definitions of C++.
@end menu
-@node Min and Max
-@section Minimum and Maximum Operators in C++
-
-It is very convenient to have operators which return the ``minimum'' or the
-``maximum'' of two arguments. In GNU C++ (but not in GNU C),
-
-@table @code
-@item @var{a} <? @var{b}
-@findex <?
-@cindex minimum operator
-is the @dfn{minimum}, returning the smaller of the numeric values
-@var{a} and @var{b};
-
-@item @var{a} >? @var{b}
-@findex >?
-@cindex maximum operator
-is the @dfn{maximum}, returning the larger of the numeric values @var{a}
-and @var{b}.
-@end table
-
-These operations are not primitive in ordinary C++, since you can
-use a macro to return the minimum of two things in C++, as in the
-following example.
-
-@smallexample
-#define MIN(X,Y) ((X) < (Y) ? : (X) : (Y))
-@end smallexample
-
-@noindent
-You might then use @w{@samp{int min = MIN (i, j);}} to set @var{min} to
-the minimum value of variables @var{i} and @var{j}.
-
-However, side effects in @code{X} or @code{Y} may cause unintended
-behavior. For example, @code{MIN (i++, j++)} will fail, incrementing
-the smaller counter twice. The GNU C @code{typeof} extension allows you
-to write safe macros that avoid this kind of problem (@pxref{Typeof}).
-However, writing @code{MIN} and @code{MAX} as macros also forces you to
-use function-call notation for a fundamental arithmetic operation.
-Using GNU C++ extensions, you can write @w{@samp{int min = i <? j;}}
-instead.
-
-Since @code{<?} and @code{>?} are built into the compiler, they properly
-handle expressions with side-effects; @w{@samp{int min = i++ <? j++;}}
-works correctly.
-
@node Volatiles
@section When is a Volatile Object Accessed?
@cindex accessing volatiles
@@ -9838,6 +9792,11 @@ by one returning a different pointer type. This extension to the
covariant return type rules is now deprecated and will be removed from a
future version.
+The G++ minimum and maximum operators (@samp{<?} and @samp{>?}) and
+their compound forms (@samp{<?=}) and @samp{>?=}) have been deprecated
+and will be removed in a future version. Code using these operators
+should be modified to use @code{std::min} and @code{std::max} instead.
+
The named return value extension has been deprecated, and is now
removed from G++.
diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
index 0a629a73f29..47a7462116e 100644
--- a/gcc/doc/install.texi
+++ b/gcc/doc/install.texi
@@ -973,12 +973,6 @@ systems that support conditional traps).
Division by zero checks use the break instruction.
@end table
-@item --enable-altivec
-Specify that the target supports AltiVec vector enhancements. This
-option will adjust the ABI for AltiVec enhancements, as well as generate
-AltiVec code when appropriate. This option is only available for
-PowerPC systems.
-
@item --enable-__cxa_atexit
Define if you want to use __cxa_atexit, rather than atexit, to
register C++ destructors for local statics and global objects.
@@ -1114,20 +1108,21 @@ with GCC@. This is on by default when building from CVS or snapshots,
but off for releases. More control over the checks may be had by
specifying @var{list}; the categories of checks available are
@samp{release}, @samp{assert}, @samp{misc}, @samp{tree}, @samp{gc},
-@samp{rtl}, @samp{rtlflag}, @samp{fold}, @samp{gcac} and
+@samp{rtl}, @samp{rtlflag}, @samp{runtime}, @samp{fold}, @samp{gcac} and
@samp{valgrind}. The @samp{release} category enables only those checks
-suitable for release builds, currently this is just @samp{assert}. The
-check @samp{valgrind} requires the external @command{valgrind}
-simulator, available from @uref{http://valgrind.kde.org/}. The checks
-@samp{rtl}, @samp{gcac} and @samp{valgrind} are very expensive. The
-default when @var{list} is not specified is
-@samp{assert,misc,tree,gc,rtlflag}. That is also the default for
-development builds, when @samp{--enable-checking} is not specified. For
-release builds the default, when @samp{--enable-checking} is not given,
-is @samp{release}. To disable all checking, @samp{--disable-checking}
-must be explicitly requested. Disabling assertions will make the
-compiler slightly faster but increase the risk of undetected internal
-errors causing wrong code to be generated.
+suitable for release builds, currently this is @samp{assert} and
+@samp{runtime}. The check @samp{valgrind} requires the external
+@command{valgrind} simulator, available from
+@uref{http://valgrind.kde.org/}. The checks @samp{rtl}, @samp{gcac} and
+@samp{valgrind} are very expensive. The default when @var{list} is not
+specified is @samp{assert,misc,tree,gc,rtlflag,runtime}. That is also
+the default for development builds, when @samp{--enable-checking} is not
+specified. For release builds the default, when
+@samp{--enable-checking} is not given, is @samp{release}. To disable
+all checking, @samp{--disable-checking} must be explicitly requested.
+Disabling assertions will make the compiler and runtime slightly faster
+but increase the risk of undetected internal errors causing wrong code
+to be generated.
@item --enable-coverage
@itemx --enable-coverage=@var{level}
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index c9df6cb6862..7dbc2addc5c 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -5553,7 +5553,7 @@ This number sets the maximum number of instructions (counted in GCC's
internal representation) in a single function that the tree inliner
will consider for inlining. This only affects functions declared
inline and methods implemented in a class declaration (C++).
-The default value is 500.
+The default value is 450.
@item max-inline-insns-auto
When you use @option{-finline-functions} (included in @option{-O3}),
@@ -5561,7 +5561,7 @@ a lot of functions that would otherwise not be considered for inlining
by the compiler will be investigated. To those functions, a different
(more restrictive) limit compared to functions declared inline can
be applied.
-The default value is 120.
+The default value is 90.
@item large-function-insns
The limit specifying really large functions. For functions larger than this
@@ -5570,7 +5570,7 @@ limit after inlining inlining is constrained by
to avoid extreme compilation time caused by non-linear algorithms used by the
backend.
This parameter is ignored when @option{-funit-at-a-time} is not used.
-The default value is 3000.
+The default value is 2700.
@item large-function-growth
Specifies maximal growth of large function caused by inlining in percents.
@@ -5593,7 +5593,7 @@ For functions declared inline @option{--param max-inline-insns-recursive} is
taken into acount. For function not declared inline, recursive inlining
happens only when @option{-finline-functions} (included in @option{-O3}) is
enabled and @option{--param max-inline-insns-recursive-auto} is used. The
-default value is 500.
+default value is 450.
@item max-inline-recursive-depth
@itemx max-inline-recursive-depth-auto
@@ -5603,7 +5603,16 @@ For functions declared inline @option{--param max-inline-recursive-depth} is
taken into acount. For function not declared inline, recursive inlining
happens only when @option{-finline-functions} (included in @option{-O3}) is
enabled and @option{--param max-inline-recursive-depth-auto} is used. The
-default value is 500.
+default value is 450.
+
+@item inline-call-cost
+Specify cost of call instruction relative to simple arithmetics operations
+(having cost of 1). Increasing this cost disqualifies inlining of non-leaf
+functions and at the same time increases size of leaf function that is believed to
+reduce function size by being inlined. In effect it increases amount of
+inlining for code having large abstraction penalty (many functions that just
+pass the arguments to other functions) and decrease inlining for code with low
+abstraction penalty. The default value is 16.
@item max-unrolled-insns
The maximum number of instructions that a loop should have if that loop
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 799a0f854d3..af269f2a97c 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -9314,11 +9314,15 @@ from shared libraries (DLLs).
You need not define this macro if it would always evaluate to zero.
@end defmac
-@deftypefn {Target Hook} tree TARGET_MD_ASM_CLOBBERS (tree @var{clobbers})
+@deftypefn {Target Hook} tree TARGET_MD_ASM_CLOBBERS (tree @var{outputs}, tree @var{inputs}, tree @var{clobbers})
This target hook should add to @var{clobbers} @code{STRING_CST} trees for
-any hard regs the port wishes to automatically clobber for all asms.
+any hard regs the port wishes to automatically clobber for an asm.
It should return the result of the last @code{tree_cons} used to add a
-clobber.
+clobber. The @var{outputs}, @var{inputs} and @var{clobber} lists are the
+corresponding parameters to the asm and may be inspected to avoid
+clobbering a register that is an input or output of the asm. You can use
+@code{decl_overlaps_hard_reg_set_p}, declared in @file{tree.h}, to test
+for overlap with regards to asm-declared registers.
@end deftypefn
@defmac MATH_LIBRARY
diff --git a/gcc/dominance.c b/gcc/dominance.c
index 53606d42d2e..b07f6c23da4 100644
--- a/gcc/dominance.c
+++ b/gcc/dominance.c
@@ -659,11 +659,11 @@ free_dominance_info (enum cdi_direction dir)
FOR_ALL_BB (bb)
{
- delete_from_dominance_info (dir, bb);
+ et_free_tree_force (bb->dom[dir]);
+ bb->dom[dir] = NULL;
}
- /* If there are any nodes left, something is wrong. */
- gcc_assert (!n_bbs_in_dom_tree[dir]);
+ n_bbs_in_dom_tree[dir] = 0;
dom_computed[dir] = DOM_NONE;
}
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index c4030f248b3..24e573b2ea4 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -3444,7 +3444,8 @@ const struct gcc_debug_hooks dwarf2_debug_hooks =
dwarf2out_abstract_function, /* outlining_inline_function */
debug_nothing_rtx, /* label */
debug_nothing_int, /* handle_pch */
- dwarf2out_var_location
+ dwarf2out_var_location,
+ 1 /* start_end_main_source_file */
};
#endif
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 137f0b7d383..8d5cf3ca2b3 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -1360,38 +1360,6 @@ operand_subword_force (rtx op, unsigned int offset, enum machine_mode mode)
return result;
}
-/* Given a compare instruction, swap the operands.
- A test instruction is changed into a compare of 0 against the operand. */
-
-void
-reverse_comparison (rtx insn)
-{
- rtx body = PATTERN (insn);
- rtx comp;
-
- if (GET_CODE (body) == SET)
- comp = SET_SRC (body);
- else
- comp = SET_SRC (XVECEXP (body, 0, 0));
-
- if (GET_CODE (comp) == COMPARE)
- {
- rtx op0 = XEXP (comp, 0);
- rtx op1 = XEXP (comp, 1);
- XEXP (comp, 0) = op1;
- XEXP (comp, 1) = op0;
- }
- else
- {
- rtx new = gen_rtx_COMPARE (VOIDmode,
- CONST0_RTX (GET_MODE (comp)), comp);
- if (GET_CODE (body) == SET)
- SET_SRC (body) = new;
- else
- SET_SRC (XVECEXP (body, 0, 0)) = new;
- }
-}
-
/* Within a MEM_EXPR, we care about either (1) a component ref of a decl,
or (2) a component ref of something variable. Represent the later with
a NULL expression. */
diff --git a/gcc/et-forest.c b/gcc/et-forest.c
index 7fbbb77312c..928a0c0e5df 100644
--- a/gcc/et-forest.c
+++ b/gcc/et-forest.c
@@ -1,6 +1,6 @@
/* ET-trees data structure implementation.
Contributed by Pavel Nejedly
- Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
@@ -499,6 +499,15 @@ et_free_tree (struct et_node *t)
pool_free (et_nodes, t);
}
+/* Releases et tree T without maintaining other nodes. */
+
+void
+et_free_tree_force (struct et_node *t)
+{
+ pool_free (et_occurrences, t->rightmost_occ);
+ pool_free (et_nodes, t);
+}
+
/* Sets father of et tree T to FATHER. */
void
diff --git a/gcc/et-forest.h b/gcc/et-forest.h
index 2f2c260e8d8..17ce6090a55 100644
--- a/gcc/et-forest.h
+++ b/gcc/et-forest.h
@@ -1,5 +1,5 @@
/* Et-forest data structure implementation.
- Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -73,6 +73,7 @@ struct et_node
struct et_node *et_new_tree (void *data);
void et_free_tree (struct et_node *);
+void et_free_tree_force (struct et_node *);
void et_set_father (struct et_node *, struct et_node *);
void et_split (struct et_node *);
struct et_node *et_nca (struct et_node *, struct et_node *);
diff --git a/gcc/final.c b/gcc/final.c
index bf5771aebfb..906e50c00fe 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -1,6 +1,7 @@
/* Convert RTL to assembler code and output it, for GNU compiler.
Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997,
- 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+ Free Software Foundation, Inc.
This file is part of GCC.
@@ -835,7 +836,7 @@ shorten_branches (rtx first ATTRIBUTE_UNUSED)
max_log = log;
max_skip = LABEL_ALIGN_MAX_SKIP;
}
- next = NEXT_INSN (insn);
+ next = next_nonnote_insn (insn);
/* ADDR_VECs only take room if read-only data goes into the text
section. */
if (JUMP_TABLES_IN_TEXT_SECTION || !HAVE_READONLY_DATA_SECTION)
@@ -1677,6 +1678,7 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED,
#ifdef HAVE_cc0
rtx set;
#endif
+ rtx next;
insn_counter++;
@@ -1932,10 +1934,11 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED,
fputs (ASM_APP_OFF, file);
app_on = 0;
}
- if (NEXT_INSN (insn) != 0
- && JUMP_P (NEXT_INSN (insn)))
+
+ next = next_nonnote_insn (insn);
+ if (next != 0 && JUMP_P (next))
{
- rtx nextbody = PATTERN (NEXT_INSN (insn));
+ rtx nextbody = PATTERN (next);
/* If this label is followed by a jump-table,
make sure we put the label in the read-only section. Also
@@ -1956,7 +1959,7 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED,
targetm.asm_out.function_rodata_section (current_function_decl);
#ifdef ADDR_VEC_ALIGN
- log_align = ADDR_VEC_ALIGN (NEXT_INSN (insn));
+ log_align = ADDR_VEC_ALIGN (next);
#else
log_align = exact_log2 (BIGGEST_ALIGNMENT / BITS_PER_UNIT);
#endif
@@ -1967,7 +1970,7 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED,
#ifdef ASM_OUTPUT_CASE_LABEL
ASM_OUTPUT_CASE_LABEL (file, "L", CODE_LABEL_NUMBER (insn),
- NEXT_INSN (insn));
+ next);
#else
targetm.asm_out.internal_label (file, "L", CODE_LABEL_NUMBER (insn));
#endif
@@ -2022,6 +2025,11 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED,
if (prescan > 0)
break;
+ if (! JUMP_TABLES_IN_TEXT_SECTION)
+ targetm.asm_out.function_rodata_section (current_function_decl);
+ else
+ function_section (current_function_decl);
+
if (app_on)
{
fputs (ASM_APP_OFF, file);
@@ -2157,7 +2165,6 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED,
{
/* A delayed-branch sequence */
int i;
- rtx next;
if (prescan > 0)
break;
@@ -2261,20 +2268,6 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED,
}
#endif
-#ifndef STACK_REGS
- /* Don't bother outputting obvious no-ops, even without -O.
- This optimization is fast and doesn't interfere with debugging.
- Don't do this if the insn is in a delay slot, since this
- will cause an improper number of delay insns to be written. */
- if (final_sequence == 0
- && prescan >= 0
- && NONJUMP_INSN_P (insn) && GET_CODE (body) == SET
- && REG_P (SET_SRC (body))
- && REG_P (SET_DEST (body))
- && REGNO (SET_SRC (body)) == REGNO (SET_DEST (body)))
- break;
-#endif
-
#ifdef HAVE_cc0
/* If this is a conditional branch, maybe modify it
if the cc's are in a nonstandard state
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index ef62a83ee9a..d02631c4d3f 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -1044,8 +1044,8 @@ negate_expr (tree t)
TREE_OPERAND (t, 1)))
{
tem = negate_expr (TREE_OPERAND (t, 1));
- tem = fold (build2 (MINUS_EXPR, TREE_TYPE (t),
- tem, TREE_OPERAND (t, 0)));
+ tem = fold_build2 (MINUS_EXPR, TREE_TYPE (t),
+ tem, TREE_OPERAND (t, 0));
return fold_convert (type, tem);
}
@@ -1053,8 +1053,8 @@ negate_expr (tree t)
if (negate_expr_p (TREE_OPERAND (t, 0)))
{
tem = negate_expr (TREE_OPERAND (t, 0));
- tem = fold (build2 (MINUS_EXPR, TREE_TYPE (t),
- tem, TREE_OPERAND (t, 1)));
+ tem = fold_build2 (MINUS_EXPR, TREE_TYPE (t),
+ tem, TREE_OPERAND (t, 1));
return fold_convert (type, tem);
}
}
@@ -1065,9 +1065,9 @@ negate_expr (tree t)
if ((! FLOAT_TYPE_P (type) || flag_unsafe_math_optimizations)
&& reorder_operands_p (TREE_OPERAND (t, 0), TREE_OPERAND (t, 1)))
return fold_convert (type,
- fold (build2 (MINUS_EXPR, TREE_TYPE (t),
- TREE_OPERAND (t, 1),
- TREE_OPERAND (t, 0))));
+ fold_build2 (MINUS_EXPR, TREE_TYPE (t),
+ TREE_OPERAND (t, 1),
+ TREE_OPERAND (t, 0)));
break;
case MULT_EXPR:
@@ -1082,15 +1082,15 @@ negate_expr (tree t)
tem = TREE_OPERAND (t, 1);
if (negate_expr_p (tem))
return fold_convert (type,
- fold (build2 (TREE_CODE (t), TREE_TYPE (t),
- TREE_OPERAND (t, 0),
- negate_expr (tem))));
+ fold_build2 (TREE_CODE (t), TREE_TYPE (t),
+ TREE_OPERAND (t, 0),
+ negate_expr (tem)));
tem = TREE_OPERAND (t, 0);
if (negate_expr_p (tem))
return fold_convert (type,
- fold (build2 (TREE_CODE (t), TREE_TYPE (t),
- negate_expr (tem),
- TREE_OPERAND (t, 1))));
+ fold_build2 (TREE_CODE (t), TREE_TYPE (t),
+ negate_expr (tem),
+ TREE_OPERAND (t, 1)));
}
break;
@@ -1131,7 +1131,7 @@ negate_expr (tree t)
? lang_hooks.types.signed_type (type)
: lang_hooks.types.unsigned_type (type);
tree temp = fold_convert (ntype, TREE_OPERAND (t, 0));
- temp = fold (build2 (RSHIFT_EXPR, ntype, temp, op1));
+ temp = fold_build2 (RSHIFT_EXPR, ntype, temp, op1);
return fold_convert (type, temp);
}
}
@@ -1141,7 +1141,7 @@ negate_expr (tree t)
break;
}
- tem = fold (build1 (NEGATE_EXPR, TREE_TYPE (t), t));
+ tem = fold_build1 (NEGATE_EXPR, TREE_TYPE (t), t);
return fold_convert (type, tem);
}
@@ -1279,8 +1279,8 @@ associate_trees (tree t1, tree t2, enum tree_code code, tree type)
fold_convert (type, t2));
}
- return fold (build2 (code, type, fold_convert (type, t1),
- fold_convert (type, t2)));
+ return fold_build2 (code, type, fold_convert (type, t1),
+ fold_convert (type, t2));
}
/* Combine two integer constants ARG1 and ARG2 under operation CODE
@@ -1654,7 +1654,7 @@ size_binop (enum tree_code code, tree arg0, tree arg1)
if (arg0 == error_mark_node || arg1 == error_mark_node)
return error_mark_node;
- return fold (build2 (code, type, arg0, arg1));
+ return fold_build2 (code, type, arg0, arg1);
}
/* Given two values, either both of sizetype or both of bitsizetype,
@@ -1896,7 +1896,7 @@ fold_convert (tree type, tree arg)
if (TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (orig)
|| lang_hooks.types_compatible_p (TYPE_MAIN_VARIANT (type),
TYPE_MAIN_VARIANT (orig)))
- return fold (build1 (NOP_EXPR, type, arg));
+ return fold_build1 (NOP_EXPR, type, arg);
switch (TREE_CODE (type))
{
@@ -1911,15 +1911,15 @@ fold_convert (tree type, tree arg)
}
if (INTEGRAL_TYPE_P (orig) || POINTER_TYPE_P (orig)
|| TREE_CODE (orig) == OFFSET_TYPE)
- return fold (build1 (NOP_EXPR, type, arg));
+ return fold_build1 (NOP_EXPR, type, arg);
if (TREE_CODE (orig) == COMPLEX_TYPE)
{
- tem = fold (build1 (REALPART_EXPR, TREE_TYPE (orig), arg));
+ tem = fold_build1 (REALPART_EXPR, TREE_TYPE (orig), arg);
return fold_convert (type, tem);
}
gcc_assert (TREE_CODE (orig) == VECTOR_TYPE
&& tree_int_cst_equal (TYPE_SIZE (type), TYPE_SIZE (orig)));
- return fold (build1 (NOP_EXPR, type, arg));
+ return fold_build1 (NOP_EXPR, type, arg);
case REAL_TYPE:
if (TREE_CODE (arg) == INTEGER_CST)
@@ -1940,14 +1940,14 @@ fold_convert (tree type, tree arg)
case INTEGER_TYPE: case CHAR_TYPE:
case BOOLEAN_TYPE: case ENUMERAL_TYPE:
case POINTER_TYPE: case REFERENCE_TYPE:
- return fold (build1 (FLOAT_EXPR, type, arg));
+ return fold_build1 (FLOAT_EXPR, type, arg);
case REAL_TYPE:
- return fold (build1 (flag_float_store ? CONVERT_EXPR : NOP_EXPR,
- type, arg));
+ return fold_build1 (flag_float_store ? CONVERT_EXPR : NOP_EXPR,
+ type, arg);
case COMPLEX_TYPE:
- tem = fold (build1 (REALPART_EXPR, TREE_TYPE (orig), arg));
+ tem = fold_build1 (REALPART_EXPR, TREE_TYPE (orig), arg);
return fold_convert (type, tem);
default:
@@ -1972,15 +1972,15 @@ fold_convert (tree type, tree arg)
{
rpart = fold_convert (TREE_TYPE (type), TREE_OPERAND (arg, 0));
ipart = fold_convert (TREE_TYPE (type), TREE_OPERAND (arg, 1));
- return fold (build2 (COMPLEX_EXPR, type, rpart, ipart));
+ return fold_build2 (COMPLEX_EXPR, type, rpart, ipart);
}
arg = save_expr (arg);
- rpart = fold (build1 (REALPART_EXPR, TREE_TYPE (orig), arg));
- ipart = fold (build1 (IMAGPART_EXPR, TREE_TYPE (orig), arg));
+ rpart = fold_build1 (REALPART_EXPR, TREE_TYPE (orig), arg);
+ ipart = fold_build1 (IMAGPART_EXPR, TREE_TYPE (orig), arg);
rpart = fold_convert (TREE_TYPE (type), rpart);
ipart = fold_convert (TREE_TYPE (type), ipart);
- return fold (build2 (COMPLEX_EXPR, type, rpart, ipart));
+ return fold_build2 (COMPLEX_EXPR, type, rpart, ipart);
}
default:
@@ -1993,10 +1993,10 @@ fold_convert (tree type, tree arg)
gcc_assert (tree_int_cst_equal (TYPE_SIZE (type), TYPE_SIZE (orig)));
gcc_assert (INTEGRAL_TYPE_P (orig) || POINTER_TYPE_P (orig)
|| TREE_CODE (orig) == VECTOR_TYPE);
- return fold (build1 (NOP_EXPR, type, arg));
+ return fold_build1 (NOP_EXPR, type, arg);
case VOID_TYPE:
- return fold (build1 (CONVERT_EXPR, type, fold_ignored_result (arg)));
+ return fold_build1 (CONVERT_EXPR, type, fold_ignored_result (arg));
default:
gcc_unreachable ();
@@ -2309,8 +2309,8 @@ combine_comparisons (enum tree_code code, enum tree_code lcode,
else if (compcode == COMPCODE_FALSE)
return constant_boolean_node (false, truth_type);
else
- return fold (build2 (compcode_to_comparison (compcode),
- truth_type, ll_arg, lr_arg));
+ return fold_build2 (compcode_to_comparison (compcode),
+ truth_type, ll_arg, lr_arg);
}
/* Return nonzero if CODE is a tree code that represents a truth value. */
@@ -2779,16 +2779,16 @@ eval_subst (tree arg, tree old0, tree new0, tree old1, tree new1)
switch (class)
{
case tcc_unary:
- return fold (build1 (code, type,
- eval_subst (TREE_OPERAND (arg, 0),
- old0, new0, old1, new1)));
+ return fold_build1 (code, type,
+ eval_subst (TREE_OPERAND (arg, 0),
+ old0, new0, old1, new1));
case tcc_binary:
- return fold (build2 (code, type,
- eval_subst (TREE_OPERAND (arg, 0),
- old0, new0, old1, new1),
- eval_subst (TREE_OPERAND (arg, 1),
- old0, new0, old1, new1)));
+ return fold_build2 (code, type,
+ eval_subst (TREE_OPERAND (arg, 0),
+ old0, new0, old1, new1),
+ eval_subst (TREE_OPERAND (arg, 1),
+ old0, new0, old1, new1));
case tcc_expression:
switch (code)
@@ -2800,13 +2800,13 @@ eval_subst (tree arg, tree old0, tree new0, tree old1, tree new1)
return eval_subst (TREE_OPERAND (arg, 1), old0, new0, old1, new1);
case COND_EXPR:
- return fold (build3 (code, type,
- eval_subst (TREE_OPERAND (arg, 0),
- old0, new0, old1, new1),
- eval_subst (TREE_OPERAND (arg, 1),
- old0, new0, old1, new1),
- eval_subst (TREE_OPERAND (arg, 2),
- old0, new0, old1, new1)));
+ return fold_build3 (code, type,
+ eval_subst (TREE_OPERAND (arg, 0),
+ old0, new0, old1, new1),
+ eval_subst (TREE_OPERAND (arg, 1),
+ old0, new0, old1, new1),
+ eval_subst (TREE_OPERAND (arg, 2),
+ old0, new0, old1, new1));
default:
break;
}
@@ -2831,7 +2831,7 @@ eval_subst (tree arg, tree old0, tree new0, tree old1, tree new1)
else if (arg1 == old1 || operand_equal_p (arg1, old1, 0))
arg1 = new1;
- return fold (build2 (code, type, arg0, arg1));
+ return fold_build2 (code, type, arg0, arg1);
}
default:
@@ -3063,8 +3063,8 @@ distribute_bit_expr (enum tree_code code, tree type, tree arg0, tree arg1)
else
return 0;
- return fold (build2 (TREE_CODE (arg0), type, common,
- fold (build2 (code, type, left, right))));
+ return fold_build2 (TREE_CODE (arg0), type, common,
+ fold_build2 (code, type, left, right));
}
/* Return a BIT_FIELD_REF of type TYPE to refer to BITSIZE bits of INNER
@@ -3345,8 +3345,8 @@ decode_field_reference (tree exp, HOST_WIDE_INT *pbitsize,
/* Merge it with the mask we found in the BIT_AND_EXPR, if any. */
if (and_mask != 0)
- mask = fold (build2 (BIT_AND_EXPR, unsigned_type,
- fold_convert (unsigned_type, and_mask), mask));
+ mask = fold_build2 (BIT_AND_EXPR, unsigned_type,
+ fold_convert (unsigned_type, and_mask), mask);
*pmask = mask;
*pand_mask = and_mask;
@@ -3508,8 +3508,8 @@ range_binop (enum tree_code code, tree type, tree arg0, int upper0_p,
if (arg0 != 0 && arg1 != 0)
{
- tem = fold (build2 (code, type != 0 ? type : TREE_TYPE (arg0),
- arg0, fold_convert (TREE_TYPE (arg0), arg1)));
+ tem = fold_build2 (code, type != 0 ? type : TREE_TYPE (arg0),
+ arg0, fold_convert (TREE_TYPE (arg0), arg1));
STRIP_NOPS (tem);
return TREE_CODE (tem) == INTEGER_CST ? tem : 0;
}
@@ -3768,11 +3768,11 @@ make_range (tree exp, int *pin_p, tree *plow, tree *phigh)
: TYPE_MAX_VALUE (arg0_type);
if (TYPE_PRECISION (exp_type) == TYPE_PRECISION (arg0_type))
- high_positive = fold (build2 (RSHIFT_EXPR, arg0_type,
- fold_convert (arg0_type,
- high_positive),
- fold_convert (arg0_type,
- integer_one_node)));
+ high_positive = fold_build2 (RSHIFT_EXPR, arg0_type,
+ fold_convert (arg0_type,
+ high_positive),
+ fold_convert (arg0_type,
+ integer_one_node));
/* If the low bound is specified, "and" the range with the
range for which the original unsigned value will be
@@ -3852,13 +3852,13 @@ build_range_check (tree type, tree exp, int in_p, tree low, tree high)
return fold_convert (type, integer_one_node);
if (low == 0)
- return fold (build2 (LE_EXPR, type, exp, high));
+ return fold_build2 (LE_EXPR, type, exp, high);
if (high == 0)
- return fold (build2 (GE_EXPR, type, exp, low));
+ return fold_build2 (GE_EXPR, type, exp, low);
if (operand_equal_p (low, high, 0))
- return fold (build2 (EQ_EXPR, type, exp, low));
+ return fold_build2 (EQ_EXPR, type, exp, low);
if (integer_zerop (low))
{
@@ -3897,8 +3897,8 @@ build_range_check (tree type, tree exp, int in_p, tree low, tree high)
etype = lang_hooks.types.signed_type (etype);
exp = fold_convert (etype, exp);
}
- return fold (build2 (GT_EXPR, type, exp,
- fold_convert (etype, integer_zero_node)));
+ return fold_build2 (GT_EXPR, type, exp,
+ fold_convert (etype, integer_zero_node));
}
}
@@ -3936,7 +3936,7 @@ build_range_check (tree type, tree exp, int in_p, tree low, tree high)
if (value != 0 && ! TREE_OVERFLOW (value))
return build_range_check (type,
- fold (build2 (MINUS_EXPR, etype, exp, low)),
+ fold_build2 (MINUS_EXPR, etype, exp, low),
1, fold_convert (etype, integer_zero_node),
value);
@@ -4187,8 +4187,16 @@ fold_cond_expr_with_comparison (tree type, tree arg0, tree arg1, tree arg2)
if ((FLOAT_TYPE_P (TREE_TYPE (arg01))
? real_zerop (arg01)
: integer_zerop (arg01))
- && TREE_CODE (arg2) == NEGATE_EXPR
- && operand_equal_p (TREE_OPERAND (arg2, 0), arg1, 0))
+ && ((TREE_CODE (arg2) == NEGATE_EXPR
+ && operand_equal_p (TREE_OPERAND (arg2, 0), arg1, 0))
+ /* In the case that A is of the form X-Y, '-A' (arg2) may
+ have already been folded to Y-X, check for that. */
+ || (TREE_CODE (arg1) == MINUS_EXPR
+ && TREE_CODE (arg2) == MINUS_EXPR
+ && operand_equal_p (TREE_OPERAND (arg1, 0),
+ TREE_OPERAND (arg2, 1), 0)
+ && operand_equal_p (TREE_OPERAND (arg1, 1),
+ TREE_OPERAND (arg2, 0), 0))))
switch (comp_code)
{
case EQ_EXPR:
@@ -4208,7 +4216,7 @@ fold_cond_expr_with_comparison (tree type, tree arg0, tree arg1, tree arg2)
if (TYPE_UNSIGNED (TREE_TYPE (arg1)))
arg1 = fold_convert (lang_hooks.types.signed_type
(TREE_TYPE (arg1)), arg1);
- tem = fold (build1 (ABS_EXPR, TREE_TYPE (arg1), arg1));
+ tem = fold_build1 (ABS_EXPR, TREE_TYPE (arg1), arg1);
return pedantic_non_lvalue (fold_convert (type, tem));
case UNLE_EXPR:
case UNLT_EXPR:
@@ -4219,7 +4227,7 @@ fold_cond_expr_with_comparison (tree type, tree arg0, tree arg1, tree arg2)
if (TYPE_UNSIGNED (TREE_TYPE (arg1)))
arg1 = fold_convert (lang_hooks.types.signed_type
(TREE_TYPE (arg1)), arg1);
- tem = fold (build1 (ABS_EXPR, TREE_TYPE (arg1), arg1));
+ tem = fold_build1 (ABS_EXPR, TREE_TYPE (arg1), arg1);
return negate_expr (fold_convert (type, tem));
default:
gcc_assert (TREE_CODE_CLASS (comp_code) == tcc_comparison);
@@ -4298,8 +4306,8 @@ fold_cond_expr_with_comparison (tree type, tree arg0, tree arg1, tree arg2)
comp_op0 = fold_convert (comp_type, comp_op0);
comp_op1 = fold_convert (comp_type, comp_op1);
tem = (comp_code == LE_EXPR || comp_code == UNLE_EXPR)
- ? fold (build2 (MIN_EXPR, comp_type, comp_op0, comp_op1))
- : fold (build2 (MIN_EXPR, comp_type, comp_op1, comp_op0));
+ ? fold_build2 (MIN_EXPR, comp_type, comp_op0, comp_op1)
+ : fold_build2 (MIN_EXPR, comp_type, comp_op1, comp_op0);
return pedantic_non_lvalue (fold_convert (type, tem));
}
break;
@@ -4312,8 +4320,8 @@ fold_cond_expr_with_comparison (tree type, tree arg0, tree arg1, tree arg2)
comp_op0 = fold_convert (comp_type, comp_op0);
comp_op1 = fold_convert (comp_type, comp_op1);
tem = (comp_code == GE_EXPR || comp_code == UNGE_EXPR)
- ? fold (build2 (MAX_EXPR, comp_type, comp_op0, comp_op1))
- : fold (build2 (MAX_EXPR, comp_type, comp_op1, comp_op0));
+ ? fold_build2 (MAX_EXPR, comp_type, comp_op0, comp_op1)
+ : fold_build2 (MAX_EXPR, comp_type, comp_op1, comp_op0);
return pedantic_non_lvalue (fold_convert (type, tem));
}
break;
@@ -4345,7 +4353,7 @@ fold_cond_expr_with_comparison (tree type, tree arg0, tree arg1, tree arg2)
case EQ_EXPR:
/* We can replace A with C1 in this case. */
arg1 = fold_convert (type, arg01);
- return fold (build3 (COND_EXPR, type, arg0, arg1, arg2));
+ return fold_build3 (COND_EXPR, type, arg0, arg1, arg2);
case LT_EXPR:
/* If C1 is C2 + 1, this is min(A, C2). */
@@ -4355,8 +4363,8 @@ fold_cond_expr_with_comparison (tree type, tree arg0, tree arg1, tree arg2)
const_binop (PLUS_EXPR, arg2,
integer_one_node, 0),
OEP_ONLY_CONST))
- return pedantic_non_lvalue (fold (build2 (MIN_EXPR,
- type, arg1, arg2)));
+ return pedantic_non_lvalue (fold_build2 (MIN_EXPR,
+ type, arg1, arg2));
break;
case LE_EXPR:
@@ -4367,8 +4375,8 @@ fold_cond_expr_with_comparison (tree type, tree arg0, tree arg1, tree arg2)
const_binop (MINUS_EXPR, arg2,
integer_one_node, 0),
OEP_ONLY_CONST))
- return pedantic_non_lvalue (fold (build2 (MIN_EXPR,
- type, arg1, arg2)));
+ return pedantic_non_lvalue (fold_build2 (MIN_EXPR,
+ type, arg1, arg2));
break;
case GT_EXPR:
@@ -4379,8 +4387,8 @@ fold_cond_expr_with_comparison (tree type, tree arg0, tree arg1, tree arg2)
const_binop (MINUS_EXPR, arg2,
integer_one_node, 0),
OEP_ONLY_CONST))
- return pedantic_non_lvalue (fold (build2 (MAX_EXPR,
- type, arg1, arg2)));
+ return pedantic_non_lvalue (fold_build2 (MAX_EXPR,
+ type, arg1, arg2));
break;
case GE_EXPR:
@@ -4391,8 +4399,8 @@ fold_cond_expr_with_comparison (tree type, tree arg0, tree arg1, tree arg2)
const_binop (PLUS_EXPR, arg2,
integer_one_node, 0),
OEP_ONLY_CONST))
- return pedantic_non_lvalue (fold (build2 (MAX_EXPR,
- type, arg1, arg2)));
+ return pedantic_non_lvalue (fold_build2 (MAX_EXPR,
+ type, arg1, arg2));
break;
case NE_EXPR:
break;
@@ -4780,8 +4788,8 @@ fold_truthop (enum tree_code code, tree truth_type, tree lhs, tree rhs)
l_const = unextend (l_const, ll_bitsize, ll_unsignedp, ll_and_mask);
l_const = const_binop (LSHIFT_EXPR, l_const, size_int (xll_bitpos), 0);
if (! integer_zerop (const_binop (BIT_AND_EXPR, l_const,
- fold (build1 (BIT_NOT_EXPR,
- lntype, ll_mask)),
+ fold_build1 (BIT_NOT_EXPR,
+ lntype, ll_mask),
0)))
{
warning ("comparison is always %d", wanted_code == NE_EXPR);
@@ -4795,8 +4803,8 @@ fold_truthop (enum tree_code code, tree truth_type, tree lhs, tree rhs)
r_const = unextend (r_const, rl_bitsize, rl_unsignedp, rl_and_mask);
r_const = const_binop (LSHIFT_EXPR, r_const, size_int (xrl_bitpos), 0);
if (! integer_zerop (const_binop (BIT_AND_EXPR, r_const,
- fold (build1 (BIT_NOT_EXPR,
- lntype, rl_mask)),
+ fold_build1 (BIT_NOT_EXPR,
+ lntype, rl_mask),
0)))
{
warning ("comparison is always %d", wanted_code == NE_EXPR);
@@ -5002,20 +5010,20 @@ optimize_minmax_comparison (enum tree_code code, tree type, tree op0, tree op1)
case GE_EXPR:
return
- fold (build2 (TRUTH_ORIF_EXPR, type,
- optimize_minmax_comparison
- (EQ_EXPR, type, arg0, comp_const),
- optimize_minmax_comparison
- (GT_EXPR, type, arg0, comp_const)));
+ fold_build2 (TRUTH_ORIF_EXPR, type,
+ optimize_minmax_comparison
+ (EQ_EXPR, type, arg0, comp_const),
+ optimize_minmax_comparison
+ (GT_EXPR, type, arg0, comp_const));
case EQ_EXPR:
if (op_code == MAX_EXPR && consts_equal)
/* MAX (X, 0) == 0 -> X <= 0 */
- return fold (build2 (LE_EXPR, type, inner, comp_const));
+ return fold_build2 (LE_EXPR, type, inner, comp_const);
else if (op_code == MAX_EXPR && consts_lt)
/* MAX (X, 0) == 5 -> X == 5 */
- return fold (build2 (EQ_EXPR, type, inner, comp_const));
+ return fold_build2 (EQ_EXPR, type, inner, comp_const);
else if (op_code == MAX_EXPR)
/* MAX (X, 0) == -1 -> false */
@@ -5023,7 +5031,7 @@ optimize_minmax_comparison (enum tree_code code, tree type, tree op0, tree op1)
else if (consts_equal)
/* MIN (X, 0) == 0 -> X >= 0 */
- return fold (build2 (GE_EXPR, type, inner, comp_const));
+ return fold_build2 (GE_EXPR, type, inner, comp_const);
else if (consts_lt)
/* MIN (X, 0) == 5 -> false */
@@ -5031,13 +5039,13 @@ optimize_minmax_comparison (enum tree_code code, tree type, tree op0, tree op1)
else
/* MIN (X, 0) == -1 -> X == -1 */
- return fold (build2 (EQ_EXPR, type, inner, comp_const));
+ return fold_build2 (EQ_EXPR, type, inner, comp_const);
case GT_EXPR:
if (op_code == MAX_EXPR && (consts_equal || consts_lt))
/* MAX (X, 0) > 0 -> X > 0
MAX (X, 0) > 5 -> X > 5 */
- return fold (build2 (GT_EXPR, type, inner, comp_const));
+ return fold_build2 (GT_EXPR, type, inner, comp_const);
else if (op_code == MAX_EXPR)
/* MAX (X, 0) > -1 -> true */
@@ -5050,7 +5058,7 @@ optimize_minmax_comparison (enum tree_code code, tree type, tree op0, tree op1)
else
/* MIN (X, 0) > -1 -> X > -1 */
- return fold (build2 (GT_EXPR, type, inner, comp_const));
+ return fold_build2 (GT_EXPR, type, inner, comp_const);
default:
return NULL_TREE;
@@ -5175,7 +5183,7 @@ extract_muldiv_1 (tree t, tree c, enum tree_code code, tree wide_type)
tree cstype = (*lang_hooks.types.signed_type) (ctype);
if ((t1 = extract_muldiv (op0, c, code, cstype)) != 0)
{
- t1 = fold (build1 (tcode, cstype, fold_convert (cstype, t1)));
+ t1 = fold_build1 (tcode, cstype, fold_convert (cstype, t1));
return fold_convert (ctype, t1);
}
break;
@@ -5183,7 +5191,7 @@ extract_muldiv_1 (tree t, tree c, enum tree_code code, tree wide_type)
/* FALLTHROUGH */
case NEGATE_EXPR:
if ((t1 = extract_muldiv (op0, c, code, wide_type)) != 0)
- return fold (build1 (tcode, ctype, fold_convert (ctype, t1)));
+ return fold_build1 (tcode, ctype, fold_convert (ctype, t1));
break;
case MIN_EXPR: case MAX_EXPR:
@@ -5199,8 +5207,8 @@ extract_muldiv_1 (tree t, tree c, enum tree_code code, tree wide_type)
if (tree_int_cst_sgn (c) < 0)
tcode = (tcode == MIN_EXPR ? MAX_EXPR : MIN_EXPR);
- return fold (build2 (tcode, ctype, fold_convert (ctype, t1),
- fold_convert (ctype, t2)));
+ return fold_build2 (tcode, ctype, fold_convert (ctype, t1),
+ fold_convert (ctype, t2));
}
break;
@@ -5241,8 +5249,8 @@ extract_muldiv_1 (tree t, tree c, enum tree_code code, tree wide_type)
are divisible by c. */
|| (multiple_of_p (ctype, op0, c)
&& multiple_of_p (ctype, op1, c))))
- return fold (build2 (tcode, ctype, fold_convert (ctype, t1),
- fold_convert (ctype, t2)));
+ return fold_build2 (tcode, ctype, fold_convert (ctype, t1),
+ fold_convert (ctype, t2));
/* If this was a subtraction, negate OP1 and set it to be an addition.
This simplifies the logic below. */
@@ -5292,17 +5300,17 @@ extract_muldiv_1 (tree t, tree c, enum tree_code code, tree wide_type)
/* If we were able to eliminate our operation from the first side,
apply our operation to the second side and reform the PLUS. */
if (t1 != 0 && (TREE_CODE (t1) != code || code == MULT_EXPR))
- return fold (build2 (tcode, ctype, fold_convert (ctype, t1), op1));
+ return fold_build2 (tcode, ctype, fold_convert (ctype, t1), op1);
/* The last case is if we are a multiply. In that case, we can
apply the distributive law to commute the multiply and addition
if the multiplication of the constants doesn't overflow. */
if (code == MULT_EXPR)
- return fold (build2 (tcode, ctype,
- fold (build2 (code, ctype,
- fold_convert (ctype, op0),
- fold_convert (ctype, c))),
- op1));
+ return fold_build2 (tcode, ctype,
+ fold_build2 (code, ctype,
+ fold_convert (ctype, op0),
+ fold_convert (ctype, c)),
+ op1);
break;
@@ -5324,12 +5332,12 @@ extract_muldiv_1 (tree t, tree c, enum tree_code code, tree wide_type)
do something only if the second operand is a constant. */
if (same_p
&& (t1 = extract_muldiv (op0, c, code, wide_type)) != 0)
- return fold (build2 (tcode, ctype, fold_convert (ctype, t1),
- fold_convert (ctype, op1)));
+ return fold_build2 (tcode, ctype, fold_convert (ctype, t1),
+ fold_convert (ctype, op1));
else if (tcode == MULT_EXPR && code == MULT_EXPR
&& (t1 = extract_muldiv (op1, c, code, wide_type)) != 0)
- return fold (build2 (tcode, ctype, fold_convert (ctype, op0),
- fold_convert (ctype, t1)));
+ return fold_build2 (tcode, ctype, fold_convert (ctype, op0),
+ fold_convert (ctype, t1));
else if (TREE_CODE (op1) != INTEGER_CST)
return 0;
@@ -5339,7 +5347,7 @@ extract_muldiv_1 (tree t, tree c, enum tree_code code, tree wide_type)
&& 0 != (t1 = const_binop (MULT_EXPR, fold_convert (ctype, op1),
fold_convert (ctype, c), 0))
&& ! TREE_OVERFLOW (t1))
- return fold (build2 (tcode, ctype, fold_convert (ctype, op0), t1));
+ return fold_build2 (tcode, ctype, fold_convert (ctype, op0), t1);
/* If these operations "cancel" each other, we have the main
optimizations of this pass, which occur when either constant is a
@@ -5358,15 +5366,15 @@ extract_muldiv_1 (tree t, tree c, enum tree_code code, tree wide_type)
&& code != FLOOR_MOD_EXPR && code != ROUND_MOD_EXPR)))
{
if (integer_zerop (const_binop (TRUNC_MOD_EXPR, op1, c, 0)))
- return fold (build2 (tcode, ctype, fold_convert (ctype, op0),
- fold_convert (ctype,
- const_binop (TRUNC_DIV_EXPR,
- op1, c, 0))));
+ return fold_build2 (tcode, ctype, fold_convert (ctype, op0),
+ fold_convert (ctype,
+ const_binop (TRUNC_DIV_EXPR,
+ op1, c, 0)));
else if (integer_zerop (const_binop (TRUNC_MOD_EXPR, c, op1, 0)))
- return fold (build2 (code, ctype, fold_convert (ctype, op0),
- fold_convert (ctype,
- const_binop (TRUNC_DIV_EXPR,
- c, op1, 0))));
+ return fold_build2 (code, ctype, fold_convert (ctype, op0),
+ fold_convert (ctype,
+ const_binop (TRUNC_DIV_EXPR,
+ c, op1, 0)));
}
break;
@@ -5503,7 +5511,7 @@ fold_binary_op_with_conditional_arg (enum tree_code code,
: build2 (code, type, arg, false_value));
}
- test = fold (build3 (COND_EXPR, type, test, lhs, rhs));
+ test = fold_build3 (COND_EXPR, type, test, lhs, rhs);
return fold_convert (type, test);
}
@@ -5581,8 +5589,8 @@ fold_mathfn_compare (enum built_in_function fcode, enum tree_code code,
return omit_one_operand (type, integer_one_node, arg);
/* sqrt(x) > y is the same as x >= 0, if y is negative. */
- return fold (build2 (GE_EXPR, type, arg,
- build_real (TREE_TYPE (arg), dconst0)));
+ return fold_build2 (GE_EXPR, type, arg,
+ build_real (TREE_TYPE (arg), dconst0));
}
else if (code == GT_EXPR || code == GE_EXPR)
{
@@ -5595,8 +5603,8 @@ fold_mathfn_compare (enum built_in_function fcode, enum tree_code code,
{
/* sqrt(x) > y is x == +Inf, when y is very large. */
if (HONOR_INFINITIES (mode))
- return fold (build2 (EQ_EXPR, type, arg,
- build_real (TREE_TYPE (arg), c2)));
+ return fold_build2 (EQ_EXPR, type, arg,
+ build_real (TREE_TYPE (arg), c2));
/* sqrt(x) > y is always false, when y is very large
and we don't care about infinities. */
@@ -5604,8 +5612,8 @@ fold_mathfn_compare (enum built_in_function fcode, enum tree_code code,
}
/* sqrt(x) > c is the same as x > c*c. */
- return fold (build2 (code, type, arg,
- build_real (TREE_TYPE (arg), c2)));
+ return fold_build2 (code, type, arg,
+ build_real (TREE_TYPE (arg), c2));
}
else if (code == LT_EXPR || code == LE_EXPR)
{
@@ -5624,14 +5632,14 @@ fold_mathfn_compare (enum built_in_function fcode, enum tree_code code,
/* sqrt(x) < y is x != +Inf when y is very large and we
don't care about NaNs. */
if (! HONOR_NANS (mode))
- return fold (build2 (NE_EXPR, type, arg,
- build_real (TREE_TYPE (arg), c2)));
+ return fold_build2 (NE_EXPR, type, arg,
+ build_real (TREE_TYPE (arg), c2));
/* sqrt(x) < y is x >= 0 when y is very large and we
don't care about Infinities. */
if (! HONOR_INFINITIES (mode))
- return fold (build2 (GE_EXPR, type, arg,
- build_real (TREE_TYPE (arg), dconst0)));
+ return fold_build2 (GE_EXPR, type, arg,
+ build_real (TREE_TYPE (arg), dconst0));
/* sqrt(x) < y is x >= 0 && x != +Inf, when y is large. */
if (lang_hooks.decls.global_bindings_p () != 0
@@ -5639,32 +5647,32 @@ fold_mathfn_compare (enum built_in_function fcode, enum tree_code code,
return NULL_TREE;
arg = save_expr (arg);
- return fold (build2 (TRUTH_ANDIF_EXPR, type,
- fold (build2 (GE_EXPR, type, arg,
- build_real (TREE_TYPE (arg),
- dconst0))),
- fold (build2 (NE_EXPR, type, arg,
- build_real (TREE_TYPE (arg),
- c2)))));
+ return fold_build2 (TRUTH_ANDIF_EXPR, type,
+ fold_build2 (GE_EXPR, type, arg,
+ build_real (TREE_TYPE (arg),
+ dconst0)),
+ fold_build2 (NE_EXPR, type, arg,
+ build_real (TREE_TYPE (arg),
+ c2)));
}
/* sqrt(x) < c is the same as x < c*c, if we ignore NaNs. */
if (! HONOR_NANS (mode))
- return fold (build2 (code, type, arg,
- build_real (TREE_TYPE (arg), c2)));
+ return fold_build2 (code, type, arg,
+ build_real (TREE_TYPE (arg), c2));
/* sqrt(x) < c is the same as x >= 0 && x < c*c. */
if (lang_hooks.decls.global_bindings_p () == 0
&& ! CONTAINS_PLACEHOLDER_P (arg))
{
arg = save_expr (arg);
- return fold (build2 (TRUTH_ANDIF_EXPR, type,
- fold (build2 (GE_EXPR, type, arg,
- build_real (TREE_TYPE (arg),
- dconst0))),
- fold (build2 (code, type, arg,
- build_real (TREE_TYPE (arg),
- c2)))));
+ return fold_build2 (TRUTH_ANDIF_EXPR, type,
+ fold_build2 (GE_EXPR, type, arg,
+ build_real (TREE_TYPE (arg),
+ dconst0)),
+ fold_build2 (code, type, arg,
+ build_real (TREE_TYPE (arg),
+ c2)));
}
}
}
@@ -5715,7 +5723,7 @@ fold_inf_compare (enum tree_code code, tree type, tree arg0, tree arg1)
&& ! CONTAINS_PLACEHOLDER_P (arg0))
{
arg0 = save_expr (arg0);
- return fold (build2 (EQ_EXPR, type, arg0, arg0));
+ return fold_build2 (EQ_EXPR, type, arg0, arg0);
}
break;
@@ -5723,30 +5731,30 @@ fold_inf_compare (enum tree_code code, tree type, tree arg0, tree arg1)
case GE_EXPR:
/* x == +Inf and x >= +Inf are always equal to x > DBL_MAX. */
real_maxval (&max, neg, mode);
- return fold (build2 (neg ? LT_EXPR : GT_EXPR, type,
- arg0, build_real (TREE_TYPE (arg0), max)));
+ return fold_build2 (neg ? LT_EXPR : GT_EXPR, type,
+ arg0, build_real (TREE_TYPE (arg0), max));
case LT_EXPR:
/* x < +Inf is always equal to x <= DBL_MAX. */
real_maxval (&max, neg, mode);
- return fold (build2 (neg ? GE_EXPR : LE_EXPR, type,
- arg0, build_real (TREE_TYPE (arg0), max)));
+ return fold_build2 (neg ? GE_EXPR : LE_EXPR, type,
+ arg0, build_real (TREE_TYPE (arg0), max));
case NE_EXPR:
/* x != +Inf is always equal to !(x > DBL_MAX). */
real_maxval (&max, neg, mode);
if (! HONOR_NANS (mode))
- return fold (build2 (neg ? GE_EXPR : LE_EXPR, type,
- arg0, build_real (TREE_TYPE (arg0), max)));
+ return fold_build2 (neg ? GE_EXPR : LE_EXPR, type,
+ arg0, build_real (TREE_TYPE (arg0), max));
/* The transformation below creates non-gimple code and thus is
not appropriate if we are in gimple form. */
if (in_gimple_form)
return NULL_TREE;
- temp = fold (build2 (neg ? LT_EXPR : GT_EXPR, type,
- arg0, build_real (TREE_TYPE (arg0), max)));
- return fold (build1 (TRUTH_NOT_EXPR, type, temp));
+ temp = fold_build2 (neg ? LT_EXPR : GT_EXPR, type,
+ arg0, build_real (TREE_TYPE (arg0), max));
+ return fold_build1 (TRUTH_NOT_EXPR, type, temp);
default:
break;
@@ -5858,39 +5866,39 @@ fold_div_compare (enum tree_code code, tree type, tree arg0, tree arg1)
if (TREE_OVERFLOW (lo) && TREE_OVERFLOW (hi))
return omit_one_operand (type, integer_zero_node, arg00);
if (TREE_OVERFLOW (hi))
- return fold (build2 (GE_EXPR, type, arg00, lo));
+ return fold_build2 (GE_EXPR, type, arg00, lo);
if (TREE_OVERFLOW (lo))
- return fold (build2 (LE_EXPR, type, arg00, hi));
+ return fold_build2 (LE_EXPR, type, arg00, hi);
return build_range_check (type, arg00, 1, lo, hi);
case NE_EXPR:
if (TREE_OVERFLOW (lo) && TREE_OVERFLOW (hi))
return omit_one_operand (type, integer_one_node, arg00);
if (TREE_OVERFLOW (hi))
- return fold (build2 (LT_EXPR, type, arg00, lo));
+ return fold_build2 (LT_EXPR, type, arg00, lo);
if (TREE_OVERFLOW (lo))
- return fold (build2 (GT_EXPR, type, arg00, hi));
+ return fold_build2 (GT_EXPR, type, arg00, hi);
return build_range_check (type, arg00, 0, lo, hi);
case LT_EXPR:
if (TREE_OVERFLOW (lo))
return omit_one_operand (type, integer_zero_node, arg00);
- return fold (build2 (LT_EXPR, type, arg00, lo));
+ return fold_build2 (LT_EXPR, type, arg00, lo);
case LE_EXPR:
if (TREE_OVERFLOW (hi))
return omit_one_operand (type, integer_one_node, arg00);
- return fold (build2 (LE_EXPR, type, arg00, hi));
+ return fold_build2 (LE_EXPR, type, arg00, hi);
case GT_EXPR:
if (TREE_OVERFLOW (hi))
return omit_one_operand (type, integer_zero_node, arg00);
- return fold (build2 (GT_EXPR, type, arg00, hi));
+ return fold_build2 (GT_EXPR, type, arg00, hi);
case GE_EXPR:
if (TREE_OVERFLOW (lo))
return omit_one_operand (type, integer_one_node, arg00);
- return fold (build2 (GE_EXPR, type, arg00, lo));
+ return fold_build2 (GE_EXPR, type, arg00, lo);
default:
break;
@@ -5932,9 +5940,9 @@ fold_single_bit_test (enum tree_code code, tree arg0, tree arg1,
== GET_MODE_BITSIZE (TYPE_MODE (TREE_TYPE (arg00))))
{
tree stype = lang_hooks.types.signed_type (TREE_TYPE (arg00));
- return fold (build2 (code == EQ_EXPR ? GE_EXPR : LT_EXPR,
- result_type, fold_convert (stype, arg00),
- fold_convert (stype, integer_zero_node)));
+ return fold_build2 (code == EQ_EXPR ? GE_EXPR : LT_EXPR,
+ result_type, fold_convert (stype, arg00),
+ fold_convert (stype, integer_zero_node));
}
/* Otherwise we have (A & C) != 0 where C is a single bit,
@@ -5974,8 +5982,8 @@ fold_single_bit_test (enum tree_code code, tree arg0, tree arg1,
inner, size_int (bitnum));
if (code == EQ_EXPR)
- inner = fold (build2 (BIT_XOR_EXPR, intermediate_type,
- inner, integer_one_node));
+ inner = fold_build2 (BIT_XOR_EXPR, intermediate_type,
+ inner, integer_one_node);
/* Put the AND last so it can combine with more things. */
inner = build2 (BIT_AND_EXPR, intermediate_type,
@@ -6097,8 +6105,8 @@ fold_widened_comparison (enum tree_code code, tree type, tree arg0, tree arg1)
|| (TREE_CODE (arg1_unw) == INTEGER_CST
&& TREE_CODE (shorter_type) == INTEGER_TYPE
&& int_fits_type_p (arg1_unw, shorter_type))))
- return fold (build (code, type, arg0_unw,
- fold_convert (shorter_type, arg1_unw)));
+ return fold_build2 (code, type, arg0_unw,
+ fold_convert (shorter_type, arg1_unw));
if (TREE_CODE (arg1_unw) != INTEGER_CST)
return NULL_TREE;
@@ -6200,7 +6208,7 @@ fold_sign_changed_comparison (enum tree_code code, tree type,
else
arg1 = fold_convert (inner_type, arg1);
- return fold (build2 (code, type, arg0_inner, arg1));
+ return fold_build2 (code, type, arg0_inner, arg1);
}
/* Tries to replace &a[idx] CODE s * delta with &a[idx CODE delta], if s is
@@ -6274,9 +6282,9 @@ try_move_mult_to_index (enum tree_code code, tree addr, tree mult)
pos = TREE_OPERAND (pos, 0);
}
- TREE_OPERAND (pos, 1) = fold (build2 (code, itype,
- TREE_OPERAND (pos, 1),
- delta));
+ TREE_OPERAND (pos, 1) = fold_build2 (code, itype,
+ TREE_OPERAND (pos, 1),
+ delta);
return build1 (ADDR_EXPR, TREE_TYPE (addr), ret);
}
@@ -6319,11 +6327,11 @@ fold_to_nonsharp_ineq_using_bound (tree ineq, tree bound)
if (TREE_TYPE (a1) != typea)
return NULL_TREE;
- diff = fold (build2 (MINUS_EXPR, typea, a1, a));
+ diff = fold_build2 (MINUS_EXPR, typea, a1, a);
if (!integer_onep (diff))
return NULL_TREE;
- return fold (build2 (GE_EXPR, type, a, y));
+ return fold_build2 (GE_EXPR, type, a, y);
}
/* Fold complex addition when both components are accessible by parts.
@@ -6351,10 +6359,10 @@ fold_complex_add (tree type, tree ac, tree bc, enum tree_code code)
inner_type = TREE_TYPE (type);
- rr = fold (build2 (code, inner_type, ar, br));
- ri = fold (build2 (code, inner_type, ai, bi));
+ rr = fold_build2 (code, inner_type, ar, br);
+ ri = fold_build2 (code, inner_type, ai, bi);
- return fold (build2 (COMPLEX_EXPR, type, rr, ri));
+ return fold_build2 (COMPLEX_EXPR, type, rr, ri);
}
/* Perform some simplifications of complex multiplication when one or more
@@ -6427,51 +6435,51 @@ fold_complex_mult_parts (tree type, tree ar, tree ai, tree br, tree bi)
}
else if (ai0 && bi0)
{
- rr = fold (build2 (MULT_EXPR, inner_type, ar, br));
+ rr = fold_build2 (MULT_EXPR, inner_type, ar, br);
ri = zero;
}
else if (ai0 && br0)
{
rr = zero;
- ri = fold (build2 (MULT_EXPR, inner_type, ar, bi));
+ ri = fold_build2 (MULT_EXPR, inner_type, ar, bi);
}
else if (ar0 && bi0)
{
rr = zero;
- ri = fold (build2 (MULT_EXPR, inner_type, ai, br));
+ ri = fold_build2 (MULT_EXPR, inner_type, ai, br);
}
else if (ar0 && br0)
{
- rr = fold (build2 (MULT_EXPR, inner_type, ai, bi));
- rr = fold (build1 (NEGATE_EXPR, inner_type, rr));
+ rr = fold_build2 (MULT_EXPR, inner_type, ai, bi);
+ rr = fold_build1 (NEGATE_EXPR, inner_type, rr);
ri = zero;
}
else if (bi0)
{
- rr = fold (build2 (MULT_EXPR, inner_type, ar, br));
- ri = fold (build2 (MULT_EXPR, inner_type, ai, br));
+ rr = fold_build2 (MULT_EXPR, inner_type, ar, br);
+ ri = fold_build2 (MULT_EXPR, inner_type, ai, br);
}
else if (ai0)
{
- rr = fold (build2 (MULT_EXPR, inner_type, ar, br));
- ri = fold (build2 (MULT_EXPR, inner_type, ar, bi));
+ rr = fold_build2 (MULT_EXPR, inner_type, ar, br);
+ ri = fold_build2 (MULT_EXPR, inner_type, ar, bi);
}
else if (br0)
{
- rr = fold (build2 (MULT_EXPR, inner_type, ai, bi));
- rr = fold (build1 (NEGATE_EXPR, inner_type, rr));
- ri = fold (build2 (MULT_EXPR, inner_type, ar, bi));
+ rr = fold_build2 (MULT_EXPR, inner_type, ai, bi);
+ rr = fold_build1 (NEGATE_EXPR, inner_type, rr);
+ ri = fold_build2 (MULT_EXPR, inner_type, ar, bi);
}
else if (ar0)
{
- rr = fold (build2 (MULT_EXPR, inner_type, ai, bi));
- rr = fold (build1 (NEGATE_EXPR, inner_type, rr));
- ri = fold (build2 (MULT_EXPR, inner_type, ai, br));
+ rr = fold_build2 (MULT_EXPR, inner_type, ai, bi);
+ rr = fold_build1 (NEGATE_EXPR, inner_type, rr);
+ ri = fold_build2 (MULT_EXPR, inner_type, ai, br);
}
else
return NULL;
- return fold (build2 (COMPLEX_EXPR, type, rr, ri));
+ return fold_build2 (COMPLEX_EXPR, type, rr, ri);
}
static tree
@@ -6562,40 +6570,40 @@ fold_complex_div_parts (tree type, tree ar, tree ai, tree br, tree bi,
if (ai0 && bi0)
{
- rr = fold (build2 (code, inner_type, ar, br));
+ rr = fold_build2 (code, inner_type, ar, br);
ri = zero;
}
else if (ai0 && br0)
{
rr = zero;
- ri = fold (build2 (code, inner_type, ar, bi));
- ri = fold (build1 (NEGATE_EXPR, inner_type, ri));
+ ri = fold_build2 (code, inner_type, ar, bi);
+ ri = fold_build1 (NEGATE_EXPR, inner_type, ri);
}
else if (ar0 && bi0)
{
rr = zero;
- ri = fold (build2 (code, inner_type, ai, br));
+ ri = fold_build2 (code, inner_type, ai, br);
}
else if (ar0 && br0)
{
- rr = fold (build2 (code, inner_type, ai, bi));
+ rr = fold_build2 (code, inner_type, ai, bi);
ri = zero;
}
else if (bi0)
{
- rr = fold (build2 (code, inner_type, ar, br));
- ri = fold (build2 (code, inner_type, ai, br));
+ rr = fold_build2 (code, inner_type, ar, br);
+ ri = fold_build2 (code, inner_type, ai, br);
}
else if (br0)
{
- rr = fold (build2 (code, inner_type, ai, bi));
- ri = fold (build2 (code, inner_type, ar, bi));
- ri = fold (build1 (NEGATE_EXPR, inner_type, ri));
+ rr = fold_build2 (code, inner_type, ai, bi);
+ ri = fold_build2 (code, inner_type, ar, bi);
+ ri = fold_build1 (NEGATE_EXPR, inner_type, ri);
}
else
return NULL;
- return fold (build2 (COMPLEX_EXPR, type, rr, ri));
+ return fold_build2 (COMPLEX_EXPR, type, rr, ri);
}
static tree
@@ -6663,17 +6671,17 @@ fold_unary (enum tree_code code, tree type, tree op0)
{
if (TREE_CODE (arg0) == COMPOUND_EXPR)
return build2 (COMPOUND_EXPR, type, TREE_OPERAND (arg0, 0),
- fold (build1 (code, type, TREE_OPERAND (arg0, 1))));
+ fold_build1 (code, type, TREE_OPERAND (arg0, 1)));
else if (TREE_CODE (arg0) == COND_EXPR)
{
tree arg01 = TREE_OPERAND (arg0, 1);
tree arg02 = TREE_OPERAND (arg0, 2);
if (! VOID_TYPE_P (TREE_TYPE (arg01)))
- arg01 = fold (build1 (code, type, arg01));
+ arg01 = fold_build1 (code, type, arg01);
if (! VOID_TYPE_P (TREE_TYPE (arg02)))
- arg02 = fold (build1 (code, type, arg02));
- tem = fold (build3 (COND_EXPR, type, TREE_OPERAND (arg0, 0),
- arg01, arg02));
+ arg02 = fold_build1 (code, type, arg02);
+ tem = fold_build3 (COND_EXPR, type, TREE_OPERAND (arg0, 0),
+ arg01, arg02);
/* If this was a conversion, and all we did was to move into
inside the COND_EXPR, bring it back out. But leave it if
@@ -6716,11 +6724,11 @@ fold_unary (enum tree_code code, tree type, tree op0)
return arg0;
}
else if (TREE_CODE (type) != INTEGER_TYPE)
- return fold (build3 (COND_EXPR, type, arg0,
- fold (build1 (code, type,
- integer_one_node)),
- fold (build1 (code, type,
- integer_zero_node))));
+ return fold_build3 (COND_EXPR, type, arg0,
+ fold_build1 (code, type,
+ integer_one_node),
+ fold_build1 (code, type,
+ integer_zero_node));
}
}
@@ -6765,7 +6773,7 @@ fold_unary (enum tree_code code, tree type, tree op0)
if (TYPE_MAIN_VARIANT (inside_type) == TYPE_MAIN_VARIANT (type)
&& ((inter_int && final_int) || (inter_float && final_float))
&& inter_prec >= final_prec)
- return fold (build1 (code, type, TREE_OPERAND (op0, 0)));
+ return fold_build1 (code, type, TREE_OPERAND (op0, 0));
/* Likewise, if the intermediate and final types are either both
float or both integer, we don't need the middle conversion if
@@ -6780,14 +6788,14 @@ fold_unary (enum tree_code code, tree type, tree op0)
&& ! (final_prec != GET_MODE_BITSIZE (TYPE_MODE (type))
&& TYPE_MODE (type) == TYPE_MODE (inter_type))
&& ! final_ptr)
- return fold (build1 (code, type, TREE_OPERAND (op0, 0)));
+ return fold_build1 (code, type, TREE_OPERAND (op0, 0));
/* If we have a sign-extension of a zero-extended value, we can
replace that by a single zero-extension. */
if (inside_int && inter_int && final_int
&& inside_prec < inter_prec && inter_prec < final_prec
&& inside_unsignedp && !inter_unsignedp)
- return fold (build1 (code, type, TREE_OPERAND (op0, 0)));
+ return fold_build1 (code, type, TREE_OPERAND (op0, 0));
/* Two conversions in a row are not needed unless:
- some conversion is floating-point (overstrict for now), or
@@ -6811,7 +6819,7 @@ fold_unary (enum tree_code code, tree type, tree op0)
&& ! (final_prec != GET_MODE_BITSIZE (TYPE_MODE (type))
&& TYPE_MODE (type) == TYPE_MODE (inter_type))
&& ! final_ptr)
- return fold (build1 (code, type, TREE_OPERAND (op0, 0)));
+ return fold_build1 (code, type, TREE_OPERAND (op0, 0));
}
if (TREE_CODE (op0) == MODIFY_EXPR
@@ -6874,8 +6882,8 @@ fold_unary (enum tree_code code, tree type, tree op0)
TREE_INT_CST_HIGH (and1));
tem = force_fit_type (tem, 0, TREE_OVERFLOW (and1),
TREE_CONSTANT_OVERFLOW (and1));
- return fold (build2 (BIT_AND_EXPR, type,
- fold_convert (type, and0), tem));
+ return fold_build2 (BIT_AND_EXPR, type,
+ fold_convert (type, and0), tem);
}
}
@@ -6912,24 +6920,24 @@ fold_unary (enum tree_code code, tree type, tree op0)
return fold_convert (type, negate_expr (arg0));
/* Convert - (~A) to A + 1. */
if (INTEGRAL_TYPE_P (type) && TREE_CODE (arg0) == BIT_NOT_EXPR)
- return fold (build2 (PLUS_EXPR, type, TREE_OPERAND (arg0, 0),
- build_int_cst (type, 1)));
+ return fold_build2 (PLUS_EXPR, type, TREE_OPERAND (arg0, 0),
+ build_int_cst (type, 1));
return NULL_TREE;
case ABS_EXPR:
if (TREE_CODE (arg0) == INTEGER_CST || TREE_CODE (arg0) == REAL_CST)
return fold_abs_const (arg0, type);
else if (TREE_CODE (arg0) == NEGATE_EXPR)
- return fold (build1 (ABS_EXPR, type, TREE_OPERAND (arg0, 0)));
+ return fold_build1 (ABS_EXPR, type, TREE_OPERAND (arg0, 0));
/* Convert fabs((double)float) into (double)fabsf(float). */
else if (TREE_CODE (arg0) == NOP_EXPR
&& TREE_CODE (type) == REAL_TYPE)
{
tree targ0 = strip_float_extensions (arg0);
if (targ0 != arg0)
- return fold_convert (type, fold (build1 (ABS_EXPR,
- TREE_TYPE (targ0),
- targ0)));
+ return fold_convert (type, fold_build1 (ABS_EXPR,
+ TREE_TYPE (targ0),
+ targ0));
}
else if (tree_expr_nonnegative_p (arg0))
return arg0;
@@ -6939,7 +6947,7 @@ fold_unary (enum tree_code code, tree type, tree op0)
{
tem = fold_strip_sign_ops (arg0);
if (tem)
- return fold (build1 (ABS_EXPR, type, fold_convert (type, tem)));
+ return fold_build1 (ABS_EXPR, type, fold_convert (type, tem));
}
return NULL_TREE;
@@ -6954,11 +6962,11 @@ fold_unary (enum tree_code code, tree type, tree op0)
return build_complex (type, TREE_REALPART (arg0),
negate_expr (TREE_IMAGPART (arg0)));
else if (TREE_CODE (arg0) == PLUS_EXPR || TREE_CODE (arg0) == MINUS_EXPR)
- return fold (build2 (TREE_CODE (arg0), type,
- fold (build1 (CONJ_EXPR, type,
- TREE_OPERAND (arg0, 0))),
- fold (build1 (CONJ_EXPR, type,
- TREE_OPERAND (arg0, 1)))));
+ return fold_build2 (TREE_CODE (arg0), type,
+ fold_build1 (CONJ_EXPR, type,
+ TREE_OPERAND (arg0, 0)),
+ fold_build1 (CONJ_EXPR, type,
+ TREE_OPERAND (arg0, 1)));
else if (TREE_CODE (arg0) == CONJ_EXPR)
return TREE_OPERAND (arg0, 0);
return NULL_TREE;
@@ -6970,15 +6978,15 @@ fold_unary (enum tree_code code, tree type, tree op0)
return TREE_OPERAND (arg0, 0);
/* Convert ~ (-A) to A - 1. */
else if (INTEGRAL_TYPE_P (type) && TREE_CODE (arg0) == NEGATE_EXPR)
- return fold (build2 (MINUS_EXPR, type, TREE_OPERAND (arg0, 0),
- build_int_cst (type, 1)));
+ return fold_build2 (MINUS_EXPR, type, TREE_OPERAND (arg0, 0),
+ build_int_cst (type, 1));
/* Convert ~ (A - 1) or ~ (A + -1) to -A. */
else if (INTEGRAL_TYPE_P (type)
&& ((TREE_CODE (arg0) == MINUS_EXPR
&& integer_onep (TREE_OPERAND (arg0, 1)))
|| (TREE_CODE (arg0) == PLUS_EXPR
&& integer_all_onesp (TREE_OPERAND (arg0, 1)))))
- return fold (build1 (NEGATE_EXPR, type, TREE_OPERAND (arg0, 0)));
+ return fold_build1 (NEGATE_EXPR, type, TREE_OPERAND (arg0, 0));
return NULL_TREE;
case TRUTH_NOT_EXPR:
@@ -7005,11 +7013,11 @@ fold_unary (enum tree_code code, tree type, tree op0)
else if (TREE_CODE (arg0) == COMPLEX_CST)
return TREE_REALPART (arg0);
else if (TREE_CODE (arg0) == PLUS_EXPR || TREE_CODE (arg0) == MINUS_EXPR)
- return fold (build2 (TREE_CODE (arg0), type,
- fold (build1 (REALPART_EXPR, type,
- TREE_OPERAND (arg0, 0))),
- fold (build1 (REALPART_EXPR, type,
- TREE_OPERAND (arg0, 1)))));
+ return fold_build2 (TREE_CODE (arg0), type,
+ fold_build1 (REALPART_EXPR, type,
+ TREE_OPERAND (arg0, 0)),
+ fold_build1 (REALPART_EXPR, type,
+ TREE_OPERAND (arg0, 1)));
return NULL_TREE;
case IMAGPART_EXPR:
@@ -7021,11 +7029,11 @@ fold_unary (enum tree_code code, tree type, tree op0)
else if (TREE_CODE (arg0) == COMPLEX_CST)
return TREE_IMAGPART (arg0);
else if (TREE_CODE (arg0) == PLUS_EXPR || TREE_CODE (arg0) == MINUS_EXPR)
- return fold (build2 (TREE_CODE (arg0), type,
- fold (build1 (IMAGPART_EXPR, type,
- TREE_OPERAND (arg0, 0))),
- fold (build1 (IMAGPART_EXPR, type,
- TREE_OPERAND (arg0, 1)))));
+ return fold_build2 (TREE_CODE (arg0), type,
+ fold_build1 (IMAGPART_EXPR, type,
+ TREE_OPERAND (arg0, 0)),
+ fold_build1 (IMAGPART_EXPR, type,
+ TREE_OPERAND (arg0, 1)));
return NULL_TREE;
default:
@@ -7125,7 +7133,7 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
to ARG1 to reduce the number of tests below. */
if (commutative_tree_code (code)
&& tree_swap_operands_p (arg0, arg1, true))
- return fold (build2 (code, type, op1, op0));
+ return fold_build2 (code, type, op1, op0);
/* Now WINS is set as described above,
ARG0 is the first operand of EXPR,
@@ -7156,12 +7164,12 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
|| (TREE_CODE (arg0) == BIT_AND_EXPR
&& integer_onep (TREE_OPERAND (arg0, 1)))))))
{
- tem = fold (build2 (code == BIT_AND_EXPR ? TRUTH_AND_EXPR
- : code == BIT_IOR_EXPR ? TRUTH_OR_EXPR
- : TRUTH_XOR_EXPR,
- boolean_type_node,
- fold_convert (boolean_type_node, arg0),
- fold_convert (boolean_type_node, arg1)));
+ tem = fold_build2 (code == BIT_AND_EXPR ? TRUTH_AND_EXPR
+ : code == BIT_IOR_EXPR ? TRUTH_OR_EXPR
+ : TRUTH_XOR_EXPR,
+ boolean_type_node,
+ fold_convert (boolean_type_node, arg0),
+ fold_convert (boolean_type_node, arg1));
if (code == EQ_EXPR)
tem = invert_truthvalue (tem);
@@ -7172,23 +7180,23 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
if (TREE_CODE_CLASS (code) == tcc_comparison
&& TREE_CODE (arg0) == COMPOUND_EXPR)
return build2 (COMPOUND_EXPR, type, TREE_OPERAND (arg0, 0),
- fold (build2 (code, type, TREE_OPERAND (arg0, 1), arg1)));
+ fold_build2 (code, type, TREE_OPERAND (arg0, 1), arg1));
else if (TREE_CODE_CLASS (code) == tcc_comparison
&& TREE_CODE (arg1) == COMPOUND_EXPR)
return build2 (COMPOUND_EXPR, type, TREE_OPERAND (arg1, 0),
- fold (build2 (code, type, arg0, TREE_OPERAND (arg1, 1))));
+ fold_build2 (code, type, arg0, TREE_OPERAND (arg1, 1)));
else if (TREE_CODE_CLASS (code) == tcc_binary
|| TREE_CODE_CLASS (code) == tcc_comparison)
{
if (TREE_CODE (arg0) == COMPOUND_EXPR)
return build2 (COMPOUND_EXPR, type, TREE_OPERAND (arg0, 0),
- fold (build2 (code, type, TREE_OPERAND (arg0, 1),
- arg1)));
+ fold_build2 (code, type, TREE_OPERAND (arg0, 1),
+ arg1));
if (TREE_CODE (arg1) == COMPOUND_EXPR
&& reorder_operands_p (arg0, TREE_OPERAND (arg1, 0)))
return build2 (COMPOUND_EXPR, type, TREE_OPERAND (arg1, 0),
- fold (build2 (code, type,
- arg0, TREE_OPERAND (arg1, 1))));
+ fold_build2 (code, type,
+ arg0, TREE_OPERAND (arg1, 1)));
if (TREE_CODE (arg0) == COND_EXPR || COMPARISON_CLASS_P (arg0))
{
@@ -7214,16 +7222,16 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
case PLUS_EXPR:
/* A + (-B) -> A - B */
if (TREE_CODE (arg1) == NEGATE_EXPR)
- return fold (build2 (MINUS_EXPR, type, arg0, TREE_OPERAND (arg1, 0)));
+ return fold_build2 (MINUS_EXPR, type, arg0, TREE_OPERAND (arg1, 0));
/* (-A) + B -> B - A */
if (TREE_CODE (arg0) == NEGATE_EXPR
&& reorder_operands_p (TREE_OPERAND (arg0, 0), arg1))
- return fold (build2 (MINUS_EXPR, type, arg1, TREE_OPERAND (arg0, 0)));
+ return fold_build2 (MINUS_EXPR, type, arg1, TREE_OPERAND (arg0, 0));
/* Convert ~A + 1 to -A. */
if (INTEGRAL_TYPE_P (type)
&& TREE_CODE (arg0) == BIT_NOT_EXPR
&& integer_onep (arg1))
- return fold (build1 (NEGATE_EXPR, type, TREE_OPERAND (arg0, 0)));
+ return fold_build1 (NEGATE_EXPR, type, TREE_OPERAND (arg0, 0));
if (TREE_CODE (type) == COMPLEX_TYPE)
{
@@ -7278,19 +7286,19 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
if (TREE_CODE (parg0) == MULT_EXPR
&& TREE_CODE (parg1) != MULT_EXPR)
- return fold (build2 (pcode, type,
- fold (build2 (PLUS_EXPR, type,
- fold_convert (type, parg0),
- fold_convert (type, marg))),
- fold_convert (type, parg1)));
+ return fold_build2 (pcode, type,
+ fold_build2 (PLUS_EXPR, type,
+ fold_convert (type, parg0),
+ fold_convert (type, marg)),
+ fold_convert (type, parg1));
if (TREE_CODE (parg0) != MULT_EXPR
&& TREE_CODE (parg1) == MULT_EXPR)
- return fold (build2 (PLUS_EXPR, type,
- fold_convert (type, parg0),
- fold (build2 (pcode, type,
- fold_convert (type, marg),
- fold_convert (type,
- parg1)))));
+ return fold_build2 (PLUS_EXPR, type,
+ fold_convert (type, parg0),
+ fold_build2 (pcode, type,
+ fold_convert (type, marg),
+ fold_convert (type,
+ parg1)));
}
if (TREE_CODE (arg0) == MULT_EXPR && TREE_CODE (arg1) == MULT_EXPR)
@@ -7341,20 +7349,20 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
if (exact_log2 (int11) > 0 && int01 % int11 == 0)
{
- alt0 = fold (build2 (MULT_EXPR, type, arg00,
- build_int_cst (NULL_TREE,
- int01 / int11)));
+ alt0 = fold_build2 (MULT_EXPR, type, arg00,
+ build_int_cst (NULL_TREE,
+ int01 / int11));
alt1 = arg10;
same = arg11;
}
}
if (same)
- return fold (build2 (MULT_EXPR, type,
- fold (build2 (PLUS_EXPR, type,
- fold_convert (type, alt0),
- fold_convert (type, alt1))),
- same));
+ return fold_build2 (MULT_EXPR, type,
+ fold_build2 (PLUS_EXPR, type,
+ fold_convert (type, alt0),
+ fold_convert (type, alt1)),
+ same);
}
/* Try replacing &a[i1] + c * i2 with &a[i1 + i2], if c is step
@@ -7391,16 +7399,16 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
{
tem = fold_negate_const (arg1, type);
if (!TREE_OVERFLOW (arg1) || !flag_trapping_math)
- return fold (build2 (MINUS_EXPR, type,
- fold_convert (type, arg0),
- fold_convert (type, tem)));
+ return fold_build2 (MINUS_EXPR, type,
+ fold_convert (type, arg0),
+ fold_convert (type, tem));
}
/* Convert x+x into x*2.0. */
if (operand_equal_p (arg0, arg1, 0)
&& SCALAR_FLOAT_TYPE_P (type))
- return fold (build2 (MULT_EXPR, type, arg0,
- build_real (type, dconst2)));
+ return fold_build2 (MULT_EXPR, type, arg0,
+ build_real (type, dconst2));
/* Convert x*c+x into x*(c+1). */
if (flag_unsafe_math_optimizations
@@ -7413,8 +7421,8 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
c = TREE_REAL_CST (TREE_OPERAND (arg0, 1));
real_arithmetic (&c, PLUS_EXPR, &c, &dconst1);
- return fold (build2 (MULT_EXPR, type, arg1,
- build_real (type, c)));
+ return fold_build2 (MULT_EXPR, type, arg1,
+ build_real (type, c));
}
/* Convert x+x*c into x*(c+1). */
@@ -7428,8 +7436,8 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
c = TREE_REAL_CST (TREE_OPERAND (arg1, 1));
real_arithmetic (&c, PLUS_EXPR, &c, &dconst1);
- return fold (build2 (MULT_EXPR, type, arg0,
- build_real (type, c)));
+ return fold_build2 (MULT_EXPR, type, arg0,
+ build_real (type, c));
}
/* Convert x*c1+x*c2 into x*(c1+c2). */
@@ -7448,9 +7456,9 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
c1 = TREE_REAL_CST (TREE_OPERAND (arg0, 1));
c2 = TREE_REAL_CST (TREE_OPERAND (arg1, 1));
real_arithmetic (&c1, PLUS_EXPR, &c1, &c2);
- return fold (build2 (MULT_EXPR, type,
- TREE_OPERAND (arg0, 0),
- build_real (type, c1)));
+ return fold_build2 (MULT_EXPR, type,
+ TREE_OPERAND (arg0, 0),
+ build_real (type, c1));
}
/* Convert a + (b*c + d*e) into (a + b*c) + d*e. */
if (flag_unsafe_math_optimizations
@@ -7463,8 +7471,8 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
&& TREE_CODE (tree10) == MULT_EXPR)
{
tree tree0;
- tree0 = fold (build2 (PLUS_EXPR, type, arg0, tree10));
- return fold (build2 (PLUS_EXPR, type, tree0, tree11));
+ tree0 = fold_build2 (PLUS_EXPR, type, arg0, tree10);
+ return fold_build2 (PLUS_EXPR, type, tree0, tree11);
}
}
/* Convert (b*c + d*e) + a into b*c + (d*e +a). */
@@ -7478,8 +7486,8 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
&& TREE_CODE (tree00) == MULT_EXPR)
{
tree tree0;
- tree0 = fold (build2 (PLUS_EXPR, type, tree01, arg1));
- return fold (build2 (PLUS_EXPR, type, tree00, tree0));
+ tree0 = fold_build2 (PLUS_EXPR, type, tree01, arg1);
+ return fold_build2 (PLUS_EXPR, type, tree00, tree0);
}
}
}
@@ -7653,25 +7661,25 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
case MINUS_EXPR:
/* A - (-B) -> A + B */
if (TREE_CODE (arg1) == NEGATE_EXPR)
- return fold (build2 (PLUS_EXPR, type, arg0, TREE_OPERAND (arg1, 0)));
+ return fold_build2 (PLUS_EXPR, type, arg0, TREE_OPERAND (arg1, 0));
/* (-A) - B -> (-B) - A where B is easily negated and we can swap. */
if (TREE_CODE (arg0) == NEGATE_EXPR
&& (FLOAT_TYPE_P (type)
|| (INTEGRAL_TYPE_P (type) && flag_wrapv && !flag_trapv))
&& negate_expr_p (arg1)
&& reorder_operands_p (arg0, arg1))
- return fold (build2 (MINUS_EXPR, type, negate_expr (arg1),
- TREE_OPERAND (arg0, 0)));
+ return fold_build2 (MINUS_EXPR, type, negate_expr (arg1),
+ TREE_OPERAND (arg0, 0));
/* Convert -A - 1 to ~A. */
if (INTEGRAL_TYPE_P (type)
&& TREE_CODE (arg0) == NEGATE_EXPR
&& integer_onep (arg1))
- return fold (build1 (BIT_NOT_EXPR, type, TREE_OPERAND (arg0, 0)));
+ return fold_build1 (BIT_NOT_EXPR, type, TREE_OPERAND (arg0, 0));
/* Convert -1 - A to ~A. */
if (INTEGRAL_TYPE_P (type)
&& integer_all_onesp (arg0))
- return fold (build1 (BIT_NOT_EXPR, type, arg1));
+ return fold_build1 (BIT_NOT_EXPR, type, arg1);
if (TREE_CODE (type) == COMPLEX_TYPE)
{
@@ -7692,15 +7700,15 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
&& TREE_CODE (arg1) == BIT_AND_EXPR)
{
if (operand_equal_p (arg0, TREE_OPERAND (arg1, 1), 0))
- return fold (build2 (BIT_AND_EXPR, type,
- fold (build1 (BIT_NOT_EXPR, type,
- TREE_OPERAND (arg1, 0))),
- arg0));
+ return fold_build2 (BIT_AND_EXPR, type,
+ fold_build1 (BIT_NOT_EXPR, type,
+ TREE_OPERAND (arg1, 0)),
+ arg0);
if (operand_equal_p (arg0, TREE_OPERAND (arg1, 0), 0))
- return fold (build2 (BIT_AND_EXPR, type,
- fold (build1 (BIT_NOT_EXPR, type,
- TREE_OPERAND (arg1, 1))),
- arg0));
+ return fold_build2 (BIT_AND_EXPR, type,
+ fold_build1 (BIT_NOT_EXPR, type,
+ TREE_OPERAND (arg1, 1)),
+ arg0);
}
/* Fold (A & ~B) - (A & B) into (A ^ B) - B, where B is
@@ -7712,13 +7720,13 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
{
tree mask0 = TREE_OPERAND (arg0, 1);
tree mask1 = TREE_OPERAND (arg1, 1);
- tree tem = fold (build1 (BIT_NOT_EXPR, type, mask0));
+ tree tem = fold_build1 (BIT_NOT_EXPR, type, mask0);
if (operand_equal_p (tem, mask1, 0))
{
- tem = fold (build2 (BIT_XOR_EXPR, type,
- TREE_OPERAND (arg0, 0), mask1));
- return fold (build2 (MINUS_EXPR, type, tem, mask1));
+ tem = fold_build2 (BIT_XOR_EXPR, type,
+ TREE_OPERAND (arg0, 0), mask1);
+ return fold_build2 (MINUS_EXPR, type, tem, mask1);
}
}
}
@@ -7750,7 +7758,7 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
&& (TREE_CODE (arg1) != REAL_CST
|| REAL_VALUE_NEGATIVE (TREE_REAL_CST (arg1))))
|| (INTEGRAL_TYPE_P (type) && flag_wrapv && !flag_trapv)))
- return fold (build2 (PLUS_EXPR, type, arg0, negate_expr (arg1)));
+ return fold_build2 (PLUS_EXPR, type, arg0, negate_expr (arg1));
/* Try folding difference of addresses. */
{
@@ -7780,19 +7788,19 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
/* (A * C) - (B * C) -> (A-B) * C. */
if (operand_equal_p (TREE_OPERAND (arg0, 1),
TREE_OPERAND (arg1, 1), 0))
- return fold (build2 (MULT_EXPR, type,
- fold (build2 (MINUS_EXPR, type,
- TREE_OPERAND (arg0, 0),
- TREE_OPERAND (arg1, 0))),
- TREE_OPERAND (arg0, 1)));
+ return fold_build2 (MULT_EXPR, type,
+ fold_build2 (MINUS_EXPR, type,
+ TREE_OPERAND (arg0, 0),
+ TREE_OPERAND (arg1, 0)),
+ TREE_OPERAND (arg0, 1));
/* (A * C1) - (A * C2) -> A * (C1-C2). */
if (operand_equal_p (TREE_OPERAND (arg0, 0),
TREE_OPERAND (arg1, 0), 0))
- return fold (build2 (MULT_EXPR, type,
- TREE_OPERAND (arg0, 0),
- fold (build2 (MINUS_EXPR, type,
- TREE_OPERAND (arg0, 1),
- TREE_OPERAND (arg1, 1)))));
+ return fold_build2 (MULT_EXPR, type,
+ TREE_OPERAND (arg0, 0),
+ fold_build2 (MINUS_EXPR, type,
+ TREE_OPERAND (arg0, 1),
+ TREE_OPERAND (arg1, 1)));
}
goto associate;
@@ -7800,13 +7808,13 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
case MULT_EXPR:
/* (-A) * (-B) -> A * B */
if (TREE_CODE (arg0) == NEGATE_EXPR && negate_expr_p (arg1))
- return fold (build2 (MULT_EXPR, type,
- TREE_OPERAND (arg0, 0),
- negate_expr (arg1)));
+ return fold_build2 (MULT_EXPR, type,
+ TREE_OPERAND (arg0, 0),
+ negate_expr (arg1));
if (TREE_CODE (arg1) == NEGATE_EXPR && negate_expr_p (arg0))
- return fold (build2 (MULT_EXPR, type,
- negate_expr (arg0),
- TREE_OPERAND (arg1, 0)));
+ return fold_build2 (MULT_EXPR, type,
+ negate_expr (arg0),
+ TREE_OPERAND (arg1, 0));
if (TREE_CODE (type) == COMPLEX_TYPE)
{
@@ -7828,12 +7836,12 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
/* (a * (1 << b)) is (a << b) */
if (TREE_CODE (arg1) == LSHIFT_EXPR
&& integer_onep (TREE_OPERAND (arg1, 0)))
- return fold (build2 (LSHIFT_EXPR, type, arg0,
- TREE_OPERAND (arg1, 1)));
+ return fold_build2 (LSHIFT_EXPR, type, arg0,
+ TREE_OPERAND (arg1, 1));
if (TREE_CODE (arg0) == LSHIFT_EXPR
&& integer_onep (TREE_OPERAND (arg0, 0)))
- return fold (build2 (LSHIFT_EXPR, type, arg1,
- TREE_OPERAND (arg0, 1)));
+ return fold_build2 (LSHIFT_EXPR, type, arg1,
+ TREE_OPERAND (arg0, 1));
if (TREE_CODE (arg1) == INTEGER_CST
&& 0 != (tem = extract_muldiv (op0,
@@ -7871,8 +7879,8 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
tree tem = const_binop (MULT_EXPR, TREE_OPERAND (arg0, 0),
arg1, 0);
if (tem)
- return fold (build2 (RDIV_EXPR, type, tem,
- TREE_OPERAND (arg0, 1)));
+ return fold_build2 (RDIV_EXPR, type, tem,
+ TREE_OPERAND (arg0, 1));
}
/* Strip sign operations from X in X*X, i.e. -Y*-Y -> Y*Y. */
@@ -7882,7 +7890,7 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
if (tem != NULL_TREE)
{
tem = fold_convert (type, tem);
- return fold (build2 (MULT_EXPR, type, tem, tem));
+ return fold_build2 (MULT_EXPR, type, tem, tem);
}
}
@@ -7906,7 +7914,7 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
/* Optimize root(x)*root(y) as root(x*y). */
rootfn = TREE_OPERAND (TREE_OPERAND (arg0, 0), 0);
- arg = fold (build2 (MULT_EXPR, type, arg00, arg10));
+ arg = fold_build2 (MULT_EXPR, type, arg00, arg10);
arglist = build_tree_list (NULL_TREE, arg);
return build_function_call_expr (rootfn, arglist);
}
@@ -7949,7 +7957,7 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
if (operand_equal_p (arg00, arg10, 0))
{
tree powfn = TREE_OPERAND (TREE_OPERAND (arg0, 0), 0);
- tree arg = fold (build2 (PLUS_EXPR, type, arg01, arg11));
+ tree arg = fold_build2 (PLUS_EXPR, type, arg01, arg11);
tree arglist = tree_cons (NULL_TREE, arg00,
build_tree_list (NULL_TREE,
arg));
@@ -8082,10 +8090,10 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
if (TREE_CODE (arg0) == BIT_NOT_EXPR
&& TREE_CODE (arg1) == BIT_NOT_EXPR)
{
- return fold (build1 (BIT_NOT_EXPR, type,
- build2 (BIT_AND_EXPR, type,
- TREE_OPERAND (arg0, 0),
- TREE_OPERAND (arg1, 0))));
+ return fold_build1 (BIT_NOT_EXPR, type,
+ build2 (BIT_AND_EXPR, type,
+ TREE_OPERAND (arg0, 0),
+ TREE_OPERAND (arg1, 0)));
}
/* See if this can be simplified into a rotate first. If that
@@ -8096,7 +8104,7 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
if (integer_zerop (arg1))
return non_lvalue (fold_convert (type, arg0));
if (integer_all_onesp (arg1))
- return fold (build1 (BIT_NOT_EXPR, type, arg0));
+ return fold_build1 (BIT_NOT_EXPR, type, arg0);
if (operand_equal_p (arg0, arg1, 0))
return omit_one_operand (type, integer_zero_node, arg0);
@@ -8181,10 +8189,10 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
if (TREE_CODE (arg0) == BIT_NOT_EXPR
&& TREE_CODE (arg1) == BIT_NOT_EXPR)
{
- return fold (build1 (BIT_NOT_EXPR, type,
- build2 (BIT_IOR_EXPR, type,
- TREE_OPERAND (arg0, 0),
- TREE_OPERAND (arg1, 0))));
+ return fold_build1 (BIT_NOT_EXPR, type,
+ build2 (BIT_IOR_EXPR, type,
+ TREE_OPERAND (arg0, 0),
+ TREE_OPERAND (arg1, 0)));
}
goto associate;
@@ -8199,13 +8207,13 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
/* (-A) / (-B) -> A / B */
if (TREE_CODE (arg0) == NEGATE_EXPR && negate_expr_p (arg1))
- return fold (build2 (RDIV_EXPR, type,
- TREE_OPERAND (arg0, 0),
- negate_expr (arg1)));
+ return fold_build2 (RDIV_EXPR, type,
+ TREE_OPERAND (arg0, 0),
+ negate_expr (arg1));
if (TREE_CODE (arg1) == NEGATE_EXPR && negate_expr_p (arg0))
- return fold (build2 (RDIV_EXPR, type,
- negate_expr (arg0),
- TREE_OPERAND (arg1, 0)));
+ return fold_build2 (RDIV_EXPR, type,
+ negate_expr (arg0),
+ TREE_OPERAND (arg1, 0));
/* In IEEE floating point, x/1 is not equivalent to x for snans. */
if (!HONOR_SNANS (TYPE_MODE (TREE_TYPE (arg0)))
@@ -8227,7 +8235,7 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
if (flag_unsafe_math_optimizations
&& 0 != (tem = const_binop (code, build_real (type, dconst1),
arg1, 0)))
- return fold (build2 (MULT_EXPR, type, arg0, tem));
+ return fold_build2 (MULT_EXPR, type, arg0, tem);
/* Find the reciprocal if optimizing and the result is exact. */
if (optimize)
{
@@ -8236,24 +8244,24 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
if (exact_real_inverse (TYPE_MODE(TREE_TYPE(arg0)), &r))
{
tem = build_real (type, r);
- return fold (build2 (MULT_EXPR, type, arg0, tem));
+ return fold_build2 (MULT_EXPR, type, arg0, tem);
}
}
}
/* Convert A/B/C to A/(B*C). */
if (flag_unsafe_math_optimizations
&& TREE_CODE (arg0) == RDIV_EXPR)
- return fold (build2 (RDIV_EXPR, type, TREE_OPERAND (arg0, 0),
- fold (build2 (MULT_EXPR, type,
- TREE_OPERAND (arg0, 1), arg1))));
+ return fold_build2 (RDIV_EXPR, type, TREE_OPERAND (arg0, 0),
+ fold_build2 (MULT_EXPR, type,
+ TREE_OPERAND (arg0, 1), arg1));
/* Convert A/(B/C) to (A/B)*C. */
if (flag_unsafe_math_optimizations
&& TREE_CODE (arg1) == RDIV_EXPR)
- return fold (build2 (MULT_EXPR, type,
- fold (build2 (RDIV_EXPR, type, arg0,
- TREE_OPERAND (arg1, 0))),
- TREE_OPERAND (arg1, 1)));
+ return fold_build2 (MULT_EXPR, type,
+ fold_build2 (RDIV_EXPR, type, arg0,
+ TREE_OPERAND (arg1, 0)),
+ TREE_OPERAND (arg1, 1));
/* Convert C1/(X*C2) into (C1/C2)/X. */
if (flag_unsafe_math_optimizations
@@ -8264,8 +8272,8 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
tree tem = const_binop (RDIV_EXPR, arg0,
TREE_OPERAND (arg1, 1), 0);
if (tem)
- return fold (build2 (RDIV_EXPR, type, tem,
- TREE_OPERAND (arg1, 0)));
+ return fold_build2 (RDIV_EXPR, type, tem,
+ TREE_OPERAND (arg1, 0));
}
if (TREE_CODE (type) == COMPLEX_TYPE)
@@ -8286,7 +8294,7 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
tree arglist = build_tree_list (NULL_TREE,
fold_convert (type, arg));
arg1 = build_function_call_expr (expfn, arglist);
- return fold (build2 (MULT_EXPR, type, arg0, arg1));
+ return fold_build2 (MULT_EXPR, type, arg0, arg1);
}
/* Optimize x/pow(y,z) into x*pow(y,-z). */
@@ -8301,7 +8309,7 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
tree arglist = tree_cons(NULL_TREE, arg10,
build_tree_list (NULL_TREE, neg11));
arg1 = build_function_call_expr (powfn, arglist);
- return fold (build2 (MULT_EXPR, type, arg0, arg1));
+ return fold_build2 (MULT_EXPR, type, arg0, arg1);
}
}
@@ -8337,8 +8345,8 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
{
tree tmp = TREE_OPERAND (arg0, 1);
tmp = build_function_call_expr (tanfn, tmp);
- return fold (build2 (RDIV_EXPR, type,
- build_real (type, dconst1), tmp));
+ return fold_build2 (RDIV_EXPR, type,
+ build_real (type, dconst1), tmp);
}
}
@@ -8392,7 +8400,7 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
after the last round to changes to the DIV code in expmed.c. */
if ((code == CEIL_DIV_EXPR || code == FLOOR_DIV_EXPR)
&& multiple_of_p (type, arg0, arg1))
- return fold (build2 (EXACT_DIV_EXPR, type, arg0, arg1));
+ return fold_build2 (EXACT_DIV_EXPR, type, arg0, arg1);
if (TREE_CODE (arg1) == INTEGER_CST
&& 0 != (tem = extract_muldiv (op0, arg1, code, NULL_TREE)))
@@ -8456,8 +8464,8 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
}
mask = build_int_cst_wide (type, low, high);
- return fold (build2 (BIT_AND_EXPR, type,
- fold_convert (type, arg0), mask));
+ return fold_build2 (BIT_AND_EXPR, type,
+ fold_convert (type, arg0), mask);
}
/* X % -C is the same as X % C. */
@@ -8468,16 +8476,16 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
&& !flag_trapv
/* Avoid this transformation if C is INT_MIN, i.e. C == -C. */
&& !sign_bit_p (arg1, arg1))
- return fold (build2 (code, type, fold_convert (type, arg0),
- fold_convert (type, negate_expr (arg1))));
+ return fold_build2 (code, type, fold_convert (type, arg0),
+ fold_convert (type, negate_expr (arg1)));
/* X % -Y is the same as X % Y. */
if (code == TRUNC_MOD_EXPR
&& !TYPE_UNSIGNED (type)
&& TREE_CODE (arg1) == NEGATE_EXPR
&& !flag_trapv)
- return fold (build2 (code, type, fold_convert (type, arg0),
- fold_convert (type, TREE_OPERAND (arg1, 0))));
+ return fold_build2 (code, type, fold_convert (type, arg0),
+ fold_convert (type, TREE_OPERAND (arg1, 0)));
if (TREE_CODE (arg1) == INTEGER_CST
&& 0 != (tem = extract_muldiv (op0, arg1, code, NULL_TREE)))
@@ -8516,7 +8524,7 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
GET_MODE_BITSIZE (TYPE_MODE (type)));
tem = fold_convert (TREE_TYPE (arg1), tem);
tem = const_binop (MINUS_EXPR, tem, arg1, 0);
- return fold (build2 (RROTATE_EXPR, type, arg0, tem));
+ return fold_build2 (RROTATE_EXPR, type, arg0, tem);
}
/* If we have a rotate of a bit operation with the rotate count and
@@ -8527,11 +8535,11 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
|| TREE_CODE (arg0) == BIT_IOR_EXPR
|| TREE_CODE (arg0) == BIT_XOR_EXPR)
&& TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST)
- return fold (build2 (TREE_CODE (arg0), type,
- fold (build2 (code, type,
- TREE_OPERAND (arg0, 0), arg1)),
- fold (build2 (code, type,
- TREE_OPERAND (arg0, 1), arg1))));
+ return fold_build2 (TREE_CODE (arg0), type,
+ fold_build2 (code, type,
+ TREE_OPERAND (arg0, 0), arg1),
+ fold_build2 (code, type,
+ TREE_OPERAND (arg0, 1), arg1));
/* Two consecutive rotates adding up to the width of the mode can
be ignored. */
@@ -8606,11 +8614,11 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
{
tem = fold_to_nonsharp_ineq_using_bound (arg0, arg1);
if (tem)
- return fold (build2 (code, type, tem, arg1));
+ return fold_build2 (code, type, tem, arg1);
tem = fold_to_nonsharp_ineq_using_bound (arg1, arg0);
if (tem)
- return fold (build2 (code, type, arg0, tem));
+ return fold_build2 (code, type, arg0, tem);
}
truth_andor:
@@ -8641,23 +8649,23 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
|| code == TRUTH_OR_EXPR));
if (operand_equal_p (a00, a10, 0))
- return fold (build2 (TREE_CODE (arg0), type, a00,
- fold (build2 (code, type, a01, a11))));
+ return fold_build2 (TREE_CODE (arg0), type, a00,
+ fold_build2 (code, type, a01, a11));
else if (commutative && operand_equal_p (a00, a11, 0))
- return fold (build2 (TREE_CODE (arg0), type, a00,
- fold (build2 (code, type, a01, a10))));
+ return fold_build2 (TREE_CODE (arg0), type, a00,
+ fold_build2 (code, type, a01, a10));
else if (commutative && operand_equal_p (a01, a10, 0))
- return fold (build2 (TREE_CODE (arg0), type, a01,
- fold (build2 (code, type, a00, a11))));
+ return fold_build2 (TREE_CODE (arg0), type, a01,
+ fold_build2 (code, type, a00, a11));
/* This case if tricky because we must either have commutative
operators or else A10 must not have side-effects. */
else if ((commutative || ! TREE_SIDE_EFFECTS (a10))
&& operand_equal_p (a01, a11, 0))
- return fold (build2 (TREE_CODE (arg0), type,
- fold (build2 (code, type, a00, a10)),
- a01));
+ return fold_build2 (TREE_CODE (arg0), type,
+ fold_build2 (code, type, a00, a10),
+ a01);
}
/* See if we can build a range comparison. */
@@ -8670,7 +8678,7 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
if (TREE_CODE (arg0) == code
&& 0 != (tem = fold_truthop (code, type,
TREE_OPERAND (arg0, 1), arg1)))
- return fold (build2 (code, type, TREE_OPERAND (arg0, 0), tem));
+ return fold_build2 (code, type, TREE_OPERAND (arg0, 0), tem);
if ((tem = fold_truthop (code, type, arg0, arg1)) != 0)
return tem;
@@ -8721,7 +8729,7 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
{
/* Only call invert_truthvalue if operand is a truth value. */
if (TREE_CODE (TREE_TYPE (arg0)) != BOOLEAN_TYPE)
- tem = fold (build1 (TRUTH_NOT_EXPR, TREE_TYPE (arg0), arg0));
+ tem = fold_build1 (TRUTH_NOT_EXPR, TREE_TYPE (arg0), arg0);
else
tem = invert_truthvalue (arg0);
return non_lvalue (fold_convert (type, tem));
@@ -8750,7 +8758,7 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
case GE_EXPR:
/* If one arg is a real or integer constant, put it last. */
if (tree_swap_operands_p (arg0, arg1, true))
- return fold (build2 (swap_tree_comparison (code), type, arg1, arg0));
+ return fold_build2 (swap_tree_comparison (code), type, arg1, arg0);
/* If this is an equality comparison of the address of a non-weak
object against zero, then we know the result. */
@@ -8804,7 +8812,7 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
offset1 = build_int_cst (TREE_TYPE (offset0), 0);
if (TREE_TYPE (offset0) == TREE_TYPE (offset1))
- return fold (build2 (code, type, offset0, offset1));
+ return fold_build2 (code, type, offset0, offset1);
}
}
@@ -8819,14 +8827,14 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
/* Fold (double)float1 CMP (double)float2 into float1 CMP float2. */
if (TYPE_PRECISION (newtype) < TYPE_PRECISION (TREE_TYPE (arg0)))
- return fold (build2 (code, type, fold_convert (newtype, targ0),
- fold_convert (newtype, targ1)));
+ return fold_build2 (code, type, fold_convert (newtype, targ0),
+ fold_convert (newtype, targ1));
/* (-a) CMP (-b) -> b CMP a */
if (TREE_CODE (arg0) == NEGATE_EXPR
&& TREE_CODE (arg1) == NEGATE_EXPR)
- return fold (build2 (code, type, TREE_OPERAND (arg1, 0),
- TREE_OPERAND (arg0, 0)));
+ return fold_build2 (code, type, TREE_OPERAND (arg1, 0),
+ TREE_OPERAND (arg0, 0));
if (TREE_CODE (arg1) == REAL_CST)
{
@@ -8836,16 +8844,16 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
/* (-a) CMP CST -> a swap(CMP) (-CST) */
if (TREE_CODE (arg0) == NEGATE_EXPR)
return
- fold (build2 (swap_tree_comparison (code), type,
- TREE_OPERAND (arg0, 0),
- build_real (TREE_TYPE (arg1),
- REAL_VALUE_NEGATE (cst))));
+ fold_build2 (swap_tree_comparison (code), type,
+ TREE_OPERAND (arg0, 0),
+ build_real (TREE_TYPE (arg1),
+ REAL_VALUE_NEGATE (cst)));
/* IEEE doesn't distinguish +0 and -0 in comparisons. */
/* a CMP (-0) -> a CMP 0 */
if (REAL_VALUE_MINUS_ZERO (cst))
- return fold (build2 (code, type, arg0,
- build_real (TREE_TYPE (arg1), dconst0)));
+ return fold_build2 (code, type, arg0,
+ build_real (TREE_TYPE (arg1), dconst0));
/* x != NaN is always true, other ops are always false. */
if (REAL_VALUE_ISNAN (cst)
@@ -8877,7 +8885,7 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
? MINUS_EXPR : PLUS_EXPR,
arg1, TREE_OPERAND (arg0, 1), 0))
&& ! TREE_CONSTANT_OVERFLOW (tem))
- return fold (build2 (code, type, TREE_OPERAND (arg0, 0), tem));
+ return fold_build2 (code, type, TREE_OPERAND (arg0, 0), tem);
/* Likewise, we can simplify a comparison of a real constant with
a MINUS_EXPR whose first operand is also a real constant, i.e.
@@ -8889,8 +8897,8 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
&& 0 != (tem = const_binop (MINUS_EXPR, TREE_OPERAND (arg0, 0),
arg1, 0))
&& ! TREE_CONSTANT_OVERFLOW (tem))
- return fold (build2 (swap_tree_comparison (code), type,
- TREE_OPERAND (arg0, 1), tem));
+ return fold_build2 (swap_tree_comparison (code), type,
+ TREE_OPERAND (arg0, 1), tem);
/* Fold comparisons against built-in math functions. */
if (TREE_CODE (arg1) == REAL_CST
@@ -8924,16 +8932,16 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
if (TREE_CODE (arg0) == POSTINCREMENT_EXPR)
{
- newconst = fold (build2 (PLUS_EXPR, TREE_TYPE (arg0),
- arg1, TREE_OPERAND (arg0, 1)));
+ newconst = fold_build2 (PLUS_EXPR, TREE_TYPE (arg0),
+ arg1, TREE_OPERAND (arg0, 1));
varop = build2 (PREINCREMENT_EXPR, TREE_TYPE (arg0),
TREE_OPERAND (arg0, 0),
TREE_OPERAND (arg0, 1));
}
else
{
- newconst = fold (build2 (MINUS_EXPR, TREE_TYPE (arg0),
- arg1, TREE_OPERAND (arg0, 1)));
+ newconst = fold_build2 (MINUS_EXPR, TREE_TYPE (arg0),
+ arg1, TREE_OPERAND (arg0, 1));
varop = build2 (PREDECREMENT_EXPR, TREE_TYPE (arg0),
TREE_OPERAND (arg0, 0),
TREE_OPERAND (arg0, 1));
@@ -8954,8 +8962,8 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
/* First check whether the comparison would come out
always the same. If we don't do that we would
change the meaning with the masking. */
- folded_compare = fold (build2 (code, type,
- TREE_OPERAND (varop, 0), arg1));
+ folded_compare = fold_build2 (code, type,
+ TREE_OPERAND (varop, 0), arg1);
if (integer_zerop (folded_compare)
|| integer_onep (folded_compare))
return omit_one_operand (type, folded_compare, varop);
@@ -8963,13 +8971,13 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
shift = build_int_cst (NULL_TREE,
TYPE_PRECISION (TREE_TYPE (varop)) - size);
shift = fold_convert (TREE_TYPE (varop), shift);
- newconst = fold (build2 (LSHIFT_EXPR, TREE_TYPE (varop),
- newconst, shift));
- newconst = fold (build2 (RSHIFT_EXPR, TREE_TYPE (varop),
- newconst, shift));
+ newconst = fold_build2 (LSHIFT_EXPR, TREE_TYPE (varop),
+ newconst, shift);
+ newconst = fold_build2 (RSHIFT_EXPR, TREE_TYPE (varop),
+ newconst, shift);
}
- return fold (build2 (code, type, varop, newconst));
+ return fold_build2 (code, type, varop, newconst);
}
/* Change X >= C to X > (C - 1) and X < C to X <= (C - 1) if C > 0.
@@ -8983,11 +8991,11 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
{
case GE_EXPR:
arg1 = const_binop (MINUS_EXPR, arg1, integer_one_node, 0);
- return fold (build2 (GT_EXPR, type, arg0, arg1));
+ return fold_build2 (GT_EXPR, type, arg0, arg1);
case LT_EXPR:
arg1 = const_binop (MINUS_EXPR, arg1, integer_one_node, 0);
- return fold (build2 (LE_EXPR, type, arg0, arg1));
+ return fold_build2 (LE_EXPR, type, arg0, arg1);
default:
break;
@@ -9061,13 +9069,13 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
return omit_one_operand (type, integer_zero_node, arg0);
case GE_EXPR:
- return fold (build2 (EQ_EXPR, type, arg0, arg1));
+ return fold_build2 (EQ_EXPR, type, arg0, arg1);
case LE_EXPR:
return omit_one_operand (type, integer_one_node, arg0);
case LT_EXPR:
- return fold (build2 (NE_EXPR, type, arg0, arg1));
+ return fold_build2 (NE_EXPR, type, arg0, arg1);
/* The GE_EXPR and LT_EXPR cases above are not normally
reached because of previous transformations. */
@@ -9082,10 +9090,10 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
{
case GT_EXPR:
arg1 = const_binop (PLUS_EXPR, arg1, integer_one_node, 0);
- return fold (build2 (EQ_EXPR, type, arg0, arg1));
+ return fold_build2 (EQ_EXPR, type, arg0, arg1);
case LE_EXPR:
arg1 = const_binop (PLUS_EXPR, arg1, integer_one_node, 0);
- return fold (build2 (NE_EXPR, type, arg0, arg1));
+ return fold_build2 (NE_EXPR, type, arg0, arg1);
default:
break;
}
@@ -9098,13 +9106,13 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
return omit_one_operand (type, integer_zero_node, arg0);
case LE_EXPR:
- return fold (build2 (EQ_EXPR, type, arg0, arg1));
+ return fold_build2 (EQ_EXPR, type, arg0, arg1);
case GE_EXPR:
return omit_one_operand (type, integer_one_node, arg0);
case GT_EXPR:
- return fold (build2 (NE_EXPR, type, arg0, arg1));
+ return fold_build2 (NE_EXPR, type, arg0, arg1);
default:
break;
@@ -9116,10 +9124,10 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
{
case GE_EXPR:
arg1 = const_binop (MINUS_EXPR, arg1, integer_one_node, 0);
- return fold (build2 (NE_EXPR, type, arg0, arg1));
+ return fold_build2 (NE_EXPR, type, arg0, arg1);
case LT_EXPR:
arg1 = const_binop (MINUS_EXPR, arg1, integer_one_node, 0);
- return fold (build2 (EQ_EXPR, type, arg0, arg1));
+ return fold_build2 (EQ_EXPR, type, arg0, arg1);
default:
break;
}
@@ -9159,7 +9167,7 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
? MINUS_EXPR : PLUS_EXPR,
arg1, TREE_OPERAND (arg0, 1), 0))
&& ! TREE_CONSTANT_OVERFLOW (tem))
- return fold (build2 (code, type, TREE_OPERAND (arg0, 0), tem));
+ return fold_build2 (code, type, TREE_OPERAND (arg0, 0), tem);
/* Similarly for a NEGATE_EXPR. */
else if ((code == EQ_EXPR || code == NE_EXPR)
@@ -9168,14 +9176,14 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
&& 0 != (tem = negate_expr (arg1))
&& TREE_CODE (tem) == INTEGER_CST
&& ! TREE_CONSTANT_OVERFLOW (tem))
- return fold (build2 (code, type, TREE_OPERAND (arg0, 0), tem));
+ return fold_build2 (code, type, TREE_OPERAND (arg0, 0), tem);
/* If we have X - Y == 0, we can convert that to X == Y and similarly
for !=. Don't do this for ordered comparisons due to overflow. */
else if ((code == NE_EXPR || code == EQ_EXPR)
&& integer_zerop (arg1) && TREE_CODE (arg0) == MINUS_EXPR)
- return fold (build2 (code, type,
- TREE_OPERAND (arg0, 0), TREE_OPERAND (arg0, 1)));
+ return fold_build2 (code, type,
+ TREE_OPERAND (arg0, 0), TREE_OPERAND (arg0, 1));
else if (TREE_CODE (TREE_TYPE (arg0)) == INTEGER_TYPE
&& (TREE_CODE (arg0) == NOP_EXPR
@@ -9219,11 +9227,11 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
&& (0 != (tem = negate_expr (arg1)))
&& TREE_CODE (tem) == INTEGER_CST
&& ! TREE_CONSTANT_OVERFLOW (tem))
- return fold (build2 (TRUTH_ANDIF_EXPR, type,
- build2 (GE_EXPR, type,
- TREE_OPERAND (arg0, 0), tem),
- build2 (LE_EXPR, type,
- TREE_OPERAND (arg0, 0), arg1)));
+ return fold_build2 (TRUTH_ANDIF_EXPR, type,
+ build2 (GE_EXPR, type,
+ TREE_OPERAND (arg0, 0), tem),
+ build2 (LE_EXPR, type,
+ TREE_OPERAND (arg0, 0), arg1));
/* Convert ABS_EXPR<x> >= 0 to true. */
else if (code == GE_EXPR
@@ -9243,7 +9251,7 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
else if ((code == EQ_EXPR || code == NE_EXPR)
&& TREE_CODE (arg0) == ABS_EXPR
&& (integer_zerop (arg1) || real_zerop (arg1)))
- return fold (build2 (code, type, TREE_OPERAND (arg0, 0), arg1));
+ return fold_build2 (code, type, TREE_OPERAND (arg0, 0), arg1);
/* If this is an EQ or NE comparison with zero and ARG0 is
(1 << foo) & bar, convert it to (bar >> foo) & 1. Both require
@@ -9258,23 +9266,23 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
if (TREE_CODE (arg00) == LSHIFT_EXPR
&& integer_onep (TREE_OPERAND (arg00, 0)))
return
- fold (build2 (code, type,
- build2 (BIT_AND_EXPR, TREE_TYPE (arg0),
- build2 (RSHIFT_EXPR, TREE_TYPE (arg00),
- arg01, TREE_OPERAND (arg00, 1)),
- fold_convert (TREE_TYPE (arg0),
- integer_one_node)),
- arg1));
+ fold_build2 (code, type,
+ build2 (BIT_AND_EXPR, TREE_TYPE (arg0),
+ build2 (RSHIFT_EXPR, TREE_TYPE (arg00),
+ arg01, TREE_OPERAND (arg00, 1)),
+ fold_convert (TREE_TYPE (arg0),
+ integer_one_node)),
+ arg1);
else if (TREE_CODE (TREE_OPERAND (arg0, 1)) == LSHIFT_EXPR
&& integer_onep (TREE_OPERAND (TREE_OPERAND (arg0, 1), 0)))
return
- fold (build2 (code, type,
- build2 (BIT_AND_EXPR, TREE_TYPE (arg0),
- build2 (RSHIFT_EXPR, TREE_TYPE (arg01),
- arg00, TREE_OPERAND (arg01, 1)),
- fold_convert (TREE_TYPE (arg0),
- integer_one_node)),
- arg1));
+ fold_build2 (code, type,
+ build2 (BIT_AND_EXPR, TREE_TYPE (arg0),
+ build2 (RSHIFT_EXPR, TREE_TYPE (arg01),
+ arg00, TREE_OPERAND (arg01, 1)),
+ fold_convert (TREE_TYPE (arg0),
+ integer_one_node)),
+ arg1);
}
/* If this is an NE or EQ comparison of zero against the result of a
@@ -9290,14 +9298,14 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
&& integer_pow2p (TREE_OPERAND (arg0, 1)))
{
tree newtype = lang_hooks.types.unsigned_type (TREE_TYPE (arg0));
- tree newmod = fold (build2 (TREE_CODE (arg0), newtype,
- fold_convert (newtype,
- TREE_OPERAND (arg0, 0)),
- fold_convert (newtype,
- TREE_OPERAND (arg0, 1))));
+ tree newmod = fold_build2 (TREE_CODE (arg0), newtype,
+ fold_convert (newtype,
+ TREE_OPERAND (arg0, 0)),
+ fold_convert (newtype,
+ TREE_OPERAND (arg0, 1)));
- return fold (build2 (code, type, newmod,
- fold_convert (newtype, arg1)));
+ return fold_build2 (code, type, newmod,
+ fold_convert (newtype, arg1));
}
/* If this is an NE comparison of zero with an AND of one, remove the
@@ -9313,9 +9321,9 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
&& TREE_CODE (arg0) == BIT_AND_EXPR
&& integer_pow2p (TREE_OPERAND (arg0, 1))
&& operand_equal_p (TREE_OPERAND (arg0, 1), arg1, 0))
- return fold (build2 (code == EQ_EXPR ? NE_EXPR : EQ_EXPR, type,
- arg0, fold_convert (TREE_TYPE (arg0),
- integer_zero_node)));
+ return fold_build2 (code == EQ_EXPR ? NE_EXPR : EQ_EXPR, type,
+ arg0, fold_convert (TREE_TYPE (arg0),
+ integer_zero_node));
/* If we have (A & C) != 0 or (A & C) == 0 and C is a power of
2, then fold the expression into shifts and logical operations. */
@@ -9330,11 +9338,11 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
&& TREE_CODE (arg1) == INTEGER_CST
&& TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST)
{
- tree notc = fold (build1 (BIT_NOT_EXPR,
- TREE_TYPE (TREE_OPERAND (arg0, 1)),
- TREE_OPERAND (arg0, 1)));
- tree dandnotc = fold (build2 (BIT_AND_EXPR, TREE_TYPE (arg0),
- arg1, notc));
+ tree notc = fold_build1 (BIT_NOT_EXPR,
+ TREE_TYPE (TREE_OPERAND (arg0, 1)),
+ TREE_OPERAND (arg0, 1));
+ tree dandnotc = fold_build2 (BIT_AND_EXPR, TREE_TYPE (arg0),
+ arg1, notc);
tree rslt = code == EQ_EXPR ? integer_zero_node : integer_one_node;
if (integer_nonzerop (dandnotc))
return omit_one_operand (type, rslt, arg0);
@@ -9347,9 +9355,9 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
&& TREE_CODE (arg1) == INTEGER_CST
&& TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST)
{
- tree notd = fold (build1 (BIT_NOT_EXPR, TREE_TYPE (arg1), arg1));
- tree candnotd = fold (build2 (BIT_AND_EXPR, TREE_TYPE (arg0),
- TREE_OPERAND (arg0, 1), notd));
+ tree notd = fold_build1 (BIT_NOT_EXPR, TREE_TYPE (arg1), arg1);
+ tree candnotd = fold_build2 (BIT_AND_EXPR, TREE_TYPE (arg0),
+ TREE_OPERAND (arg0, 1), notd);
tree rslt = code == EQ_EXPR ? integer_zero_node : integer_one_node;
if (integer_nonzerop (candnotd))
return omit_one_operand (type, rslt, arg0);
@@ -9397,7 +9405,7 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
if (! FLOAT_TYPE_P (TREE_TYPE (arg0))
|| ! HONOR_NANS (TYPE_MODE (TREE_TYPE (arg0))))
return constant_boolean_node (1, type);
- return fold (build2 (EQ_EXPR, type, arg0, arg1));
+ return fold_build2 (EQ_EXPR, type, arg0, arg1);
case NE_EXPR:
/* For NE, we can only do this simplification if integer
@@ -9451,20 +9459,20 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
was the same as ARG1. */
tree high_result
- = fold (build2 (code, type,
- eval_subst (arg0, cval1, maxval,
- cval2, minval),
- arg1));
+ = fold_build2 (code, type,
+ eval_subst (arg0, cval1, maxval,
+ cval2, minval),
+ arg1);
tree equal_result
- = fold (build2 (code, type,
- eval_subst (arg0, cval1, maxval,
- cval2, maxval),
- arg1));
+ = fold_build2 (code, type,
+ eval_subst (arg0, cval1, maxval,
+ cval2, maxval),
+ arg1);
tree low_result
- = fold (build2 (code, type,
- eval_subst (arg0, cval1, minval,
- cval2, maxval),
- arg1));
+ = fold_build2 (code, type,
+ eval_subst (arg0, cval1, minval,
+ cval2, maxval),
+ arg1);
/* All three of these results should be 0 or 1. Confirm they
are. Then use those values to select the proper code
@@ -9548,16 +9556,16 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
arg0 = save_expr (arg0);
arg1 = save_expr (arg1);
- real0 = fold (build1 (REALPART_EXPR, subtype, arg0));
- imag0 = fold (build1 (IMAGPART_EXPR, subtype, arg0));
- real1 = fold (build1 (REALPART_EXPR, subtype, arg1));
- imag1 = fold (build1 (IMAGPART_EXPR, subtype, arg1));
+ real0 = fold_build1 (REALPART_EXPR, subtype, arg0);
+ imag0 = fold_build1 (IMAGPART_EXPR, subtype, arg0);
+ real1 = fold_build1 (REALPART_EXPR, subtype, arg1);
+ imag1 = fold_build1 (IMAGPART_EXPR, subtype, arg1);
- return fold (build2 ((code == EQ_EXPR ? TRUTH_ANDIF_EXPR
- : TRUTH_ORIF_EXPR),
- type,
- fold (build2 (code, type, real0, real1)),
- fold (build2 (code, type, imag0, imag1))));
+ return fold_build2 ((code == EQ_EXPR ? TRUTH_ANDIF_EXPR
+ : TRUTH_ORIF_EXPR),
+ type,
+ fold_build2 (code, type, real0, real1),
+ fold_build2 (code, type, imag0, imag1));
}
/* Optimize comparisons of strlen vs zero to a compare of the
@@ -9579,11 +9587,11 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
&& (arglist = TREE_OPERAND (arg0, 1))
&& TREE_CODE (TREE_TYPE (TREE_VALUE (arglist))) == POINTER_TYPE
&& ! TREE_CHAIN (arglist))
- return fold (build2 (code, type,
- build1 (INDIRECT_REF, char_type_node,
- TREE_VALUE (arglist)),
- fold_convert (char_type_node,
- integer_zero_node)));
+ return fold_build2 (code, type,
+ build1 (INDIRECT_REF, char_type_node,
+ TREE_VALUE (arglist)),
+ fold_convert (char_type_node,
+ integer_zero_node));
}
/* We can fold X/C1 op C2 where C1 and C2 are integer constants
@@ -9667,8 +9675,8 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
newtype = TREE_TYPE (targ1);
if (TYPE_PRECISION (newtype) < TYPE_PRECISION (TREE_TYPE (arg0)))
- return fold (build2 (code, type, fold_convert (newtype, targ0),
- fold_convert (newtype, targ1)));
+ return fold_build2 (code, type, fold_convert (newtype, targ0),
+ fold_convert (newtype, targ1));
}
return NULL_TREE;
@@ -9693,28 +9701,20 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
} /* switch (code) */
}
-/* Fold a ternary expression EXPR. Return the folded expression if
- folding is successful. Otherwise, return the original
- expression. */
+/* Fold a ternary expression of code CODE and type TYPE with operands
+ OP0, OP1, and OP2. Return the folded expression if folding is
+ successful. Otherwise, return NULL_TREE. */
static tree
-fold_ternary (tree expr)
+fold_ternary (enum tree_code code, tree type, tree op0, tree op1, tree op2)
{
- const tree t = expr;
- const tree type = TREE_TYPE (expr);
tree tem;
- tree op0, op1, op2;
tree arg0 = NULL_TREE, arg1 = NULL_TREE;
- enum tree_code code = TREE_CODE (t);
enum tree_code_class kind = TREE_CODE_CLASS (code);
gcc_assert (IS_EXPR_CODE_CLASS (kind)
&& TREE_CODE_LENGTH (code) == 3);
- op0 = TREE_OPERAND (t, 0);
- op1 = TREE_OPERAND (t, 1);
- op2 = TREE_OPERAND (t, 2);
-
/* Strip any conversions that don't change the mode. This is safe
for every expression, except for a comparison expression because
its signedness is derived from its operands. So, in the latter
@@ -9807,7 +9807,7 @@ fold_ternary (tree expr)
tem = invert_truthvalue (arg0);
if (TREE_CODE (tem) != TRUTH_NOT_EXPR)
- return fold (build3 (code, type, tem, op2, op1));
+ return fold_build3 (code, type, tem, op2, op1);
}
/* Convert A ? 1 : 0 to simply A. */
@@ -9833,8 +9833,8 @@ fold_ternary (tree expr)
&& integer_zerop (TREE_OPERAND (arg0, 1))
&& integer_zerop (op2)
&& (tem = sign_bit_p (TREE_OPERAND (arg0, 0), arg1)))
- return fold_convert (type, fold (build2 (BIT_AND_EXPR,
- TREE_TYPE (tem), tem, arg1)));
+ return fold_convert (type, fold_build2 (BIT_AND_EXPR,
+ TREE_TYPE (tem), tem, arg1));
/* (A >> N) & 1 ? (1 << N) : 0 is simply A & (1 << N). A & 1 was
already handled above. */
@@ -9849,8 +9849,8 @@ fold_ternary (tree expr)
&& TREE_CODE (TREE_OPERAND (tem, 1)) == INTEGER_CST
&& (unsigned HOST_WIDE_INT) tree_log2 (arg1) ==
TREE_INT_CST_LOW (TREE_OPERAND (tem, 1)))
- return fold (build2 (BIT_AND_EXPR, type,
- TREE_OPERAND (tem, 0), arg1));
+ return fold_build2 (BIT_AND_EXPR, type,
+ TREE_OPERAND (tem, 0), arg1);
}
/* A & N ? N : 0 is simply A & N if N is a power of two. This
@@ -9871,7 +9871,7 @@ fold_ternary (tree expr)
if (integer_zerop (op2)
&& truth_value_p (TREE_CODE (arg0))
&& truth_value_p (TREE_CODE (arg1)))
- return fold (build2 (TRUTH_ANDIF_EXPR, type, arg0, arg1));
+ return fold_build2 (TRUTH_ANDIF_EXPR, type, arg0, arg1);
/* Convert A ? B : 1 into !A || B if A and B are truth values. */
if (integer_onep (op2)
@@ -9881,7 +9881,7 @@ fold_ternary (tree expr)
/* Only perform transformation if ARG0 is easily inverted. */
tem = invert_truthvalue (arg0);
if (TREE_CODE (tem) != TRUTH_NOT_EXPR)
- return fold (build2 (TRUTH_ORIF_EXPR, type, tem, arg1));
+ return fold_build2 (TRUTH_ORIF_EXPR, type, tem, arg1);
}
/* Convert A ? 0 : B into !A && B if A and B are truth values. */
@@ -9892,14 +9892,14 @@ fold_ternary (tree expr)
/* Only perform transformation if ARG0 is easily inverted. */
tem = invert_truthvalue (arg0);
if (TREE_CODE (tem) != TRUTH_NOT_EXPR)
- return fold (build2 (TRUTH_ANDIF_EXPR, type, tem, op2));
+ return fold_build2 (TRUTH_ANDIF_EXPR, type, tem, op2);
}
/* Convert A ? 1 : B into A || B if A and B are truth values. */
if (integer_onep (arg1)
&& truth_value_p (TREE_CODE (arg0))
&& truth_value_p (TREE_CODE (op2)))
- return fold (build2 (TRUTH_ORIF_EXPR, type, arg0, op2));
+ return fold_build2 (TRUTH_ORIF_EXPR, type, arg0, op2);
return NULL_TREE;
@@ -9909,8 +9909,8 @@ fold_ternary (tree expr)
&& TREE_CODE (TREE_OPERAND (op0, 0)) == FUNCTION_DECL
&& DECL_BUILT_IN (TREE_OPERAND (op0, 0)))
{
- tree fndecl = get_callee_fndecl (t);
- tree arglist = TREE_OPERAND (t, 1);
+ tree fndecl = TREE_OPERAND (op0, 0);
+ tree arglist = op1;
tree tmp = fold_builtin (fndecl, arglist, false);
if (tmp)
return tmp;
@@ -9950,7 +9950,7 @@ fold (tree expr)
if (IS_EXPR_CODE_CLASS (kind))
{
tree type = TREE_TYPE (t);
- tree op0, op1;
+ tree op0, op1, op2;
switch (TREE_CODE_LENGTH (code))
{
@@ -9964,7 +9964,10 @@ fold (tree expr)
tem = fold_binary (code, type, op0, op1);
return tem ? tem : expr;
case 3:
- tem = fold_ternary (expr);
+ op0 = TREE_OPERAND (t, 0);
+ op1 = TREE_OPERAND (t, 1);
+ op2 = TREE_OPERAND (t, 2);
+ tem = fold_ternary (code, type, op0, op1, op2);
return tem ? tem : expr;
default:
break;
@@ -10188,6 +10191,51 @@ fold_checksum_tree (tree expr, struct md5_ctx *ctx, htab_t ht)
#endif
+/* Fold a unary tree expression with code CODE of type TYPE with an
+ operand OP0. Return a folded expresion if successful. Otherwise,
+ return a tree expression with code CODE of type TYPE with an
+ operand OP0. */
+
+tree
+fold_build1 (enum tree_code code, tree type, tree op0)
+{
+ tree tem = fold_unary (code, type, op0);
+ if (tem)
+ return tem;
+
+ return build1 (code, type, op0);
+}
+
+/* Fold a binary tree expression with code CODE of type TYPE with
+ operands OP0 and OP1. Return a folded expresion if successful.
+ Otherwise, return a tree expression with code CODE of type TYPE
+ with operands OP0 and OP1. */
+
+tree
+fold_build2 (enum tree_code code, tree type, tree op0, tree op1)
+{
+ tree tem = fold_binary (code, type, op0, op1);
+ if (tem)
+ return tem;
+
+ return build2 (code, type, op0, op1);
+}
+
+/* Fold a ternary tree expression with code CODE of type TYPE with
+ operands OP0, OP1, and OP2. Return a folded expresion if
+ successful. Otherwise, return a tree expression with code CODE of
+ type TYPE with operands OP0, OP1, and OP2. */
+
+tree
+fold_build3 (enum tree_code code, tree type, tree op0, tree op1, tree op2)
+{
+ tree tem = fold_ternary (code, type, op0, op1, op2);
+ if (tem)
+ return tem;
+
+ return build3 (code, type, op0, op1, op2);
+}
+
/* Perform constant folding and related simplification of initializer
expression EXPR. This behaves identically to "fold" but ignores
potential run-time traps and exceptions that fold must preserve. */
@@ -11839,7 +11887,7 @@ ptr_difference_const (tree e1, tree e2, HOST_WIDE_INT *diff)
if (type != TREE_TYPE (toffset2))
toffset2 = fold_convert (type, toffset2);
- tdiff = fold (build2 (MINUS_EXPR, type, toffset1, toffset2));
+ tdiff = fold_build2 (MINUS_EXPR, type, toffset1, toffset2);
if (!host_integerp (tdiff, 0))
return false;
@@ -11881,9 +11929,9 @@ fold_strip_sign_ops (tree exp)
arg0 = fold_strip_sign_ops (TREE_OPERAND (exp, 0));
arg1 = fold_strip_sign_ops (TREE_OPERAND (exp, 1));
if (arg0 != NULL_TREE || arg1 != NULL_TREE)
- return fold (build2 (TREE_CODE (exp), TREE_TYPE (exp),
- arg0 ? arg0 : TREE_OPERAND (exp, 0),
- arg1 ? arg1 : TREE_OPERAND (exp, 1)));
+ return fold_build2 (TREE_CODE (exp), TREE_TYPE (exp),
+ arg0 ? arg0 : TREE_OPERAND (exp, 0),
+ arg1 ? arg1 : TREE_OPERAND (exp, 1));
break;
default:
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index f2ab9597b4a..bdc5649096c 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,104 @@
+2005-03-29 Steven G. Kargl <kargls@comcast.net>
+
+ * gfortran.h (option_t): Change d8, i8, r8 to flag_default_double,
+ flag_default_integer, flag_default_real
+ * invoke.texi: Update documentation
+ * lang.opt: Remove d8, i8, r8 definitions; Add fdefault-double-8
+ fdefault-integer-8, and fdefault-real-8 definitions.
+ * options.c (gfc_init_options): Set option defaults
+ (gfc_handle_option): Handle command line options.
+ * trans-types.c (gfc_init_kinds): Use options.
+
+2005-03-29 Keith Besaw <kbesaw@us.ibm.com>
+
+ * f95-lang.c (builtin_function): Process the attrs parameter
+ and apply the "const" attribute to the builtin if found.
+
+2005-03-27 Steven G. Kargl <kargls@comcast.net>
+
+ * intrinsic.texi: Document AIMAG, AINT, ALL
+
+2005-03-26 Steven G. Kargl <kargls@comcast.net>
+
+ * arith.c (check_result): Fix illogical logic.
+
+2005-03-26 Canqun Yang <canqun@nudt.edu.cn>
+
+ * trans-common.c (create_common): Build RECORD_NODE for common blocks
+ contain no equivalence objects.
+ (add_equivalences): New argument saw_equiv.
+ (trans_common): New local variable saw_equiv.
+ (finish_equivalences): Add a local variable dummy, Always pass true
+ for the 3rd parameter to create_common.
+
+2005-03-25 Steven G. Kargl <kargls@comcast.net>
+
+ * intrinsic.texi: Fix "make dvi"
+
+2005-03-24 Steven G. Kargl <kargls@comcast.net>
+
+ * intrinsic.texi: New file.
+ * gfortran.texi: Include it; white space change; fix typo.
+
+2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
+
+ * f95-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
+
+2005-03-23 Steven Bosscher <stevenb@suse.de>
+
+ * convert.c (convert): Replace fold (buildN (...)) with fold_buildN.
+ * trans-array.c (gfc_trans_allocate_array_storage,
+ gfc_trans_allocate_temp_array gfc_trans_array_constructor_value,
+ gfc_conv_array_index_ref, gfc_trans_array_bound_check,
+ gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
+ gfc_conv_array_ref, gfc_trans_preloop_setup, gfc_conv_ss_startstride,
+ gfc_conv_loop_setup, gfc_array_init_size, gfc_trans_array_bounds,
+ gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
+ gfc_conv_expr_descriptor): Likewise.
+ * trans-expr.c (gfc_conv_powi, gfc_conv_string_tmp,
+ gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
+ * trans-intrinsic.c (build_round_expr, gfc_conv_intrinsic_bound,
+ gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_sign,
+ gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
+ gfc_conv_intrinsic_btest, gfc_conv_intrinsic_bitop,
+ gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits,
+ gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_ishftc,
+ gfc_conv_intrinsic_merge, prepare_arg_info,
+ gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_repeat): Likewise.
+ * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do, gfc_trans_do_while,
+ gfc_trans_forall_loop, gfc_do_allocate, generate_loop_for_temp_to_lhs,
+ generate_loop_for_rhs_to_temp, compute_inner_temp_size,
+ allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
+ gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_assign):
+ Likewise.
+ * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Likewise.
+ * trans.c (gfc_add_modify_expr): Likewise.
+
+2005-03-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
+
+ * check.c (gfc_check_chdir, gfc_check_chdir_sub, gfc_check_kill,
+ gfc_check_kill_sub, gfc_check_link, gfc_check_link_sub,
+ gfc_check_symlnk, gfc_check_symlnk_sub, gfc_check_rename,
+ gfc_check_rename_sub, gfc_check_sleep_sub, gfc_check_gerror,
+ gfc_check_getlog, gfc_check_hostnm, gfc_check_hostnm_sub,
+ gfc_check_perror): new functions to check newly implemented
+ g77 intrinsics.
+ * gfortran.h: adding symbols for new intrinsics.
+ * intrinsic.c (add_functions): adding new intrinsics.
+ (add_subroutines): adding new intrinsics.
+ * intrinsic.h: prototype for all checking and resolving
+ functions.
+ * iresolve.c (gfc_resolve_chdir, gfc_resolve_chdir_sub,
+ gfc_resolve_hostnm, gfc_resolve_ierrno, gfc_resolve_kill,
+ gfc_resolve_link, gfc_resolve_rename, gfc_resolve_symlnk,
+ gfc_resolve_time, gfc_resolve_time8, gfc_resolve_rename_sub,
+ gfc_resolve_kill_sub, gfc_resolve_link_sub,
+ gfc_resolve_symlnk_sub, gfc_resolve_sleep_sub,
+ gfc_resolve_gerror, gfc_resolve_getlog, gfc_resolve_hostnm_sub,
+ gfc_resolve_perror): new functions to resolve intrinsics.
+ * trans-intrinsic.c (gfc_conv_intrinsic_function): add case
+ for new symbols.
+
2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
* dump-parse-tree.c (gfc_show_expr): Dump name of namespace
diff --git a/gcc/fortran/arith.c b/gcc/fortran/arith.c
index 5871c55d490..50e2d060918 100644
--- a/gcc/fortran/arith.c
+++ b/gcc/fortran/arith.c
@@ -552,21 +552,27 @@ gfc_range_check (gfc_expr * e)
static arith
check_result (arith rc, gfc_expr * x, gfc_expr * r, gfc_expr ** rp)
{
- if (rc != ARITH_OK)
- gfc_free_expr (r);
- else
- {
- if (rc == ARITH_UNDERFLOW && gfc_option.warn_underflow)
- gfc_warning ("%s at %L", gfc_arith_error (rc), &x->where);
+ arith val = rc;
- if (rc == ARITH_ASYMMETRIC)
- gfc_warning ("%s at %L", gfc_arith_error (rc), &x->where);
+ if (val == ARITH_UNDERFLOW)
+ {
+ if (gfc_option.warn_underflow)
+ gfc_warning ("%s at %L", gfc_arith_error (val), &x->where);
+ val = ARITH_OK;
+ }
- rc = ARITH_OK;
- *rp = r;
+ if (val == ARITH_ASYMMETRIC)
+ {
+ gfc_warning ("%s at %L", gfc_arith_error (val), &x->where);
+ val = ARITH_OK;
}
- return rc;
+ if (val != ARITH_OK)
+ gfc_free_expr (r);
+ else
+ *rp = r;
+
+ return val;
}
diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c
index 7a971f20038..8fae4449fbf 100644
--- a/gcc/fortran/check.c
+++ b/gcc/fortran/check.c
@@ -575,6 +575,35 @@ gfc_check_char (gfc_expr * i, gfc_expr * kind)
try
+gfc_check_chdir (gfc_expr * dir)
+{
+ if (type_check (dir, 0, BT_CHARACTER) == FAILURE)
+ return FAILURE;
+
+ return SUCCESS;
+}
+
+
+try
+gfc_check_chdir_sub (gfc_expr * dir, gfc_expr * status)
+{
+ if (type_check (dir, 0, BT_CHARACTER) == FAILURE)
+ return FAILURE;
+
+ if (status == NULL)
+ return SUCCESS;
+
+ if (type_check (status, 1, BT_INTEGER) == FAILURE)
+ return FAILURE;
+
+ if (scalar_check (status, 1) == FAILURE)
+ return FAILURE;
+
+ return SUCCESS;
+}
+
+
+try
gfc_check_cmplx (gfc_expr * x, gfc_expr * y, gfc_expr * kind)
{
if (numeric_check (x, 0) == FAILURE)
@@ -1008,6 +1037,41 @@ gfc_check_ishftc (gfc_expr * i, gfc_expr * shift, gfc_expr * size)
try
+gfc_check_kill (gfc_expr * pid, gfc_expr * sig)
+{
+ if (type_check (pid, 0, BT_INTEGER) == FAILURE)
+ return FAILURE;
+
+ if (type_check (sig, 1, BT_INTEGER) == FAILURE)
+ return FAILURE;
+
+ return SUCCESS;
+}
+
+
+try
+gfc_check_kill_sub (gfc_expr * pid, gfc_expr * sig, gfc_expr * status)
+{
+ if (type_check (pid, 0, BT_INTEGER) == FAILURE)
+ return FAILURE;
+
+ if (type_check (sig, 1, BT_INTEGER) == FAILURE)
+ return FAILURE;
+
+ if (status == NULL)
+ return SUCCESS;
+
+ if (type_check (status, 2, BT_INTEGER) == FAILURE)
+ return FAILURE;
+
+ if (scalar_check (status, 2) == FAILURE)
+ return FAILURE;
+
+ return SUCCESS;
+}
+
+
+try
gfc_check_kind (gfc_expr * x)
{
if (x->ts.type == BT_DERIVED)
@@ -1039,6 +1103,76 @@ gfc_check_lbound (gfc_expr * array, gfc_expr * dim)
try
+gfc_check_link (gfc_expr * path1, gfc_expr * path2)
+{
+ if (type_check (path1, 0, BT_CHARACTER) == FAILURE)
+ return FAILURE;
+
+ if (type_check (path2, 1, BT_CHARACTER) == FAILURE)
+ return FAILURE;
+
+ return SUCCESS;
+}
+
+
+try
+gfc_check_link_sub (gfc_expr * path1, gfc_expr * path2, gfc_expr * status)
+{
+ if (type_check (path1, 0, BT_CHARACTER) == FAILURE)
+ return FAILURE;
+
+ if (type_check (path2, 1, BT_CHARACTER) == FAILURE)
+ return FAILURE;
+
+ if (status == NULL)
+ return SUCCESS;
+
+ if (type_check (status, 2, BT_INTEGER) == FAILURE)
+ return FAILURE;
+
+ if (scalar_check (status, 2) == FAILURE)
+ return FAILURE;
+
+ return SUCCESS;
+}
+
+
+try
+gfc_check_symlnk (gfc_expr * path1, gfc_expr * path2)
+{
+ if (type_check (path1, 0, BT_CHARACTER) == FAILURE)
+ return FAILURE;
+
+ if (type_check (path2, 1, BT_CHARACTER) == FAILURE)
+ return FAILURE;
+
+ return SUCCESS;
+}
+
+
+try
+gfc_check_symlnk_sub (gfc_expr * path1, gfc_expr * path2, gfc_expr * status)
+{
+ if (type_check (path1, 0, BT_CHARACTER) == FAILURE)
+ return FAILURE;
+
+ if (type_check (path2, 1, BT_CHARACTER) == FAILURE)
+ return FAILURE;
+
+ if (status == NULL)
+ return SUCCESS;
+
+ if (type_check (status, 2, BT_INTEGER) == FAILURE)
+ return FAILURE;
+
+ if (scalar_check (status, 2) == FAILURE)
+ return FAILURE;
+
+ return SUCCESS;
+}
+
+
+try
gfc_check_logical (gfc_expr * a, gfc_expr * kind)
{
if (type_check (a, 0, BT_LOGICAL) == FAILURE)
@@ -1454,6 +1588,41 @@ gfc_check_real (gfc_expr * a, gfc_expr * kind)
try
+gfc_check_rename (gfc_expr * path1, gfc_expr * path2)
+{
+ if (type_check (path1, 0, BT_CHARACTER) == FAILURE)
+ return FAILURE;
+
+ if (type_check (path2, 1, BT_CHARACTER) == FAILURE)
+ return FAILURE;
+
+ return SUCCESS;
+}
+
+
+try
+gfc_check_rename_sub (gfc_expr * path1, gfc_expr * path2, gfc_expr * status)
+{
+ if (type_check (path1, 0, BT_CHARACTER) == FAILURE)
+ return FAILURE;
+
+ if (type_check (path2, 1, BT_CHARACTER) == FAILURE)
+ return FAILURE;
+
+ if (status == NULL)
+ return SUCCESS;
+
+ if (type_check (status, 2, BT_INTEGER) == FAILURE)
+ return FAILURE;
+
+ if (scalar_check (status, 2) == FAILURE)
+ return FAILURE;
+
+ return SUCCESS;
+}
+
+
+try
gfc_check_repeat (gfc_expr * x, gfc_expr * y)
{
if (type_check (x, 0, BT_CHARACTER) == FAILURE)
@@ -1658,6 +1827,19 @@ gfc_check_size (gfc_expr * array, gfc_expr * dim)
try
+gfc_check_sleep_sub (gfc_expr * seconds)
+{
+ if (type_check (seconds, 0, BT_INTEGER) == FAILURE)
+ return FAILURE;
+
+ if (scalar_check (seconds, 0) == FAILURE)
+ return FAILURE;
+
+ return SUCCESS;
+}
+
+
+try
gfc_check_spread (gfc_expr * source, gfc_expr * dim, gfc_expr * ncopies)
{
if (source->rank >= GFC_MAX_DIMENSIONS)
@@ -2234,6 +2416,16 @@ gfc_check_etime_sub (gfc_expr * values, gfc_expr * time)
try
+gfc_check_gerror (gfc_expr * msg)
+{
+ if (type_check (msg, 0, BT_CHARACTER) == FAILURE)
+ return FAILURE;
+
+ return SUCCESS;
+}
+
+
+try
gfc_check_getcwd_sub (gfc_expr * cwd, gfc_expr * status)
{
if (type_check (cwd, 0, BT_CHARACTER) == FAILURE)
@@ -2253,6 +2445,16 @@ gfc_check_getcwd_sub (gfc_expr * cwd, gfc_expr * status)
try
+gfc_check_getlog (gfc_expr * msg)
+{
+ if (type_check (msg, 0, BT_CHARACTER) == FAILURE)
+ return FAILURE;
+
+ return SUCCESS;
+}
+
+
+try
gfc_check_exit (gfc_expr * status)
{
if (status == NULL)
@@ -2285,6 +2487,45 @@ gfc_check_flush (gfc_expr * unit)
try
+gfc_check_hostnm (gfc_expr * name)
+{
+ if (type_check (name, 0, BT_CHARACTER) == FAILURE)
+ return FAILURE;
+
+ return SUCCESS;
+}
+
+
+try
+gfc_check_hostnm_sub (gfc_expr * name, gfc_expr * status)
+{
+ if (type_check (name, 0, BT_CHARACTER) == FAILURE)
+ return FAILURE;
+
+ if (status == NULL)
+ return SUCCESS;
+
+ if (scalar_check (status, 1) == FAILURE)
+ return FAILURE;
+
+ if (type_check (status, 1, BT_INTEGER) == FAILURE)
+ return FAILURE;
+
+ return SUCCESS;
+}
+
+
+try
+gfc_check_perror (gfc_expr * string)
+{
+ if (type_check (string, 0, BT_CHARACTER) == FAILURE)
+ return FAILURE;
+
+ return SUCCESS;
+}
+
+
+try
gfc_check_umask (gfc_expr * mask)
{
if (type_check (mask, 0, BT_INTEGER) == FAILURE)
diff --git a/gcc/fortran/convert.c b/gcc/fortran/convert.c
index 9759f057f50..a0298f22784 100644
--- a/gcc/fortran/convert.c
+++ b/gcc/fortran/convert.c
@@ -81,7 +81,7 @@ convert (tree type, tree expr)
return expr;
if (TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (TREE_TYPE (expr)))
- return fold (build1 (NOP_EXPR, type, expr));
+ return fold_build1 (NOP_EXPR, type, expr);
if (TREE_CODE (TREE_TYPE (expr)) == ERROR_MARK)
return error_mark_node;
if (TREE_CODE (TREE_TYPE (expr)) == VOID_TYPE)
@@ -106,9 +106,9 @@ convert (tree type, tree expr)
/* If we have a NOP_EXPR, we must fold it here to avoid
infinite recursion between fold () and convert (). */
if (TREE_CODE (e) == NOP_EXPR)
- return fold (build1 (NOP_EXPR, type, TREE_OPERAND (e, 0)));
+ return fold_build1 (NOP_EXPR, type, TREE_OPERAND (e, 0));
else
- return fold (build1 (NOP_EXPR, type, e));
+ return fold_build1 (NOP_EXPR, type, e);
}
if (code == POINTER_TYPE || code == REFERENCE_TYPE)
return fold (convert_to_pointer (type, e));
diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c
index 7f04b7ca261..2fb06a9537a 100644
--- a/gcc/fortran/f95-lang.c
+++ b/gcc/fortran/f95-lang.c
@@ -114,7 +114,6 @@ static void gfc_expand_function (tree);
#undef LANG_HOOKS_POST_OPTIONS
#undef LANG_HOOKS_PRINT_IDENTIFIER
#undef LANG_HOOKS_PARSE_FILE
-#undef LANG_HOOKS_TRUTHVALUE_CONVERSION
#undef LANG_HOOKS_MARK_ADDRESSABLE
#undef LANG_HOOKS_TYPE_FOR_MODE
#undef LANG_HOOKS_TYPE_FOR_SIZE
@@ -133,7 +132,6 @@ static void gfc_expand_function (tree);
#define LANG_HOOKS_POST_OPTIONS gfc_post_options
#define LANG_HOOKS_PRINT_IDENTIFIER gfc_print_identifier
#define LANG_HOOKS_PARSE_FILE gfc_be_parse_file
-#define LANG_HOOKS_TRUTHVALUE_CONVERSION gfc_truthvalue_conversion
#define LANG_HOOKS_MARK_ADDRESSABLE gfc_mark_addressable
#define LANG_HOOKS_TYPE_FOR_MODE gfc_type_for_mode
#define LANG_HOOKS_TYPE_FOR_SIZE gfc_type_for_size
@@ -682,7 +680,7 @@ builtin_function (const char *name,
int function_code,
enum built_in_class class,
const char *library_name,
- tree attrs ATTRIBUTE_UNUSED)
+ tree attrs)
{
tree decl = build_decl (FUNCTION_DECL, get_identifier (name), type);
DECL_EXTERNAL (decl) = 1;
@@ -693,6 +691,17 @@ builtin_function (const char *name,
pushdecl (decl);
DECL_BUILT_IN_CLASS (decl) = class;
DECL_FUNCTION_CODE (decl) = function_code;
+
+ /* Possibly apply some default attributes to this built-in function. */
+ if (attrs)
+ {
+ /* FORNOW the only supported attribute is "const". If others need
+ to be supported then see the more general solution in procedure
+ builtin_function in c-decl.c */
+ if (lookup_attribute ( "const", attrs ))
+ TREE_READONLY (decl) = 1;
+ }
+
return decl;
}
diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h
index 82665e9a003..60a3040b85f 100644
--- a/gcc/fortran/gfortran.h
+++ b/gcc/fortran/gfortran.h
@@ -292,6 +292,7 @@ enum gfc_generic_isym_id
GFC_ISYM_BTEST,
GFC_ISYM_CEILING,
GFC_ISYM_CHAR,
+ GFC_ISYM_CHDIR,
GFC_ISYM_CMPLX,
GFC_ISYM_COMMAND_ARGUMENT_COUNT,
GFC_ISYM_CONJG,
@@ -317,6 +318,7 @@ enum gfc_generic_isym_id
GFC_ISYM_GETGID,
GFC_ISYM_GETPID,
GFC_ISYM_GETUID,
+ GFC_ISYM_HOSTNM,
GFC_ISYM_IACHAR,
GFC_ISYM_IAND,
GFC_ISYM_IARGC,
@@ -325,15 +327,18 @@ enum gfc_generic_isym_id
GFC_ISYM_IBSET,
GFC_ISYM_ICHAR,
GFC_ISYM_IEOR,
+ GFC_ISYM_IERRNO,
GFC_ISYM_INDEX,
GFC_ISYM_INT,
GFC_ISYM_IOR,
GFC_ISYM_IRAND,
GFC_ISYM_ISHFT,
GFC_ISYM_ISHFTC,
+ GFC_ISYM_KILL,
GFC_ISYM_LBOUND,
GFC_ISYM_LEN,
GFC_ISYM_LEN_TRIM,
+ GFC_ISYM_LINK,
GFC_ISYM_LGE,
GFC_ISYM_LGT,
GFC_ISYM_LLE,
@@ -359,6 +364,7 @@ enum gfc_generic_isym_id
GFC_ISYM_PRODUCT,
GFC_ISYM_RAND,
GFC_ISYM_REAL,
+ GFC_ISYM_RENAME,
GFC_ISYM_REPEAT,
GFC_ISYM_RESHAPE,
GFC_ISYM_RRSPACING,
@@ -378,9 +384,12 @@ enum gfc_generic_isym_id
GFC_ISYM_SR_KIND,
GFC_ISYM_STAT,
GFC_ISYM_SUM,
+ GFC_ISYM_SYMLNK,
GFC_ISYM_SYSTEM,
GFC_ISYM_TAN,
GFC_ISYM_TANH,
+ GFC_ISYM_TIME,
+ GFC_ISYM_TIME8,
GFC_ISYM_TRANSFER,
GFC_ISYM_TRANSPOSE,
GFC_ISYM_TRIM,
@@ -1393,6 +1402,9 @@ typedef struct
int warn_surprising;
int warn_unused_labels;
+ int flag_default_double;
+ int flag_default_integer;
+ int flag_default_real;
int flag_dollar_ok;
int flag_underscoring;
int flag_second_underscore;
@@ -1404,9 +1416,7 @@ typedef struct
int flag_repack_arrays;
int q_kind;
- int r8;
- int i8;
- int d8;
+
int warn_std;
int allow_std;
int warn_nonstd_intrinsics;
diff --git a/gcc/fortran/gfortran.texi b/gcc/fortran/gfortran.texi
index c3242f7b5a3..9068cffdc76 100644
--- a/gcc/fortran/gfortran.texi
+++ b/gcc/fortran/gfortran.texi
@@ -109,25 +109,31 @@ the GNU Fortran 95 compiler. You can find in this manual how to invoke
@ifset DEVELOPMENT
@emph{Warning:} This document, and the compiler it describes, are still
-under development. While efforts are made too keep it up-to-date it might
+under development. While efforts are made to keep it up-to-date, it might
not accurately reflect the status of the most recent @command{gfortran}.
@end ifset
+@comment
+@comment When you add a new menu item, please keep the right hand
+@comment aligned to the same column. Do not use tabs. This provides
+@comment better formatting.
+@comment
@menu
-* Copying:: GNU General Public License says
- how you can copy and share GNU Fortran.
+* Copying:: GNU General Public License says
+ how you can copy and share GNU Fortran.
* GNU Free Documentation License::
- How you can copy and share this manual.
-* Funding:: How to help assure continued work for free software.
-* Getting Started:: What you should know about @command{gfortran}.
-* GFORTRAN and GCC:: You can compile Fortran, C, or other programs.
-* GFORTRAN and G77:: Why we choose to start from scratch.
+ How you can copy and share this manual.
+* Funding:: How to help assure continued work for free software.
+* Getting Started:: What you should know about @command{gfortran}.
+* GFORTRAN and GCC:: You can compile Fortran, C, or other programs.
+* GFORTRAN and G77:: Why we chose to start from scratch.
* Invoking GFORTRAN:: Command options supported by @command{gfortran}.
-* Project Status:: Status of @command{gfortran}, Roadmap, proposed extensions.
-* Contributing:: Helping you can help.
-* Standards:: Standards supported by @command{gfortran}
-* Extensions:: Language extensions implemented by @command{gfortran}
-* Index:: Index of this documentation.
+* Project Status:: Status of @command{gfortran}, roadmap, proposed extensions.
+* Contributing:: How you can help.
+* Standards:: Standards supported by @command{gfortran}
+* Extensions:: Language extensions implemented by @command{gfortran}
+* Intrinsic Procedures:: Intrinsic procedures supported by @command{gfortran}
+* Index:: Index of this documentation.
@end menu
@@ -369,7 +375,6 @@ because it was expected to be easier to maintain code we
develop ourselves than to do a major overhaul of @command{g77} first,
and then build a Fortran 95 compiler out of it.
-
@include invoke.texi
@c ---------------------------------------------------------------------
@@ -670,6 +675,7 @@ Examples of standard conforming code equivalent to the above example, are:
DATA i,j,x /1,2,3*0.,1./
@end smallexample
+@include intrinsic.texi
@c ---------------------------------------------------------------------
@c Contributing
@c ---------------------------------------------------------------------
diff --git a/gcc/fortran/intrinsic.c b/gcc/fortran/intrinsic.c
index ebf5cb2edda..7336e63d552 100644
--- a/gcc/fortran/intrinsic.c
+++ b/gcc/fortran/intrinsic.c
@@ -1092,6 +1092,12 @@ add_functions (void)
make_generic ("char", GFC_ISYM_CHAR, GFC_STD_F77);
+ add_sym_1 ("chdir", 0, 1, BT_INTEGER, di, GFC_STD_GNU,
+ gfc_check_chdir, NULL, gfc_resolve_chdir,
+ a, BT_CHARACTER, dc, REQUIRED);
+
+ make_generic ("chdir", GFC_ISYM_CHDIR, GFC_STD_GNU);
+
add_sym_3 ("cmplx", 1, 1, BT_COMPLEX, dz, GFC_STD_F77,
gfc_check_cmplx, gfc_simplify_cmplx, gfc_resolve_cmplx,
x, BT_UNKNOWN, dr, REQUIRED, y, BT_UNKNOWN, dr, OPTIONAL,
@@ -1323,6 +1329,12 @@ add_functions (void)
make_generic ("getuid", GFC_ISYM_GETUID, GFC_STD_GNU);
+ add_sym_1 ("hostnm", 0, 1, BT_INTEGER, di, GFC_STD_GNU,
+ gfc_check_hostnm, NULL, gfc_resolve_hostnm,
+ a, BT_CHARACTER, dc, REQUIRED);
+
+ make_generic ("hostnm", GFC_ISYM_HOSTNM, GFC_STD_GNU);
+
add_sym_1 ("huge", 0, 1, BT_REAL, dr, GFC_STD_F95,
gfc_check_huge, gfc_simplify_huge, NULL,
x, BT_UNKNOWN, dr, REQUIRED);
@@ -1383,6 +1395,11 @@ add_functions (void)
make_generic ("ieor", GFC_ISYM_IEOR, GFC_STD_F95);
+ add_sym_0 ("ierrno", 1, 0, BT_INTEGER, di, GFC_STD_GNU,
+ NULL, NULL, gfc_resolve_ierrno);
+
+ make_generic ("ierrno", GFC_ISYM_IERRNO, GFC_STD_GNU);
+
add_sym_3 ("index", 1, 1, BT_INTEGER, di, GFC_STD_F77,
gfc_check_index, gfc_simplify_index, NULL,
stg, BT_CHARACTER, dc, REQUIRED, ssg, BT_CHARACTER, dc, REQUIRED,
@@ -1430,6 +1447,12 @@ add_functions (void)
make_generic ("ishftc", GFC_ISYM_ISHFTC, GFC_STD_F95);
+ add_sym_2 ("kill", 1, 1, BT_INTEGER, di, GFC_STD_GNU,
+ gfc_check_kill, NULL, gfc_resolve_kill,
+ a, BT_INTEGER, di, REQUIRED, b, BT_INTEGER, di, REQUIRED);
+
+ make_generic ("kill", GFC_ISYM_KILL, GFC_STD_GNU);
+
add_sym_1 ("kind", 0, 1, BT_INTEGER, di, GFC_STD_F95,
gfc_check_kind, gfc_simplify_kind, NULL,
x, BT_REAL, dr, REQUIRED);
@@ -1452,6 +1475,8 @@ add_functions (void)
NULL, gfc_simplify_len_trim, gfc_resolve_len_trim,
stg, BT_CHARACTER, dc, REQUIRED);
+ make_alias ("lnblnk", GFC_STD_GNU);
+
make_generic ("len_trim", GFC_ISYM_LEN_TRIM, GFC_STD_F95);
add_sym_2 ("lge", 1, 0, BT_LOGICAL, dl, GFC_STD_F77,
@@ -1478,6 +1503,12 @@ add_functions (void)
make_generic ("llt", GFC_ISYM_LLT, GFC_STD_F77);
+ add_sym_2 ("link", 0, 1, BT_INTEGER, di, GFC_STD_GNU,
+ gfc_check_link, NULL, gfc_resolve_link,
+ a, BT_CHARACTER, dc, REQUIRED, b, BT_CHARACTER, dc, REQUIRED);
+
+ make_generic ("link", GFC_ISYM_LINK, GFC_STD_GNU);
+
add_sym_1 ("log", 1, 1, BT_REAL, dr, GFC_STD_F77,
gfc_check_fn_rc, gfc_simplify_log, gfc_resolve_log,
x, BT_REAL, dr, REQUIRED);
@@ -1744,6 +1775,12 @@ add_functions (void)
make_generic ("real", GFC_ISYM_REAL, GFC_STD_F77);
+ add_sym_2 ("rename", 0, 1, BT_INTEGER, di, GFC_STD_GNU,
+ gfc_check_rename, NULL, gfc_resolve_rename,
+ a, BT_CHARACTER, dc, REQUIRED, b, BT_CHARACTER, dc, REQUIRED);
+
+ make_generic ("rename", GFC_ISYM_RENAME, GFC_STD_GNU);
+
add_sym_2 ("repeat", 0, 1, BT_CHARACTER, dc, GFC_STD_F95,
gfc_check_repeat, gfc_simplify_repeat, gfc_resolve_repeat,
stg, BT_CHARACTER, dc, REQUIRED, n, BT_INTEGER, di, REQUIRED);
@@ -1904,6 +1941,12 @@ add_functions (void)
make_generic ("sum", GFC_ISYM_SUM, GFC_STD_F95);
+ add_sym_2 ("symlnk", 0, 1, BT_INTEGER, di, GFC_STD_GNU,
+ gfc_check_symlnk, NULL, gfc_resolve_symlnk,
+ a, BT_CHARACTER, dc, REQUIRED, b, BT_CHARACTER, dc, REQUIRED);
+
+ make_generic ("symlnk", GFC_ISYM_SYMLNK, GFC_STD_GNU);
+
add_sym_1 ("system", 1, 1, BT_INTEGER, di, GFC_STD_GNU,
NULL, NULL, NULL,
c, BT_CHARACTER, dc, REQUIRED);
@@ -1930,6 +1973,16 @@ add_functions (void)
make_generic ("tanh", GFC_ISYM_TANH, GFC_STD_F77);
+ add_sym_0 ("time", 1, 0, BT_INTEGER, di, GFC_STD_GNU,
+ NULL, NULL, gfc_resolve_time);
+
+ make_generic ("time", GFC_ISYM_TIME, GFC_STD_GNU);
+
+ add_sym_0 ("time8", 1, 0, BT_INTEGER, di, GFC_STD_GNU,
+ NULL, NULL, gfc_resolve_time8);
+
+ make_generic ("time8", GFC_ISYM_TIME8, GFC_STD_GNU);
+
add_sym_1 ("tiny", 0, 1, BT_REAL, dr, GFC_STD_F95,
gfc_check_x, gfc_simplify_tiny, NULL,
x, BT_REAL, dr, REQUIRED);
@@ -2024,6 +2077,10 @@ add_subroutines (void)
gfc_check_second_sub, NULL, gfc_resolve_second_sub,
tm, BT_REAL, dr, REQUIRED);
+ add_sym_2s ("chdir", 0, 1, BT_UNKNOWN, 0, GFC_STD_GNU,
+ gfc_check_chdir_sub, NULL, gfc_resolve_chdir_sub,
+ name, BT_CHARACTER, dc, REQUIRED, st, BT_INTEGER, di, OPTIONAL);
+
add_sym_4s ("date_and_time", 0, 1, BT_UNKNOWN, 0, GFC_STD_F95,
gfc_check_date_and_time, NULL, NULL,
dt, BT_CHARACTER, dc, OPTIONAL, tm, BT_CHARACTER, dc, OPTIONAL,
@@ -2038,6 +2095,10 @@ add_subroutines (void)
gfc_check_etime_sub, NULL, gfc_resolve_etime_sub,
vl, BT_REAL, 4, REQUIRED, tm, BT_REAL, 4, REQUIRED);
+ add_sym_1s ("gerror", 0, 1, BT_UNKNOWN, 0, GFC_STD_GNU,
+ gfc_check_gerror, NULL, gfc_resolve_gerror, c, BT_CHARACTER,
+ dc, REQUIRED);
+
add_sym_2s ("getcwd", 0, 1, BT_UNKNOWN, 0, GFC_STD_GNU,
gfc_check_getcwd_sub, NULL, gfc_resolve_getcwd_sub,
c, BT_CHARACTER, dc, REQUIRED, st, BT_INTEGER, di, OPTIONAL);
@@ -2050,6 +2111,10 @@ add_subroutines (void)
NULL, NULL, gfc_resolve_getarg,
c, BT_INTEGER, di, REQUIRED, vl, BT_CHARACTER, dc, REQUIRED);
+ add_sym_1s ("getlog", 0, 1, BT_UNKNOWN, 0, GFC_STD_GNU,
+ gfc_check_getlog, NULL, gfc_resolve_getlog, c, BT_CHARACTER,
+ dc, REQUIRED);
+
/* F2003 commandline routines. */
add_sym_3s ("get_command", 0, 1, BT_UNKNOWN, 0, GFC_STD_F2003,
@@ -2098,6 +2163,32 @@ add_subroutines (void)
gfc_check_flush, NULL, gfc_resolve_flush,
c, BT_INTEGER, di, OPTIONAL);
+ add_sym_2s ("hostnm", 0, 1, BT_UNKNOWN, 0, GFC_STD_GNU,
+ gfc_check_hostnm_sub, NULL, gfc_resolve_hostnm_sub,
+ c, BT_CHARACTER, dc, REQUIRED, st, BT_INTEGER, di, OPTIONAL);
+
+ add_sym_3s ("kill", 0, 1, BT_UNKNOWN, 0, GFC_STD_GNU, gfc_check_kill_sub,
+ NULL, gfc_resolve_kill_sub, c, BT_INTEGER, di, REQUIRED,
+ val, BT_INTEGER, di, REQUIRED, st, BT_INTEGER, di, OPTIONAL);
+
+ add_sym_3s ("link", 0, 1, BT_UNKNOWN, 0, GFC_STD_GNU,
+ gfc_check_link_sub, NULL, gfc_resolve_link_sub,
+ name, BT_CHARACTER, dc, REQUIRED, val, BT_CHARACTER,
+ dc, REQUIRED, st, BT_INTEGER, di, OPTIONAL);
+
+ add_sym_1s ("perror", 0, 1, BT_UNKNOWN, 0, GFC_STD_GNU,
+ gfc_check_perror, NULL, gfc_resolve_perror,
+ c, BT_CHARACTER, dc, REQUIRED);
+
+ add_sym_3s ("rename", 0, 1, BT_UNKNOWN, 0, GFC_STD_GNU,
+ gfc_check_rename_sub, NULL, gfc_resolve_rename_sub,
+ name, BT_CHARACTER, dc, REQUIRED, val, BT_CHARACTER,
+ dc, REQUIRED, st, BT_INTEGER, di, OPTIONAL);
+
+ add_sym_1s ("sleep", 0, 1, BT_UNKNOWN, 0, GFC_STD_GNU,
+ gfc_check_sleep_sub, NULL, gfc_resolve_sleep_sub,
+ val, BT_CHARACTER, dc, REQUIRED);
+
add_sym_3s ("fstat", 0, 1, BT_UNKNOWN, 0, GFC_STD_GNU,
gfc_check_fstat_sub, NULL, gfc_resolve_fstat_sub,
ut, BT_INTEGER, di, REQUIRED, vl, BT_INTEGER, di, REQUIRED,
@@ -2108,6 +2199,11 @@ add_subroutines (void)
name, BT_CHARACTER, dc, REQUIRED, vl, BT_INTEGER, di, REQUIRED,
st, BT_INTEGER, di, OPTIONAL);
+ add_sym_3s ("symlnk", 0, 1, BT_UNKNOWN, 0, GFC_STD_GNU,
+ gfc_check_symlnk_sub, NULL, gfc_resolve_symlnk_sub,
+ name, BT_CHARACTER, dc, REQUIRED, val, BT_CHARACTER,
+ dc, REQUIRED, st, BT_INTEGER, di, OPTIONAL);
+
add_sym_2s ("system", 0, 1, BT_UNKNOWN, 0, GFC_STD_GNU,
NULL, NULL, gfc_resolve_system_sub,
c, BT_CHARACTER, dc, REQUIRED, st, BT_INTEGER, di, OPTIONAL);
diff --git a/gcc/fortran/intrinsic.h b/gcc/fortran/intrinsic.h
index 3f5fcba3736..bf2c80a0c7e 100644
--- a/gcc/fortran/intrinsic.h
+++ b/gcc/fortran/intrinsic.h
@@ -40,6 +40,7 @@ try gfc_check_atan2 (gfc_expr *, gfc_expr *);
try gfc_check_besn (gfc_expr *, gfc_expr *);
try gfc_check_btest (gfc_expr *, gfc_expr *);
try gfc_check_char (gfc_expr *, gfc_expr *);
+try gfc_check_chdir (gfc_expr *);
try gfc_check_cmplx (gfc_expr *, gfc_expr *, gfc_expr *);
try gfc_check_count (gfc_expr *, gfc_expr *);
try gfc_check_cshift (gfc_expr *, gfc_expr *, gfc_expr *);
@@ -55,6 +56,7 @@ try gfc_check_fn_r (gfc_expr *);
try gfc_check_fn_rc (gfc_expr *);
try gfc_check_fnum (gfc_expr *);
try gfc_check_g77_math1 (gfc_expr *);
+try gfc_check_hostnm (gfc_expr *);
try gfc_check_huge (gfc_expr *);
try gfc_check_i (gfc_expr *);
try gfc_check_iand (gfc_expr *, gfc_expr *);
@@ -69,8 +71,10 @@ try gfc_check_ior (gfc_expr *, gfc_expr *);
try gfc_check_irand (gfc_expr *);
try gfc_check_ishft (gfc_expr *, gfc_expr *);
try gfc_check_ishftc (gfc_expr *, gfc_expr *, gfc_expr *);
+try gfc_check_kill (gfc_expr *, gfc_expr *);
try gfc_check_kind (gfc_expr *);
try gfc_check_lbound (gfc_expr *, gfc_expr *);
+try gfc_check_link (gfc_expr *, gfc_expr *);
try gfc_check_logical (gfc_expr *, gfc_expr *);
try gfc_check_min_max (gfc_actual_arglist *);
try gfc_check_min_max_integer (gfc_actual_arglist *);
@@ -90,6 +94,7 @@ try gfc_check_radix (gfc_expr *);
try gfc_check_rand (gfc_expr *);
try gfc_check_range (gfc_expr *);
try gfc_check_real (gfc_expr *, gfc_expr *);
+try gfc_check_rename (gfc_expr *, gfc_expr *);
try gfc_check_repeat (gfc_expr *, gfc_expr *);
try gfc_check_reshape (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *);
try gfc_check_scale (gfc_expr *, gfc_expr *);
@@ -105,6 +110,7 @@ try gfc_check_spread (gfc_expr *, gfc_expr *, gfc_expr *);
try gfc_check_srand (gfc_expr *);
try gfc_check_stat (gfc_expr *, gfc_expr *);
try gfc_check_sum (gfc_expr *, gfc_expr *, gfc_expr *);
+try gfc_check_symlnk (gfc_expr *, gfc_expr *);
try gfc_check_transfer (gfc_expr *, gfc_expr *, gfc_expr *);
try gfc_check_transpose (gfc_expr *);
try gfc_check_trim (gfc_expr *);
@@ -117,18 +123,28 @@ try gfc_check_x (gfc_expr *);
/* Intrinsic subroutines. */
+try gfc_check_chdir_sub (gfc_expr *, gfc_expr *);
try gfc_check_cpu_time (gfc_expr *);
try gfc_check_system_clock (gfc_expr *, gfc_expr *, gfc_expr *);
try gfc_check_date_and_time (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *);
try gfc_check_exit (gfc_expr *);
try gfc_check_flush (gfc_expr *);
try gfc_check_fstat_sub (gfc_expr *, gfc_expr *, gfc_expr *);
+try gfc_check_gerror (gfc_expr *);
+try gfc_check_getlog (gfc_expr *);
try gfc_check_mvbits (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *,
gfc_expr *);
try gfc_check_random_number (gfc_expr *);
try gfc_check_random_seed (gfc_expr *, gfc_expr *, gfc_expr *);
try gfc_check_etime_sub (gfc_expr *, gfc_expr *);
try gfc_check_getcwd_sub (gfc_expr *, gfc_expr *);
+try gfc_check_hostnm_sub (gfc_expr *, gfc_expr *);
+try gfc_check_kill_sub (gfc_expr *, gfc_expr *, gfc_expr *);
+try gfc_check_perror (gfc_expr *);
+try gfc_check_rename_sub (gfc_expr *, gfc_expr *, gfc_expr *);
+try gfc_check_link_sub (gfc_expr *, gfc_expr *, gfc_expr *);
+try gfc_check_symlnk_sub (gfc_expr *, gfc_expr *, gfc_expr *);
+try gfc_check_sleep_sub (gfc_expr *);
try gfc_check_stat_sub (gfc_expr *, gfc_expr *, gfc_expr *);
try gfc_check_system_sub (gfc_expr *, gfc_expr *);
try gfc_check_umask_sub (gfc_expr *, gfc_expr *);
@@ -256,6 +272,7 @@ void gfc_resolve_besn (gfc_expr *, gfc_expr *, gfc_expr *);
void gfc_resolve_btest (gfc_expr *, gfc_expr *, gfc_expr *);
void gfc_resolve_ceiling (gfc_expr *, gfc_expr *, gfc_expr *);
void gfc_resolve_char (gfc_expr *, gfc_expr *, gfc_expr *);
+void gfc_resolve_chdir (gfc_expr *, gfc_expr *);
void gfc_resolve_cmplx (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *);
void gfc_resolve_dcmplx (gfc_expr *, gfc_expr *, gfc_expr *);
void gfc_resolve_conjg (gfc_expr *, gfc_expr *);
@@ -281,10 +298,12 @@ void gfc_resolve_getcwd (gfc_expr *, gfc_expr *);
void gfc_resolve_getgid (gfc_expr *);
void gfc_resolve_getpid (gfc_expr *);
void gfc_resolve_getuid (gfc_expr *);
+void gfc_resolve_hostnm (gfc_expr *, gfc_expr *);
void gfc_resolve_iand (gfc_expr *, gfc_expr *, gfc_expr *);
void gfc_resolve_ibclr (gfc_expr *, gfc_expr *, gfc_expr *);
void gfc_resolve_ibits (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *);
void gfc_resolve_ibset (gfc_expr *, gfc_expr *, gfc_expr *);
+void gfc_resolve_ierrno (gfc_expr *);
void gfc_resolve_ieor (gfc_expr *, gfc_expr *, gfc_expr *);
void gfc_resolve_ichar (gfc_expr *, gfc_expr *);
void gfc_resolve_idnint (gfc_expr *, gfc_expr *);
@@ -292,9 +311,11 @@ void gfc_resolve_int (gfc_expr *, gfc_expr *, gfc_expr *);
void gfc_resolve_ior (gfc_expr *, gfc_expr *, gfc_expr *);
void gfc_resolve_ishft (gfc_expr *, gfc_expr *, gfc_expr *);
void gfc_resolve_ishftc (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *);
+void gfc_resolve_kill (gfc_expr *, gfc_expr *, gfc_expr *);
void gfc_resolve_lbound (gfc_expr *, gfc_expr *, gfc_expr *);
void gfc_resolve_len (gfc_expr *, gfc_expr *);
void gfc_resolve_len_trim (gfc_expr *, gfc_expr *);
+void gfc_resolve_link (gfc_expr *, gfc_expr *, gfc_expr *);
void gfc_resolve_log (gfc_expr *, gfc_expr *);
void gfc_resolve_log10 (gfc_expr *, gfc_expr *);
void gfc_resolve_logical (gfc_expr *, gfc_expr *, gfc_expr *);
@@ -314,6 +335,7 @@ void gfc_resolve_not (gfc_expr *, gfc_expr *);
void gfc_resolve_pack (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *);
void gfc_resolve_product (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *);
void gfc_resolve_real (gfc_expr *, gfc_expr *, gfc_expr *);
+void gfc_resolve_rename (gfc_expr *, gfc_expr *, gfc_expr *);
void gfc_resolve_repeat (gfc_expr *, gfc_expr *, gfc_expr *);
void gfc_resolve_reshape (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *,
gfc_expr *);
@@ -332,9 +354,12 @@ void gfc_resolve_sqrt (gfc_expr *, gfc_expr *);
void gfc_resolve_stat (gfc_expr *, gfc_expr *, gfc_expr *);
void gfc_resolve_srand (gfc_code *);
void gfc_resolve_sum (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *);
+void gfc_resolve_symlnk (gfc_expr *, gfc_expr *, gfc_expr *);
void gfc_resolve_system (gfc_expr *, gfc_expr *);
void gfc_resolve_tan (gfc_expr *, gfc_expr *);
void gfc_resolve_tanh (gfc_expr *, gfc_expr *);
+void gfc_resolve_time (gfc_expr *);
+void gfc_resolve_time8 (gfc_expr *);
void gfc_resolve_transfer (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *);
void gfc_resolve_transpose (gfc_expr *, gfc_expr *);
void gfc_resolve_trim (gfc_expr *, gfc_expr *);
@@ -346,17 +371,27 @@ void gfc_resolve_verify (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *);
/* Intrinsic subroutine resolution. */
+void gfc_resolve_chdir_sub (gfc_code *);
void gfc_resolve_cpu_time (gfc_code *);
void gfc_resolve_exit (gfc_code *);
void gfc_resolve_flush (gfc_code *);
void gfc_resolve_fstat_sub (gfc_code *);
+void gfc_resolve_gerror (gfc_code *);
void gfc_resolve_getarg (gfc_code *);
void gfc_resolve_getcwd_sub (gfc_code *);
+void gfc_resolve_getlog (gfc_code *);
void gfc_resolve_get_command (gfc_code *);
void gfc_resolve_get_command_argument (gfc_code *);
void gfc_resolve_get_environment_variable (gfc_code *);
+void gfc_resolve_hostnm_sub (gfc_code *);
+void gfc_resolve_kill_sub (gfc_code *);
void gfc_resolve_mvbits (gfc_code *);
+void gfc_resolve_perror (gfc_code *);
void gfc_resolve_random_number (gfc_code *);
+void gfc_resolve_rename_sub (gfc_code *);
+void gfc_resolve_link_sub (gfc_code *);
+void gfc_resolve_symlnk_sub (gfc_code *);
+void gfc_resolve_sleep_sub (gfc_code *);
void gfc_resolve_stat_sub (gfc_code *);
void gfc_resolve_system_clock (gfc_code *);
void gfc_resolve_system_sub (gfc_code *);
diff --git a/gcc/fortran/invoke.texi b/gcc/fortran/invoke.texi
index 376e9cc3101..e5b93902a38 100644
--- a/gcc/fortran/invoke.texi
+++ b/gcc/fortran/invoke.texi
@@ -119,7 +119,7 @@ by type. Explanations are in the following sections.
-fdollar-ok -fimplicit-none -fmax-identifier-length @gol
-std=@var{std}
-ffixed-line-length-@var{n} -ffixed-line-length-none @gol
--i8 -r8 -d8}
+-fdefault-double-8 -fdefault-integer-8 -fdefault-real-8 }
@item Warning Options
@xref{Warning Options,,Options to Request or Suppress Warnings}.
@@ -183,6 +183,23 @@ Specify the layout used by the the source file. The free form layout
was introduced in Fortran 90. Fixed form was traditionally used in
older Fortran programs.
+@cindex option, -fdefault-double-8
+@cindex -fdefault-double-8, option
+@item -fdefault-double-8
+Set the "DOUBLE PRECISION" type to an 8 byte wide.
+
+@cindex option, -fdefault-integer-8
+@cindex -fdefault-integer-8, option
+@item -fdefault-integer-8
+Set the default integer and logical types to an 8 byte wide type.
+Do nothing if this is already the default.
+
+@cindex option, -fdefault-real-8
+@cindex -fdefault-real-8, option
+@item -fdefault-real-8
+Set the default real type to an 8 byte wide type.
+Do nothing if this is already the default.
+
@cindex -fdollar-ok option
@cindex options, -fdollar-ok
@item -fdollar-ok
@@ -233,23 +250,6 @@ Specify that no implicit typing is allowed, unless overridden by explicit
Conform to the specified standard. Allowed values for @var{std} are
@samp{gnu}, @samp{f95} and @samp{f90}.
-@cindex option, -i8
-@cindex -i8, option
-@cindex option, -r8
-@cindex -r8, option
-@cindex option, -d8
-@cindex -d8, option
-@item -i8
-@item -r8
-@item -d8
-The @option{-i8} and @option{-r8} options set the default @code{INTEGER}
-and @code{REAL} kinds to @code{KIND=8}. The @option{-d8} option is
-equivalent to specifying both @option{-i8} and @option{-r8}.
-
-When @option{-r8} is specified, the @code{DOUBLE PRECISION} kind is set
-to @code{KIND=16} if the target supports a 16 byte floating point format.
-If no such format exists, the @code{DOUBLE PRECISION} kind is unchanged.
-
@end table
@node Warning Options
diff --git a/gcc/fortran/iresolve.c b/gcc/fortran/iresolve.c
index 9a30b7df2e1..746b97df444 100644
--- a/gcc/fortran/iresolve.c
+++ b/gcc/fortran/iresolve.c
@@ -253,6 +253,31 @@ gfc_resolve_char (gfc_expr * f, gfc_expr * a, gfc_expr * kind)
void
+gfc_resolve_chdir (gfc_expr * f, gfc_expr * d ATTRIBUTE_UNUSED)
+{
+ f->ts.type = BT_INTEGER;
+ f->ts.kind = gfc_default_integer_kind;
+ f->value.function.name = gfc_get_string (PREFIX("chdir_i%d"), f->ts.kind);
+}
+
+
+void
+gfc_resolve_chdir_sub (gfc_code * c)
+{
+ const char *name;
+ int kind;
+
+ if (c->ext.actual->next->expr != NULL)
+ kind = c->ext.actual->next->expr->ts.kind;
+ else
+ kind = gfc_default_integer_kind;
+
+ name = gfc_get_string (PREFIX("chdir_i%d_sub"), kind);
+ c->resolved_sym = gfc_get_intrinsic_sub_symbol (name);
+}
+
+
+void
gfc_resolve_cmplx (gfc_expr * f, gfc_expr * x, gfc_expr * y, gfc_expr * kind)
{
f->ts.type = BT_COMPLEX;
@@ -533,6 +558,14 @@ gfc_resolve_getuid (gfc_expr * f)
}
void
+gfc_resolve_hostnm (gfc_expr * f, gfc_expr * n ATTRIBUTE_UNUSED)
+{
+ f->ts.type = BT_INTEGER;
+ f->ts.kind = 4;
+ f->value.function.name = gfc_get_string (PREFIX ("hostnm"));
+}
+
+void
gfc_resolve_iand (gfc_expr * f, gfc_expr * i, gfc_expr * j)
{
/* If the kind of i and j are different, then g77 cross-promoted the
@@ -596,6 +629,15 @@ gfc_resolve_idnint (gfc_expr * f, gfc_expr * a)
void
+gfc_resolve_ierrno (gfc_expr * f)
+{
+ f->ts.type = BT_INTEGER;
+ f->ts.kind = gfc_default_integer_kind;
+ f->value.function.name = gfc_get_string (PREFIX("ierrno_i%d"), f->ts.kind);
+}
+
+
+void
gfc_resolve_ieor (gfc_expr * f, gfc_expr * i, gfc_expr * j)
{
/* If the kind of i and j are different, then g77 cross-promoted the
@@ -670,6 +712,17 @@ gfc_resolve_ishftc (gfc_expr * f, gfc_expr * i, gfc_expr * shift,
void
+gfc_resolve_kill (gfc_expr * f, ATTRIBUTE_UNUSED gfc_expr * p,
+ ATTRIBUTE_UNUSED gfc_expr * s)
+{
+ f->ts.type = BT_INTEGER;
+ f->ts.kind = gfc_default_integer_kind;
+
+ f->value.function.name = gfc_get_string (PREFIX("kill_i%d"), f->ts.kind);
+}
+
+
+void
gfc_resolve_lbound (gfc_expr * f, gfc_expr * array,
gfc_expr * dim)
{
@@ -708,6 +761,16 @@ gfc_resolve_len_trim (gfc_expr * f, gfc_expr * string)
void
+gfc_resolve_link (gfc_expr * f, gfc_expr * p1 ATTRIBUTE_UNUSED,
+ gfc_expr * p2 ATTRIBUTE_UNUSED)
+{
+ f->ts.type = BT_INTEGER;
+ f->ts.kind = gfc_default_integer_kind;
+ f->value.function.name = gfc_get_string (PREFIX("link_i%d"), f->ts.kind);
+}
+
+
+void
gfc_resolve_log (gfc_expr * f, gfc_expr * x)
{
f->ts = x->ts;
@@ -1019,6 +1082,16 @@ gfc_resolve_real (gfc_expr * f, gfc_expr * a, gfc_expr * kind)
void
+gfc_resolve_rename (gfc_expr * f, gfc_expr * p1 ATTRIBUTE_UNUSED,
+ gfc_expr * p2 ATTRIBUTE_UNUSED)
+{
+ f->ts.type = BT_INTEGER;
+ f->ts.kind = gfc_default_integer_kind;
+ f->value.function.name = gfc_get_string (PREFIX("rename_i%d"), f->ts.kind);
+}
+
+
+void
gfc_resolve_repeat (gfc_expr * f, gfc_expr * string,
gfc_expr * ncopies ATTRIBUTE_UNUSED)
{
@@ -1275,6 +1348,16 @@ gfc_resolve_sum (gfc_expr * f, gfc_expr * array, gfc_expr * dim,
}
+void
+gfc_resolve_symlnk (gfc_expr * f, gfc_expr * p1 ATTRIBUTE_UNUSED,
+ gfc_expr * p2 ATTRIBUTE_UNUSED)
+{
+ f->ts.type = BT_INTEGER;
+ f->ts.kind = gfc_default_integer_kind;
+ f->value.function.name = gfc_get_string (PREFIX("symlnk_i%d"), f->ts.kind);
+}
+
+
/* Resolve the g77 compatibility function SYSTEM. */
void
@@ -1305,6 +1388,24 @@ gfc_resolve_tanh (gfc_expr * f, gfc_expr * x)
void
+gfc_resolve_time (gfc_expr * f)
+{
+ f->ts.type = BT_INTEGER;
+ f->ts.kind = 4;
+ f->value.function.name = gfc_get_string (PREFIX("time_func"));
+}
+
+
+void
+gfc_resolve_time8 (gfc_expr * f)
+{
+ f->ts.type = BT_INTEGER;
+ f->ts.kind = 8;
+ f->value.function.name = gfc_get_string (PREFIX("time8_func"));
+}
+
+
+void
gfc_resolve_transfer (gfc_expr * f, gfc_expr * source ATTRIBUTE_UNUSED,
gfc_expr * mold, gfc_expr * size)
{
@@ -1490,6 +1591,70 @@ gfc_resolve_random_number (gfc_code * c ATTRIBUTE_UNUSED)
}
+void
+gfc_resolve_rename_sub (gfc_code * c)
+{
+ const char *name;
+ int kind;
+
+ if (c->ext.actual->next->next->expr != NULL)
+ kind = c->ext.actual->next->next->expr->ts.kind;
+ else
+ kind = gfc_default_integer_kind;
+
+ name = gfc_get_string (PREFIX("rename_i%d_sub"), kind);
+ c->resolved_sym = gfc_get_intrinsic_sub_symbol (name);
+}
+
+
+void
+gfc_resolve_kill_sub (gfc_code * c)
+{
+ const char *name;
+ int kind;
+
+ if (c->ext.actual->next->next->expr != NULL)
+ kind = c->ext.actual->next->next->expr->ts.kind;
+ else
+ kind = gfc_default_integer_kind;
+
+ name = gfc_get_string (PREFIX("kill_i%d_sub"), kind);
+ c->resolved_sym = gfc_get_intrinsic_sub_symbol (name);
+}
+
+
+void
+gfc_resolve_link_sub (gfc_code * c)
+{
+ const char *name;
+ int kind;
+
+ if (c->ext.actual->next->next->expr != NULL)
+ kind = c->ext.actual->next->next->expr->ts.kind;
+ else
+ kind = gfc_default_integer_kind;
+
+ name = gfc_get_string (PREFIX("link_i%d_sub"), kind);
+ c->resolved_sym = gfc_get_intrinsic_sub_symbol (name);
+}
+
+
+void
+gfc_resolve_symlnk_sub (gfc_code * c)
+{
+ const char *name;
+ int kind;
+
+ if (c->ext.actual->next->next->expr != NULL)
+ kind = c->ext.actual->next->next->expr->ts.kind;
+ else
+ kind = gfc_default_integer_kind;
+
+ name = gfc_get_string (PREFIX("symlnk_i%d_sub"), kind);
+ c->resolved_sym = gfc_get_intrinsic_sub_symbol (name);
+}
+
+
/* G77 compatibility subroutines etime() and dtime(). */
void
@@ -1514,6 +1679,22 @@ gfc_resolve_second_sub (gfc_code * c)
}
+void
+gfc_resolve_sleep_sub (gfc_code * c)
+{
+ const char *name;
+ int kind;
+
+ if (c->ext.actual->expr != NULL)
+ kind = c->ext.actual->expr->ts.kind;
+ else
+ kind = gfc_default_integer_kind;
+
+ name = gfc_get_string (PREFIX("sleep_i%d_sub"), kind);
+ c->resolved_sym = gfc_get_intrinsic_sub_symbol (name);
+}
+
+
/* G77 compatibility function srand(). */
void
@@ -1665,6 +1846,43 @@ gfc_resolve_flush (gfc_code * c)
c->resolved_sym = gfc_get_intrinsic_sub_symbol (name);
}
+
+void
+gfc_resolve_gerror (gfc_code * c)
+{
+ c->resolved_sym = gfc_get_intrinsic_sub_symbol (PREFIX ("gerror"));
+}
+
+
+void
+gfc_resolve_getlog (gfc_code * c)
+{
+ c->resolved_sym = gfc_get_intrinsic_sub_symbol (PREFIX ("getlog"));
+}
+
+
+void
+gfc_resolve_hostnm_sub (gfc_code * c)
+{
+ const char *name;
+ int kind;
+
+ if (c->ext.actual->next->expr != NULL)
+ kind = c->ext.actual->next->expr->ts.kind;
+ else
+ kind = gfc_default_integer_kind;
+
+ name = gfc_get_string (PREFIX("hostnm_i%d_sub"), kind);
+ c->resolved_sym = gfc_get_intrinsic_sub_symbol (name);
+}
+
+
+void
+gfc_resolve_perror (gfc_code * c)
+{
+ c->resolved_sym = gfc_get_intrinsic_sub_symbol (PREFIX ("perror_sub"));
+}
+
/* Resolve the STAT and FSTAT intrinsic subroutines. */
void
diff --git a/gcc/fortran/lang.opt b/gcc/fortran/lang.opt
index 976a2b436d2..bde1d753b07 100644
--- a/gcc/fortran/lang.opt
+++ b/gcc/fortran/lang.opt
@@ -69,9 +69,17 @@ Wunused-labels
F95
Warn when a label is unused
-d8
-F95 RejectNegative
-Set the default real and integer kinds to double precision
+fdefault-double-8
+F95
+Set the default double precision kind to an 8 byte wide type
+
+fdefault-integer-8
+F95
+Set the default integer kind to an 8 byte wide type
+
+fdefault-real-8
+F95
+Set the default real kind to an 8 byte wide type
fdollar-ok
F95
@@ -133,18 +141,10 @@ frepack-arrays
F95
Copy array sections into a contiguous block on procedure entry
-i8
-F95
-Set the default integer kind to double precision
-
qkind=
F95 RejectNegative Joined UInteger
-qkind=<n> Set the kind for a real with the 'q' exponent to 'n'
-r8
-F95
-Set the default real kind to double precision
-
std=f95
F95
Conform to the ISO Fortran 95 standard.
diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
index 35964003785..21fb0a83c52 100644
--- a/gcc/fortran/options.c
+++ b/gcc/fortran/options.c
@@ -57,6 +57,9 @@ gfc_init_options (unsigned int argc ATTRIBUTE_UNUSED,
gfc_option.warn_surprising = 0;
gfc_option.warn_unused_labels = 0;
+ gfc_option.flag_default_double = 0;
+ gfc_option.flag_default_integer = 0;
+ gfc_option.flag_default_real = 0;
gfc_option.flag_dollar_ok = 0;
gfc_option.flag_underscoring = 1;
gfc_option.flag_second_underscore = 1;
@@ -68,9 +71,6 @@ gfc_init_options (unsigned int argc ATTRIBUTE_UNUSED,
gfc_option.flag_repack_arrays = 0;
gfc_option.q_kind = gfc_default_double_kind;
- gfc_option.i8 = 0;
- gfc_option.r8 = 0;
- gfc_option.d8 = 0;
flag_argument_noalias = 2;
flag_errno_math = 0;
@@ -285,16 +285,16 @@ gfc_handle_option (size_t scode, const char *arg, int value)
gfc_option.q_kind = value;
break;
- case OPT_i8:
- gfc_option.i8 = value;
+ case OPT_fdefault_integer_8:
+ gfc_option.flag_default_integer = value;
break;
- case OPT_r8:
- gfc_option.r8 = value;
+ case OPT_fdefault_real_8:
+ gfc_option.flag_default_real = value;
break;
- case OPT_d8:
- gfc_option.d8 = value;
+ case OPT_fdefault_double_8:
+ gfc_option.flag_default_double = value;
break;
case OPT_I:
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c
index b53f8629fd1..2d0bff8c070 100644
--- a/gcc/fortran/trans-array.c
+++ b/gcc/fortran/trans-array.c
@@ -429,8 +429,8 @@ gfc_trans_allocate_array_storage (gfc_loopinfo * loop, gfc_ss_info * info,
if (onstack)
{
/* Make a temporary variable to hold the data. */
- tmp = fold (build2 (MINUS_EXPR, TREE_TYPE (nelem), nelem,
- integer_one_node));
+ tmp = fold_build2 (MINUS_EXPR, TREE_TYPE (nelem), nelem,
+ integer_one_node);
tmp = build_range_type (gfc_array_index_type, gfc_index_zero_node,
tmp);
tmp = build_array_type (gfc_get_element_type (TREE_TYPE (desc)),
@@ -508,8 +508,8 @@ gfc_trans_allocate_temp_array (gfc_loopinfo * loop, gfc_ss_info * info,
{
/* Callee allocated arrays may not have a known bound yet. */
if (loop->to[n])
- loop->to[n] = fold (build2 (MINUS_EXPR, gfc_array_index_type,
- loop->to[n], loop->from[n]));
+ loop->to[n] = fold_build2 (MINUS_EXPR, gfc_array_index_type,
+ loop->to[n], loop->from[n]);
loop->from[n] = gfc_index_zero_node;
}
@@ -569,18 +569,18 @@ gfc_trans_allocate_temp_array (gfc_loopinfo * loop, gfc_ss_info * info,
tmp = gfc_conv_descriptor_ubound (desc, gfc_rank_cst[n]);
gfc_add_modify_expr (&loop->pre, tmp, loop->to[n]);
- tmp = fold (build2 (PLUS_EXPR, gfc_array_index_type,
- loop->to[n], gfc_index_one_node));
+ tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type,
+ loop->to[n], gfc_index_one_node);
- size = fold (build2 (MULT_EXPR, gfc_array_index_type, size, tmp));
+ size = fold_build2 (MULT_EXPR, gfc_array_index_type, size, tmp);
size = gfc_evaluate_now (size, &loop->pre);
}
/* Get the size of the array. */
nelem = size;
if (size)
- size = fold (build2 (MULT_EXPR, gfc_array_index_type, size,
- TYPE_SIZE_UNIT (gfc_get_element_type (type))));
+ size = fold_build2 (MULT_EXPR, gfc_array_index_type, size,
+ TYPE_SIZE_UNIT (gfc_get_element_type (type)));
gfc_trans_allocate_array_storage (loop, info, size, nelem);
@@ -765,8 +765,8 @@ gfc_trans_array_constructor_value (stmtblock_t * pblock, tree type,
gfc_trans_array_ctor_element (&body, pointer, *poffset, &se,
c->expr);
- *poffset = fold (build2 (PLUS_EXPR, gfc_array_index_type,
- *poffset, gfc_index_one_node));
+ *poffset = fold_build2 (PLUS_EXPR, gfc_array_index_type,
+ *poffset, gfc_index_one_node);
}
else
{
@@ -832,8 +832,8 @@ gfc_trans_array_constructor_value (stmtblock_t * pblock, tree type,
tmp);
gfc_add_expr_to_block (&body, tmp);
- *poffset = fold (build2 (PLUS_EXPR, gfc_array_index_type,
- *poffset, bound));
+ *poffset = fold_build2 (PLUS_EXPR, gfc_array_index_type,
+ *poffset, bound);
}
if (!INTEGER_CST_P (*poffset))
{
@@ -1399,9 +1399,9 @@ gfc_conv_array_index_ref (gfc_se * se, tree pointer, tree * indices,
{
/* index = index + stride[n]*indices[n] */
tmp = gfc_conv_array_stride (se->expr, n);
- tmp = fold (build2 (MULT_EXPR, gfc_array_index_type, indices[n], tmp));
+ tmp = fold_build2 (MULT_EXPR, gfc_array_index_type, indices[n], tmp);
- index = fold (build2 (PLUS_EXPR, gfc_array_index_type, index, tmp));
+ index = fold_build2 (PLUS_EXPR, gfc_array_index_type, index, tmp);
}
/* Result = data[index]. */
@@ -1429,11 +1429,11 @@ gfc_trans_array_bound_check (gfc_se * se, tree descriptor, tree index, int n)
index = gfc_evaluate_now (index, &se->pre);
/* Check lower bound. */
tmp = gfc_conv_array_lbound (descriptor, n);
- fault = fold (build2 (LT_EXPR, boolean_type_node, index, tmp));
+ fault = fold_build2 (LT_EXPR, boolean_type_node, index, tmp);
/* Check upper bound. */
tmp = gfc_conv_array_ubound (descriptor, n);
- cond = fold (build2 (GT_EXPR, boolean_type_node, index, tmp));
- fault = fold (build2 (TRUTH_OR_EXPR, boolean_type_node, fault, cond));
+ cond = fold_build2 (GT_EXPR, boolean_type_node, index, tmp);
+ fault = fold_build2 (TRUTH_OR_EXPR, boolean_type_node, fault, cond);
gfc_trans_runtime_check (fault, gfc_strconst_fault, &se->pre);
@@ -1528,10 +1528,10 @@ gfc_conv_array_index_offset (gfc_se * se, gfc_ss_info * info, int dim, int i,
/* Multiply the loop variable by the stride and delta. */
index = se->loop->loopvar[i];
- index = fold (build2 (MULT_EXPR, gfc_array_index_type, index,
- info->stride[i]));
- index = fold (build2 (PLUS_EXPR, gfc_array_index_type, index,
- info->delta[i]));
+ index = fold_build2 (MULT_EXPR, gfc_array_index_type, index,
+ info->stride[i]);
+ index = fold_build2 (PLUS_EXPR, gfc_array_index_type, index,
+ info->delta[i]);
if (ar->dimen_type[dim] == DIMEN_VECTOR)
{
@@ -1552,12 +1552,12 @@ gfc_conv_array_index_offset (gfc_se * se, gfc_ss_info * info, int dim, int i,
gcc_assert (se->loop);
index = se->loop->loopvar[se->loop->order[i]];
if (!integer_zerop (info->delta[i]))
- index = fold (build2 (PLUS_EXPR, gfc_array_index_type,
- index, info->delta[i]));
+ index = fold_build2 (PLUS_EXPR, gfc_array_index_type,
+ index, info->delta[i]);
}
/* Multiply by the stride. */
- index = fold (build2 (MULT_EXPR, gfc_array_index_type, index, stride));
+ index = fold_build2 (MULT_EXPR, gfc_array_index_type, index, stride);
return index;
}
@@ -1583,7 +1583,7 @@ gfc_conv_scalarized_array_ref (gfc_se * se, gfc_array_ref * ar)
info->stride0);
/* Add the offset for this dimension to the stored offset for all other
dimensions. */
- index = fold (build2 (PLUS_EXPR, gfc_array_index_type, index, info->offset));
+ index = fold_build2 (PLUS_EXPR, gfc_array_index_type, index, info->offset);
tmp = gfc_build_indirect_ref (info->data);
se->expr = gfc_build_array_ref (tmp, index);
@@ -1643,25 +1643,25 @@ gfc_conv_array_ref (gfc_se * se, gfc_array_ref * ar)
indexse.expr = gfc_evaluate_now (indexse.expr, &se->pre);
tmp = gfc_conv_array_lbound (se->expr, n);
- cond = fold (build2 (LT_EXPR, boolean_type_node,
- indexse.expr, tmp));
+ cond = fold_build2 (LT_EXPR, boolean_type_node,
+ indexse.expr, tmp);
fault =
- fold (build2 (TRUTH_OR_EXPR, boolean_type_node, fault, cond));
+ fold_build2 (TRUTH_OR_EXPR, boolean_type_node, fault, cond);
tmp = gfc_conv_array_ubound (se->expr, n);
- cond = fold (build2 (GT_EXPR, boolean_type_node,
- indexse.expr, tmp));
+ cond = fold_build2 (GT_EXPR, boolean_type_node,
+ indexse.expr, tmp);
fault =
- fold (build2 (TRUTH_OR_EXPR, boolean_type_node, fault, cond));
+ fold_build2 (TRUTH_OR_EXPR, boolean_type_node, fault, cond);
}
/* Multiply the index by the stride. */
stride = gfc_conv_array_stride (se->expr, n);
- tmp = fold (build2 (MULT_EXPR, gfc_array_index_type, indexse.expr,
- stride));
+ tmp = fold_build2 (MULT_EXPR, gfc_array_index_type, indexse.expr,
+ stride);
/* And add it to the total. */
- index = fold (build2 (PLUS_EXPR, gfc_array_index_type, index, tmp));
+ index = fold_build2 (PLUS_EXPR, gfc_array_index_type, index, tmp);
}
if (flag_bounds_check)
@@ -1669,7 +1669,7 @@ gfc_conv_array_ref (gfc_se * se, gfc_array_ref * ar)
tmp = gfc_conv_array_offset (se->expr);
if (!integer_zerop (tmp))
- index = fold (build2 (PLUS_EXPR, gfc_array_index_type, index, tmp));
+ index = fold_build2 (PLUS_EXPR, gfc_array_index_type, index, tmp);
/* Access the calculated element. */
tmp = gfc_conv_array_data (se->expr);
@@ -1730,8 +1730,8 @@ gfc_trans_preloop_setup (gfc_loopinfo * loop, int dim, int flag,
stride);
gfc_add_block_to_block (pblock, &se.pre);
- info->offset = fold (build2 (PLUS_EXPR, gfc_array_index_type,
- info->offset, index));
+ info->offset = fold_build2 (PLUS_EXPR, gfc_array_index_type,
+ info->offset, index);
info->offset = gfc_evaluate_now (info->offset, pblock);
}
@@ -1769,8 +1769,8 @@ gfc_trans_preloop_setup (gfc_loopinfo * loop, int dim, int flag,
index = gfc_conv_array_index_offset (&se, info, info->dim[i], i,
ar, stride);
gfc_add_block_to_block (pblock, &se.pre);
- info->offset = fold (build2 (PLUS_EXPR, gfc_array_index_type,
- info->offset, index));
+ info->offset = fold_build2 (PLUS_EXPR, gfc_array_index_type,
+ info->offset, index);
info->offset = gfc_evaluate_now (info->offset, pblock);
}
@@ -2168,28 +2168,28 @@ gfc_conv_ss_startstride (gfc_loopinfo * loop)
/* Check lower bound. */
bound = gfc_conv_array_lbound (desc, dim);
tmp = info->start[n];
- tmp = fold (build2 (LT_EXPR, boolean_type_node, tmp, bound));
- fault = fold (build2 (TRUTH_OR_EXPR, boolean_type_node, fault,
- tmp));
+ tmp = fold_build2 (LT_EXPR, boolean_type_node, tmp, bound);
+ fault = fold_build2 (TRUTH_OR_EXPR, boolean_type_node, fault,
+ tmp);
/* Check the upper bound. */
bound = gfc_conv_array_ubound (desc, dim);
end = gfc_conv_section_upper_bound (ss, n, &block);
- tmp = fold (build2 (GT_EXPR, boolean_type_node, end, bound));
- fault = fold (build2 (TRUTH_OR_EXPR, boolean_type_node, fault,
- tmp));
+ tmp = fold_build2 (GT_EXPR, boolean_type_node, end, bound);
+ fault = fold_build2 (TRUTH_OR_EXPR, boolean_type_node, fault,
+ tmp);
/* Check the section sizes match. */
- tmp = fold (build2 (MINUS_EXPR, gfc_array_index_type, end,
- info->start[n]));
- tmp = fold (build2 (FLOOR_DIV_EXPR, gfc_array_index_type, tmp,
- info->stride[n]));
+ tmp = fold_build2 (MINUS_EXPR, gfc_array_index_type, end,
+ info->start[n]);
+ tmp = fold_build2 (FLOOR_DIV_EXPR, gfc_array_index_type, tmp,
+ info->stride[n]);
/* We remember the size of the first section, and check all the
others against this. */
if (size[n])
{
tmp =
- fold (build2 (NE_EXPR, boolean_type_node, tmp, size[n]));
+ fold_build2 (NE_EXPR, boolean_type_node, tmp, size[n]);
fault =
build2 (TRUTH_OR_EXPR, boolean_type_node, fault, tmp);
}
@@ -2467,10 +2467,10 @@ gfc_conv_loop_setup (gfc_loopinfo * loop)
/* To = from + (size - 1) * stride. */
tmp = gfc_conv_mpz_to_tree (i, gfc_index_integer_kind);
if (!integer_onep (info->stride[n]))
- tmp = fold (build2 (MULT_EXPR, gfc_array_index_type,
- tmp, info->stride[n]));
- loop->to[n] = fold (build2 (PLUS_EXPR, gfc_array_index_type,
- loop->from[n], tmp));
+ tmp = fold_build2 (MULT_EXPR, gfc_array_index_type,
+ tmp, info->stride[n]);
+ loop->to[n] = fold_build2 (PLUS_EXPR, gfc_array_index_type,
+ loop->from[n], tmp);
}
else
{
@@ -2508,10 +2508,10 @@ gfc_conv_loop_setup (gfc_loopinfo * loop)
with start = 0, this simplifies to
last = end / step;
for (i = 0; i<=last; i++){...}; */
- tmp = fold (build2 (MINUS_EXPR, gfc_array_index_type,
- loop->to[n], loop->from[n]));
- tmp = fold (build2 (TRUNC_DIV_EXPR, gfc_array_index_type,
- tmp, info->stride[n]));
+ tmp = fold_build2 (MINUS_EXPR, gfc_array_index_type,
+ loop->to[n], loop->from[n]);
+ tmp = fold_build2 (TRUNC_DIV_EXPR, gfc_array_index_type,
+ tmp, info->stride[n]);
loop->to[n] = gfc_evaluate_now (tmp, &loop->pre);
/* Make the loop variable start at 0. */
loop->from[n] = gfc_index_zero_node;
@@ -2563,12 +2563,12 @@ gfc_conv_loop_setup (gfc_loopinfo * loop)
{
/* Calculate the offset relative to the loop variable.
First multiply by the stride. */
- tmp = fold (build2 (MULT_EXPR, gfc_array_index_type,
- loop->from[n], info->stride[n]));
+ tmp = fold_build2 (MULT_EXPR, gfc_array_index_type,
+ loop->from[n], info->stride[n]);
/* Then subtract this from our starting value. */
- tmp = fold (build2 (MINUS_EXPR, gfc_array_index_type,
- info->start[n], tmp));
+ tmp = fold_build2 (MINUS_EXPR, gfc_array_index_type,
+ info->start[n], tmp);
info->delta[n] = gfc_evaluate_now (tmp, &loop->pre);
}
@@ -2650,8 +2650,8 @@ gfc_array_init_size (tree descriptor, int rank, tree * poffset,
gfc_add_modify_expr (pblock, tmp, se.expr);
/* Work out the offset for this component. */
- tmp = fold (build2 (MULT_EXPR, gfc_array_index_type, se.expr, stride));
- offset = fold (build2 (MINUS_EXPR, gfc_array_index_type, offset, tmp));
+ tmp = fold_build2 (MULT_EXPR, gfc_array_index_type, se.expr, stride);
+ offset = fold_build2 (MINUS_EXPR, gfc_array_index_type, offset, tmp);
/* Start the calculation for the size of this dimension. */
size = build2 (MINUS_EXPR, gfc_array_index_type,
@@ -2671,17 +2671,17 @@ gfc_array_init_size (tree descriptor, int rank, tree * poffset,
gfc_add_modify_expr (pblock, tmp, stride);
/* Calculate the size of this dimension. */
- size = fold (build2 (PLUS_EXPR, gfc_array_index_type, se.expr, size));
+ size = fold_build2 (PLUS_EXPR, gfc_array_index_type, se.expr, size);
/* Multiply the stride by the number of elements in this dimension. */
- stride = fold (build2 (MULT_EXPR, gfc_array_index_type, stride, size));
+ stride = fold_build2 (MULT_EXPR, gfc_array_index_type, stride, size);
stride = gfc_evaluate_now (stride, pblock);
}
/* The stride is the number of elements in the array, so multiply by the
size of an element to get the total size. */
tmp = TYPE_SIZE_UNIT (gfc_get_element_type (type));
- size = fold (build2 (MULT_EXPR, gfc_array_index_type, stride, tmp));
+ size = fold_build2 (MULT_EXPR, gfc_array_index_type, stride, tmp);
if (poffset != NULL)
{
@@ -2957,8 +2957,8 @@ gfc_trans_array_bounds (tree type, gfc_symbol * sym, tree * poffset,
gfc_add_modify_expr (pblock, ubound, se.expr);
}
/* The offset of this dimension. offset = offset - lbound * stride. */
- tmp = fold (build2 (MULT_EXPR, gfc_array_index_type, lbound, size));
- offset = fold (build2 (MINUS_EXPR, gfc_array_index_type, offset, tmp));
+ tmp = fold_build2 (MULT_EXPR, gfc_array_index_type, lbound, size);
+ offset = fold_build2 (MINUS_EXPR, gfc_array_index_type, offset, tmp);
/* The size of this dimension, and the stride of the next. */
if (dim + 1 < as->rank)
@@ -2969,10 +2969,10 @@ gfc_trans_array_bounds (tree type, gfc_symbol * sym, tree * poffset,
if (ubound != NULL_TREE && !(stride && INTEGER_CST_P (stride)))
{
/* Calculate stride = size * (ubound + 1 - lbound). */
- tmp = fold (build2 (MINUS_EXPR, gfc_array_index_type,
- gfc_index_one_node, lbound));
- tmp = fold (build2 (PLUS_EXPR, gfc_array_index_type, ubound, tmp));
- tmp = fold (build2 (MULT_EXPR, gfc_array_index_type, size, tmp));
+ tmp = fold_build2 (MINUS_EXPR, gfc_array_index_type,
+ gfc_index_one_node, lbound);
+ tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type, ubound, tmp);
+ tmp = fold_build2 (MULT_EXPR, gfc_array_index_type, size, tmp);
if (stride)
gfc_add_modify_expr (pblock, stride, tmp);
else
@@ -3045,7 +3045,7 @@ gfc_trans_auto_array_allocation (tree decl, gfc_symbol * sym, tree fnbody)
/* The size is the number of elements in the array, so multiply by the
size of an element to get the total size. */
tmp = TYPE_SIZE_UNIT (gfc_get_element_type (type));
- size = fold (build2 (MULT_EXPR, gfc_array_index_type, size, tmp));
+ size = fold_build2 (MULT_EXPR, gfc_array_index_type, size, tmp);
/* Allocate memory to hold the data. */
tmp = gfc_chainon_list (NULL_TREE, size);
@@ -3203,7 +3203,7 @@ gfc_trans_dummy_array_bias (gfc_symbol * sym, tree tmpdesc, tree body)
partial = gfc_create_var (boolean_type_node, "partial");
TREE_USED (partial) = 1;
tmp = gfc_conv_descriptor_stride (dumdesc, gfc_rank_cst[0]);
- tmp = fold (build2 (EQ_EXPR, boolean_type_node, tmp, integer_one_node));
+ tmp = fold_build2 (EQ_EXPR, boolean_type_node, tmp, integer_one_node);
gfc_add_modify_expr (&block, partial, tmp);
}
else
@@ -3304,11 +3304,11 @@ gfc_trans_dummy_array_bias (gfc_symbol * sym, tree tmpdesc, tree body)
{
/* Check (ubound(a) - lbound(a) == ubound(b) - lbound(b)). */
- tmp = fold (build2 (MINUS_EXPR, gfc_array_index_type,
- ubound, lbound));
+ tmp = fold_build2 (MINUS_EXPR, gfc_array_index_type,
+ ubound, lbound);
stride = build2 (MINUS_EXPR, gfc_array_index_type,
dubound, dlbound);
- tmp = fold (build2 (NE_EXPR, gfc_array_index_type, tmp, stride));
+ tmp = fold_build2 (NE_EXPR, gfc_array_index_type, tmp, stride);
gfc_trans_runtime_check (tmp, gfc_strconst_bounds, &block);
}
}
@@ -3317,12 +3317,12 @@ gfc_trans_dummy_array_bias (gfc_symbol * sym, tree tmpdesc, tree body)
/* For assumed shape arrays move the upper bound by the same amount
as the lower bound. */
tmp = build2 (MINUS_EXPR, gfc_array_index_type, dubound, dlbound);
- tmp = fold (build2 (PLUS_EXPR, gfc_array_index_type, tmp, lbound));
+ tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type, tmp, lbound);
gfc_add_modify_expr (&block, ubound, tmp);
}
/* The offset of this dimension. offset = offset - lbound * stride. */
- tmp = fold (build2 (MULT_EXPR, gfc_array_index_type, lbound, stride));
- offset = fold (build2 (MINUS_EXPR, gfc_array_index_type, offset, tmp));
+ tmp = fold_build2 (MULT_EXPR, gfc_array_index_type, lbound, stride);
+ offset = fold_build2 (MINUS_EXPR, gfc_array_index_type, offset, tmp);
/* The size of this dimension, and the stride of the next. */
if (n + 1 < sym->as->rank)
@@ -3343,12 +3343,12 @@ gfc_trans_dummy_array_bias (gfc_symbol * sym, tree tmpdesc, tree body)
else
{
/* Calculate stride = size * (ubound + 1 - lbound). */
- tmp = fold (build2 (MINUS_EXPR, gfc_array_index_type,
- gfc_index_one_node, lbound));
- tmp = fold (build2 (PLUS_EXPR, gfc_array_index_type,
- ubound, tmp));
- size = fold (build2 (MULT_EXPR, gfc_array_index_type,
- size, tmp));
+ tmp = fold_build2 (MINUS_EXPR, gfc_array_index_type,
+ gfc_index_one_node, lbound);
+ tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type,
+ ubound, tmp);
+ size = fold_build2 (MULT_EXPR, gfc_array_index_type,
+ size, tmp);
stmt_packed = size;
}
@@ -3759,10 +3759,10 @@ gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr, gfc_ss * ss)
}
tmp = gfc_conv_array_lbound (desc, n);
- tmp = fold (build2 (MINUS_EXPR, TREE_TYPE (tmp), start, tmp));
+ tmp = fold_build2 (MINUS_EXPR, TREE_TYPE (tmp), start, tmp);
- tmp = fold (build2 (MULT_EXPR, TREE_TYPE (tmp), tmp, stride));
- offset = fold (build2 (PLUS_EXPR, TREE_TYPE (tmp), offset, tmp));
+ tmp = fold_build2 (MULT_EXPR, TREE_TYPE (tmp), tmp, stride);
+ offset = fold_build2 (PLUS_EXPR, TREE_TYPE (tmp), offset, tmp);
if (info->ref->u.ar.dimen_type[n] == DIMEN_ELEMENT)
{
@@ -3779,9 +3779,9 @@ gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr, gfc_ss * ss)
if (!integer_onep (from))
{
/* Make sure the new section starts at 1. */
- tmp = fold (build2 (MINUS_EXPR, gfc_array_index_type,
- gfc_index_one_node, from));
- to = fold (build2 (PLUS_EXPR, gfc_array_index_type, to, tmp));
+ tmp = fold_build2 (MINUS_EXPR, gfc_array_index_type,
+ gfc_index_one_node, from);
+ to = fold_build2 (PLUS_EXPR, gfc_array_index_type, to, tmp);
from = gfc_index_one_node;
}
tmp = gfc_conv_descriptor_lbound (parm, gfc_rank_cst[dim]);
@@ -3793,12 +3793,12 @@ gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr, gfc_ss * ss)
/* Multiply the stride by the section stride to get the
total stride. */
- stride = fold (build2 (MULT_EXPR, gfc_array_index_type,
- stride, info->stride[dim]));
+ stride = fold_build2 (MULT_EXPR, gfc_array_index_type,
+ stride, info->stride[dim]);
if (se->direct_byref)
- base = fold (build2 (MINUS_EXPR, TREE_TYPE (base),
- base, stride));
+ base = fold_build2 (MINUS_EXPR, TREE_TYPE (base),
+ base, stride);
/* Store the new stride. */
tmp = gfc_conv_descriptor_stride (parm, gfc_rank_cst[dim]);
diff --git a/gcc/fortran/trans-common.c b/gcc/fortran/trans-common.c
index c8db6e745e2..42e67123328 100644
--- a/gcc/fortran/trans-common.c
+++ b/gcc/fortran/trans-common.c
@@ -379,7 +379,7 @@ build_common_decl (gfc_common_head *com, tree union_type, bool is_init)
backend declarations for all of the elements. */
static void
-create_common (gfc_common_head *com, segment_info * head)
+create_common (gfc_common_head *com, segment_info * head, bool saw_equiv)
{
segment_info *s, *next_s;
tree union_type;
@@ -388,8 +388,16 @@ create_common (gfc_common_head *com, segment_info * head)
tree decl;
bool is_init = false;
- /* Declare the variables inside the common block. */
- union_type = make_node (UNION_TYPE);
+ /* Declare the variables inside the common block.
+ If the current common block contains any equivalence object, then
+ make a UNION_TYPE node, otherwise RECORD_TYPE. This will let the
+ alias analyzer work well when there is no address overlapping for
+ common variables in the current common block. */
+ if (saw_equiv)
+ union_type = make_node (UNION_TYPE);
+ else
+ union_type = make_node (RECORD_TYPE);
+
rli = start_record_layout (union_type);
field_link = &TYPE_FIELDS (union_type);
@@ -703,7 +711,7 @@ find_equivalence (segment_info *n)
segment list multiple times to include indirect equivalences. */
static void
-add_equivalences (void)
+add_equivalences (bool *saw_equiv)
{
segment_info *f;
bool more;
@@ -718,6 +726,8 @@ add_equivalences (void)
{
f->sym->equiv_built = 1;
more = find_equivalence (f);
+ if (more)
+ *saw_equiv = true;
}
}
}
@@ -788,10 +798,12 @@ translate_common (gfc_common_head *common, gfc_symbol *var_list)
HOST_WIDE_INT current_offset;
unsigned HOST_WIDE_INT align;
unsigned HOST_WIDE_INT max_align;
+ bool saw_equiv;
common_segment = NULL;
current_offset = 0;
max_align = 1;
+ saw_equiv = false;
/* Add symbols to the segment. */
for (sym = var_list; sym; sym = sym->common_next)
@@ -821,7 +833,7 @@ translate_common (gfc_common_head *common, gfc_symbol *var_list)
/* Add all objects directly or indirectly equivalenced with this
symbol. */
- add_equivalences ();
+ add_equivalences (&saw_equiv);
if (current_segment->offset < 0)
gfc_error ("The equivalence set for '%s' cause an invalid "
@@ -865,7 +877,7 @@ translate_common (gfc_common_head *common, gfc_symbol *var_list)
common->name, &common->where, common_segment->offset);
}
- create_common (common, common_segment);
+ create_common (common, common_segment, saw_equiv);
}
@@ -878,6 +890,7 @@ finish_equivalences (gfc_namespace *ns)
gfc_symbol *sym;
HOST_WIDE_INT offset;
unsigned HOST_WIDE_INT align;
+ bool dummy;
for (z = ns->equiv; z; z = z->next)
for (y = z->eq; y; y = y->eq)
@@ -888,7 +901,7 @@ finish_equivalences (gfc_namespace *ns)
current_segment = get_segment_info (sym, 0);
/* All objects directly or indirectly equivalenced with this symbol. */
- add_equivalences ();
+ add_equivalences (&dummy);
/* Align the block. */
offset = align_segment (&align);
@@ -899,7 +912,7 @@ finish_equivalences (gfc_namespace *ns)
apply_segment_offset (current_segment, offset);
/* Create the decl. */
- create_common (NULL, current_segment);
+ create_common (NULL, current_segment, true);
break;
}
}
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index b79d0743dec..2db5fbdc7bb 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -513,7 +513,7 @@ gfc_conv_powi (gfc_se * se, int n, tree * tmpvar)
op1 = op0;
}
- tmp = fold (build2 (MULT_EXPR, TREE_TYPE (op0), op0, op1));
+ tmp = fold_build2 (MULT_EXPR, TREE_TYPE (op0), op0, op1);
tmp = gfc_evaluate_now (tmp, &se->pre);
if (n < POWI_TABLE_SIZE)
@@ -738,9 +738,8 @@ gfc_conv_string_tmp (gfc_se * se, tree type, tree len)
if (gfc_can_put_var_on_stack (len))
{
/* Create a temporary variable to hold the result. */
- tmp = fold (build2 (MINUS_EXPR, gfc_charlen_type_node, len,
- convert (gfc_charlen_type_node,
- integer_one_node)));
+ tmp = fold_build2 (MINUS_EXPR, gfc_charlen_type_node, len,
+ convert (gfc_charlen_type_node, integer_one_node));
tmp = build_range_type (gfc_array_index_type, gfc_index_zero_node, tmp);
tmp = build_array_type (gfc_character1_type_node, tmp);
var = gfc_create_var (tmp, "str");
@@ -797,8 +796,8 @@ gfc_conv_concat_op (gfc_se * se, gfc_expr * expr)
len = TYPE_MAX_VALUE (TYPE_DOMAIN (type));
if (len == NULL_TREE)
{
- len = fold (build2 (PLUS_EXPR, TREE_TYPE (lse.string_length),
- lse.string_length, rse.string_length));
+ len = fold_build2 (PLUS_EXPR, TREE_TYPE (lse.string_length),
+ lse.string_length, rse.string_length);
}
type = build_pointer_type (type);
@@ -990,11 +989,11 @@ gfc_conv_expr_op (gfc_se * se, gfc_expr * expr)
if (lop)
{
/* The result of logical ops is always boolean_type_node. */
- tmp = fold (build2 (code, type, lse.expr, rse.expr));
+ tmp = fold_build2 (code, type, lse.expr, rse.expr);
se->expr = convert (type, tmp);
}
else
- se->expr = fold (build2 (code, type, lse.expr, rse.expr));
+ se->expr = fold_build2 (code, type, lse.expr, rse.expr);
/* Add the post blocks. */
gfc_add_block_to_block (&se->post, &rse.post);
diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c
index f24db5fe7f9..45581745b44 100644
--- a/gcc/fortran/trans-intrinsic.c
+++ b/gcc/fortran/trans-intrinsic.c
@@ -264,11 +264,11 @@ build_round_expr (stmtblock_t * pblock, tree arg, tree type)
neg = build_real (argtype, r);
tmp = gfc_build_const (argtype, integer_zero_node);
- cond = fold (build2 (GT_EXPR, boolean_type_node, arg, tmp));
+ cond = fold_build2 (GT_EXPR, boolean_type_node, arg, tmp);
- tmp = fold (build3 (COND_EXPR, argtype, cond, pos, neg));
- tmp = fold (build2 (PLUS_EXPR, argtype, arg, tmp));
- return fold (build1 (FIX_TRUNC_EXPR, type, tmp));
+ tmp = fold_build3 (COND_EXPR, argtype, cond, pos, neg);
+ tmp = fold_build2 (PLUS_EXPR, argtype, arg, tmp);
+ return fold_build1 (FIX_TRUNC_EXPR, type, tmp);
}
@@ -645,8 +645,8 @@ gfc_conv_intrinsic_bound (gfc_se * se, gfc_expr * expr, int upper)
gcc_assert (se->ss->expr == expr);
gfc_advance_se_ss_chain (se);
bound = se->loop->loopvar[0];
- bound = fold (build2 (MINUS_EXPR, gfc_array_index_type, bound,
- se->loop->from[0]));
+ bound = fold_build2 (MINUS_EXPR, gfc_array_index_type, bound,
+ se->loop->from[0]);
}
else
{
@@ -657,8 +657,8 @@ gfc_conv_intrinsic_bound (gfc_se * se, gfc_expr * expr, int upper)
gfc_add_block_to_block (&se->pre, &argse.pre);
bound = argse.expr;
/* Convert from one based to zero based. */
- bound = fold (build2 (MINUS_EXPR, gfc_array_index_type, bound,
- gfc_index_one_node));
+ bound = fold_build2 (MINUS_EXPR, gfc_array_index_type, bound,
+ gfc_index_one_node);
}
/* TODO: don't re-evaluate the descriptor on each iteration. */
@@ -683,11 +683,11 @@ gfc_conv_intrinsic_bound (gfc_se * se, gfc_expr * expr, int upper)
if (flag_bounds_check)
{
bound = gfc_evaluate_now (bound, &se->pre);
- cond = fold (build2 (LT_EXPR, boolean_type_node,
- bound, build_int_cst (TREE_TYPE (bound), 0)));
+ cond = fold_build2 (LT_EXPR, boolean_type_node,
+ bound, build_int_cst (TREE_TYPE (bound), 0));
tmp = gfc_rank_cst[GFC_TYPE_ARRAY_RANK (TREE_TYPE (desc))];
- tmp = fold (build2 (GE_EXPR, boolean_type_node, bound, tmp));
- cond = fold(build2 (TRUTH_ORIF_EXPR, boolean_type_node, cond, tmp));
+ tmp = fold_build2 (GE_EXPR, boolean_type_node, bound, tmp);
+ cond = fold_build2 (TRUTH_ORIF_EXPR, boolean_type_node, cond, tmp);
gfc_trans_runtime_check (cond, gfc_strconst_fault, &se->pre);
}
}
@@ -765,7 +765,7 @@ gfc_conv_intrinsic_cmplx (gfc_se * se, gfc_expr * expr, int both)
else
imag = build_real_from_int_cst (TREE_TYPE (type), integer_zero_node);
- se->expr = fold (build2 (COMPLEX_EXPR, type, real, imag));
+ se->expr = fold_build2 (COMPLEX_EXPR, type, real, imag);
}
/* Remainder function MOD(A, P) = A - INT(A / P) * P
@@ -903,11 +903,11 @@ gfc_conv_intrinsic_sign (gfc_se * se, gfc_expr * expr)
type = TREE_TYPE (arg);
zero = gfc_build_const (type, integer_zero_node);
- testa = fold (build2 (GE_EXPR, boolean_type_node, arg, zero));
- testb = fold (build2 (GE_EXPR, boolean_type_node, arg2, zero));
- tmp = fold (build2 (TRUTH_XOR_EXPR, boolean_type_node, testa, testb));
- se->expr = fold (build3 (COND_EXPR, type, tmp,
- build1 (NEGATE_EXPR, type, arg), arg));
+ testa = fold_build2 (GE_EXPR, boolean_type_node, arg, zero);
+ testb = fold_build2 (GE_EXPR, boolean_type_node, arg2, zero);
+ tmp = fold_build2 (TRUTH_XOR_EXPR, boolean_type_node, testa, testb);
+ se->expr = fold_build3 (COND_EXPR, type, tmp,
+ build1 (NEGATE_EXPR, type, arg), arg);
}
@@ -1433,7 +1433,7 @@ gfc_conv_intrinsic_minmaxloc (gfc_se * se, gfc_expr * expr, int op)
/* Most negative(+HUGE) for maxval, most negative (-HUGE) for minval. */
if (op == GT_EXPR)
- tmp = fold (build1 (NEGATE_EXPR, TREE_TYPE (tmp), tmp));
+ tmp = fold_build1 (NEGATE_EXPR, TREE_TYPE (tmp), tmp);
gfc_add_modify_expr (&se->pre, limit, tmp);
/* Initialize the scalarizer. */
@@ -1452,12 +1452,12 @@ gfc_conv_intrinsic_minmaxloc (gfc_se * se, gfc_expr * expr, int op)
size we need to return zero. Otherwise use the first element of the
array, in case all elements are equal to the limit.
i.e. pos = (ubound >= lbound) ? lbound, lbound - 1; */
- tmp = fold (build2 (MINUS_EXPR, gfc_array_index_type,
- loop.from[0], gfc_index_one_node));
- cond = fold (build2 (GE_EXPR, boolean_type_node,
- loop.to[0], loop.from[0]));
- tmp = fold (build3 (COND_EXPR, gfc_array_index_type, cond,
- loop.from[0], tmp));
+ tmp = fold_build2 (MINUS_EXPR, gfc_array_index_type,
+ loop.from[0], gfc_index_one_node);
+ cond = fold_build2 (GE_EXPR, boolean_type_node,
+ loop.to[0], loop.from[0]);
+ tmp = fold_build3 (COND_EXPR, gfc_array_index_type, cond,
+ loop.from[0], tmp);
gfc_add_modify_expr (&loop.pre, pos, tmp);
gfc_mark_ss_chain_used (arrayss, 1);
@@ -1521,9 +1521,9 @@ gfc_conv_intrinsic_minmaxloc (gfc_se * se, gfc_expr * expr, int op)
gfc_cleanup_loop (&loop);
/* Return a value in the range 1..SIZE(array). */
- tmp = fold (build2 (MINUS_EXPR, gfc_array_index_type, loop.from[0],
- gfc_index_one_node));
- tmp = fold (build2 (MINUS_EXPR, gfc_array_index_type, pos, tmp));
+ tmp = fold_build2 (MINUS_EXPR, gfc_array_index_type, loop.from[0],
+ gfc_index_one_node);
+ tmp = fold_build2 (MINUS_EXPR, gfc_array_index_type, pos, tmp);
/* And convert to the required type. */
se->expr = convert (type, tmp);
}
@@ -1573,7 +1573,7 @@ gfc_conv_intrinsic_minmaxval (gfc_se * se, gfc_expr * expr, int op)
/* Most negative(-HUGE) for maxval, most positive (-HUGE) for minval. */
if (op == GT_EXPR)
- tmp = fold (build1 (NEGATE_EXPR, TREE_TYPE (tmp), tmp));
+ tmp = fold_build1 (NEGATE_EXPR, TREE_TYPE (tmp), tmp);
gfc_add_modify_expr (&se->pre, limit, tmp);
/* Walk the arguments. */
@@ -1670,8 +1670,8 @@ gfc_conv_intrinsic_btest (gfc_se * se, gfc_expr * expr)
tmp = build2 (LSHIFT_EXPR, type, build_int_cst (type, 1), arg2);
tmp = build2 (BIT_AND_EXPR, type, arg, tmp);
- tmp = fold (build2 (NE_EXPR, boolean_type_node, tmp,
- build_int_cst (type, 0)));
+ tmp = fold_build2 (NE_EXPR, boolean_type_node, tmp,
+ build_int_cst (type, 0));
type = gfc_typenode_for_spec (&expr->ts);
se->expr = convert (type, tmp);
}
@@ -1689,7 +1689,7 @@ gfc_conv_intrinsic_bitop (gfc_se * se, gfc_expr * expr, int op)
arg = TREE_VALUE (arg);
type = TREE_TYPE (arg);
- se->expr = fold (build2 (op, type, arg, arg2));
+ se->expr = fold_build2 (op, type, arg, arg2);
}
/* Bitwise not. */
@@ -1719,15 +1719,15 @@ gfc_conv_intrinsic_singlebitop (gfc_se * se, gfc_expr * expr, int set)
arg = TREE_VALUE (arg);
type = TREE_TYPE (arg);
- tmp = fold (build2 (LSHIFT_EXPR, type, build_int_cst (type, 1), arg2));
+ tmp = fold_build2 (LSHIFT_EXPR, type, build_int_cst (type, 1), arg2);
if (set)
op = BIT_IOR_EXPR;
else
{
op = BIT_AND_EXPR;
- tmp = fold (build1 (BIT_NOT_EXPR, type, tmp));
+ tmp = fold_build1 (BIT_NOT_EXPR, type, tmp);
}
- se->expr = fold (build2 (op, type, arg, tmp));
+ se->expr = fold_build2 (op, type, arg, tmp);
}
/* Extract a sequence of bits.
@@ -1755,7 +1755,7 @@ gfc_conv_intrinsic_ibits (gfc_se * se, gfc_expr * expr)
tmp = build2 (RSHIFT_EXPR, type, arg, arg2);
- se->expr = fold (build2 (BIT_AND_EXPR, type, tmp, mask));
+ se->expr = fold_build2 (BIT_AND_EXPR, type, tmp, mask);
}
/* ISHFT (I, SHIFT) = (abs (shift) >= BIT_SIZE (i))
@@ -1782,10 +1782,10 @@ gfc_conv_intrinsic_ishft (gfc_se * se, gfc_expr * expr)
type = TREE_TYPE (arg);
utype = gfc_unsigned_type (type);
- width = fold (build1 (ABS_EXPR, TREE_TYPE (arg2), arg2));
+ width = fold_build1 (ABS_EXPR, TREE_TYPE (arg2), arg2);
/* Left shift if positive. */
- lshift = fold (build2 (LSHIFT_EXPR, type, arg, width));
+ lshift = fold_build2 (LSHIFT_EXPR, type, arg, width);
/* Right shift if negative.
We convert to an unsigned type because we want a logical shift.
@@ -1795,18 +1795,18 @@ gfc_conv_intrinsic_ishft (gfc_se * se, gfc_expr * expr)
rshift = fold_convert (type, build2 (RSHIFT_EXPR, utype,
convert (utype, arg), width));
- tmp = fold (build2 (GE_EXPR, boolean_type_node, arg2,
- build_int_cst (TREE_TYPE (arg2), 0)));
- tmp = fold (build3 (COND_EXPR, type, tmp, lshift, rshift));
+ tmp = fold_build2 (GE_EXPR, boolean_type_node, arg2,
+ build_int_cst (TREE_TYPE (arg2), 0));
+ tmp = fold_build3 (COND_EXPR, type, tmp, lshift, rshift);
/* The Fortran standard allows shift widths <= BIT_SIZE(I), whereas
gcc requires a shift width < BIT_SIZE(I), so we have to catch this
special case. */
num_bits = build_int_cst (TREE_TYPE (arg2), TYPE_PRECISION (type));
- cond = fold (build2 (GE_EXPR, boolean_type_node, width, num_bits));
+ cond = fold_build2 (GE_EXPR, boolean_type_node, width, num_bits);
- se->expr = fold (build3 (COND_EXPR, type, cond,
- build_int_cst (type, 0), tmp));
+ se->expr = fold_build3 (COND_EXPR, type, cond,
+ build_int_cst (type, 0), tmp);
}
/* Circular shift. AKA rotate or barrel shift. */
@@ -1872,19 +1872,19 @@ gfc_conv_intrinsic_ishftc (gfc_se * se, gfc_expr * expr)
type = TREE_TYPE (arg);
/* Rotate left if positive. */
- lrot = fold (build2 (LROTATE_EXPR, type, arg, arg2));
+ lrot = fold_build2 (LROTATE_EXPR, type, arg, arg2);
/* Rotate right if negative. */
- tmp = fold (build1 (NEGATE_EXPR, TREE_TYPE (arg2), arg2));
- rrot = fold (build2 (RROTATE_EXPR, type, arg, tmp));
+ tmp = fold_build1 (NEGATE_EXPR, TREE_TYPE (arg2), arg2);
+ rrot = fold_build2 (RROTATE_EXPR, type, arg, tmp);
zero = build_int_cst (TREE_TYPE (arg2), 0);
- tmp = fold (build2 (GT_EXPR, boolean_type_node, arg2, zero));
- rrot = fold (build3 (COND_EXPR, type, tmp, lrot, rrot));
+ tmp = fold_build2 (GT_EXPR, boolean_type_node, arg2, zero);
+ rrot = fold_build3 (COND_EXPR, type, tmp, lrot, rrot);
/* Do nothing if shift == 0. */
- tmp = fold (build2 (EQ_EXPR, boolean_type_node, arg2, zero));
- se->expr = fold (build3 (COND_EXPR, type, tmp, arg, rrot));
+ tmp = fold_build2 (EQ_EXPR, boolean_type_node, arg2, zero);
+ se->expr = fold_build3 (COND_EXPR, type, tmp, arg, rrot);
}
/* The length of a character string. */
@@ -2037,7 +2037,7 @@ gfc_conv_intrinsic_merge (gfc_se * se, gfc_expr * expr)
se->string_length = len;
}
type = TREE_TYPE (tsource);
- se->expr = fold (build3 (COND_EXPR, type, mask, tsource, fsource));
+ se->expr = fold_build3 (COND_EXPR, type, mask, tsource, fsource);
}
@@ -2374,18 +2374,18 @@ prepare_arg_info (gfc_se * se, gfc_expr * expr,
rcs->fdigits = convert (masktype, tmp);
wbits = build_int_cst (NULL_TREE, TYPE_PRECISION (rcs->type) - 1);
wbits = convert (masktype, wbits);
- rcs->edigits = fold (build2 (MINUS_EXPR, masktype, wbits, tmp));
+ rcs->edigits = fold_build2 (MINUS_EXPR, masktype, wbits, tmp);
/* Form masks for exponent/fraction/sign */
one = gfc_build_const (masktype, integer_one_node);
- rcs->smask = fold (build2 (LSHIFT_EXPR, masktype, one, wbits));
- rcs->f1 = fold (build2 (LSHIFT_EXPR, masktype, one, rcs->fdigits));
- rcs->emask = fold (build2 (MINUS_EXPR, masktype, rcs->smask, rcs->f1));
- rcs->fmask = fold (build2 (MINUS_EXPR, masktype, rcs->f1, one));
+ rcs->smask = fold_build2 (LSHIFT_EXPR, masktype, one, wbits);
+ rcs->f1 = fold_build2 (LSHIFT_EXPR, masktype, one, rcs->fdigits);
+ rcs->emask = fold_build2 (MINUS_EXPR, masktype, rcs->smask, rcs->f1);
+ rcs->fmask = fold_build2 (MINUS_EXPR, masktype, rcs->f1, one);
/* Form bias. */
- tmp = fold (build2 (MINUS_EXPR, masktype, rcs->edigits, one));
- tmp = fold (build2 (LSHIFT_EXPR, masktype, one, tmp));
- rcs->bias = fold (build2 (MINUS_EXPR, masktype, tmp ,one));
+ tmp = fold_build2 (MINUS_EXPR, masktype, rcs->edigits, one);
+ tmp = fold_build2 (LSHIFT_EXPR, masktype, one, tmp);
+ rcs->bias = fold_build2 (MINUS_EXPR, masktype, tmp ,one);
if (all)
{
@@ -2510,7 +2510,7 @@ gfc_conv_intrinsic_rrspacing (gfc_se * se, gfc_expr * expr)
fraction = rcs.frac;
one = gfc_build_const (masktype, integer_one_node);
zero = gfc_build_const (masktype, integer_zero_node);
- t2 = fold (build2 (PLUS_EXPR, masktype, rcs.edigits, one));
+ t2 = fold_build2 (PLUS_EXPR, masktype, rcs.edigits, one);
t1 = call_builtin_clz (masktype, fraction);
tmp = build2 (PLUS_EXPR, masktype, t1, one);
@@ -2519,8 +2519,8 @@ gfc_conv_intrinsic_rrspacing (gfc_se * se, gfc_expr * expr)
cond = build2 (EQ_EXPR, boolean_type_node, rcs.expn, zero);
fraction = build3 (COND_EXPR, masktype, cond, tmp, fraction);
- tmp = fold (build2 (PLUS_EXPR, masktype, rcs.bias, fdigits));
- tmp = fold (build2 (LSHIFT_EXPR, masktype, tmp, fdigits));
+ tmp = fold_build2 (PLUS_EXPR, masktype, rcs.bias, fdigits);
+ tmp = fold_build2 (LSHIFT_EXPR, masktype, tmp, fdigits);
tmp = build2 (BIT_IOR_EXPR, masktype, tmp, fraction);
cond2 = build2 (EQ_EXPR, boolean_type_node, rcs.frac, zero);
@@ -2634,7 +2634,7 @@ gfc_conv_intrinsic_repeat (gfc_se * se, gfc_expr * expr)
len = TREE_VALUE (args);
tmp = gfc_advance_chain (args, 2);
ncopies = TREE_VALUE (tmp);
- len = fold (build2 (MULT_EXPR, gfc_int4_type_node, len, ncopies));
+ len = fold_build2 (MULT_EXPR, gfc_int4_type_node, len, ncopies);
type = gfc_get_character_type (expr->ts.kind, expr->ts.cl);
var = gfc_conv_string_tmp (se, build_pointer_type (type), len);
@@ -2977,6 +2977,7 @@ gfc_conv_intrinsic_function (gfc_se * se, gfc_expr * expr)
gfc_conv_intrinsic_bound (se, expr, 1);
break;
+ case GFC_ISYM_CHDIR:
case GFC_ISYM_DOT_PRODUCT:
case GFC_ISYM_ETIME:
case GFC_ISYM_FNUM:
@@ -2985,12 +2986,20 @@ gfc_conv_intrinsic_function (gfc_se * se, gfc_expr * expr)
case GFC_ISYM_GETGID:
case GFC_ISYM_GETPID:
case GFC_ISYM_GETUID:
+ case GFC_ISYM_HOSTNM:
+ case GFC_ISYM_KILL:
+ case GFC_ISYM_IERRNO:
case GFC_ISYM_IRAND:
+ case GFC_ISYM_LINK:
case GFC_ISYM_MATMUL:
case GFC_ISYM_RAND:
+ case GFC_ISYM_RENAME:
case GFC_ISYM_SECOND:
case GFC_ISYM_STAT:
+ case GFC_ISYM_SYMLNK:
case GFC_ISYM_SYSTEM:
+ case GFC_ISYM_TIME:
+ case GFC_ISYM_TIME8:
case GFC_ISYM_UMASK:
case GFC_ISYM_UNLINK:
gfc_conv_intrinsic_funcall (se, expr);
diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c
index 524412725ab..3adf86879e9 100644
--- a/gcc/fortran/trans-stmt.c
+++ b/gcc/fortran/trans-stmt.c
@@ -587,9 +587,9 @@ gfc_trans_simple_do (gfc_code * code, stmtblock_t *pblock, tree dovar,
/* Only execute the loop if the number of iterations is positive. */
if (tree_int_cst_sgn (step) > 0)
- cond = fold (build2 (LE_EXPR, boolean_type_node, dovar, to));
+ cond = fold_build2 (LE_EXPR, boolean_type_node, dovar, to);
else
- cond = fold (build2 (GE_EXPR, boolean_type_node, dovar, to));
+ cond = fold_build2 (GE_EXPR, boolean_type_node, dovar, to);
tmp = build3_v (COND_EXPR, cond, tmp, build_empty_stmt ());
gfc_add_expr_to_block (pblock, tmp);
@@ -685,11 +685,11 @@ gfc_trans_do (gfc_code * code)
/* Initialize loop count. This code is executed before we enter the
loop body. We generate: count = (to + step - from) / step. */
- tmp = fold (build2 (MINUS_EXPR, type, step, from));
- tmp = fold (build2 (PLUS_EXPR, type, to, tmp));
+ tmp = fold_build2 (MINUS_EXPR, type, step, from);
+ tmp = fold_build2 (PLUS_EXPR, type, to, tmp);
if (TREE_CODE (type) == INTEGER_TYPE)
{
- tmp = fold (build2 (TRUNC_DIV_EXPR, type, tmp, step));
+ tmp = fold_build2 (TRUNC_DIV_EXPR, type, tmp, step);
count = gfc_create_var (type, "count");
}
else
@@ -697,8 +697,8 @@ gfc_trans_do (gfc_code * code)
/* TODO: We could use the same width as the real type.
This would probably cause more problems that it solves
when we implement "long double" types. */
- tmp = fold (build2 (RDIV_EXPR, type, tmp, step));
- tmp = fold (build1 (FIX_TRUNC_EXPR, gfc_array_index_type, tmp));
+ tmp = fold_build2 (RDIV_EXPR, type, tmp, step);
+ tmp = fold_build1 (FIX_TRUNC_EXPR, gfc_array_index_type, tmp);
count = gfc_create_var (gfc_array_index_type, "count");
}
gfc_add_modify_expr (&block, count, tmp);
@@ -810,7 +810,7 @@ gfc_trans_do_while (gfc_code * code)
gfc_init_se (&cond, NULL);
gfc_conv_expr_val (&cond, code->expr);
gfc_add_block_to_block (&block, &cond.pre);
- cond.expr = fold (build1 (TRUTH_NOT_EXPR, boolean_type_node, cond.expr));
+ cond.expr = fold_build1 (TRUTH_NOT_EXPR, boolean_type_node, cond.expr);
/* Build "IF (! cond) GOTO exit_label". */
tmp = build1_v (GOTO_EXPR, exit_label);
@@ -1388,9 +1388,9 @@ gfc_trans_forall_loop (forall_info *forall_tmp, int nvar, tree body, int mask_fl
gfc_add_modify_expr (&block, var, start);
/* Initialize the loop counter. */
- tmp = fold (build2 (MINUS_EXPR, TREE_TYPE (var), step, start));
- tmp = fold (build2 (PLUS_EXPR, TREE_TYPE (var), end, tmp));
- tmp = fold (build2 (TRUNC_DIV_EXPR, TREE_TYPE (var), tmp, step));
+ tmp = fold_build2 (MINUS_EXPR, TREE_TYPE (var), step, start);
+ tmp = fold_build2 (PLUS_EXPR, TREE_TYPE (var), end, tmp);
+ tmp = fold_build2 (TRUNC_DIV_EXPR, TREE_TYPE (var), tmp, step);
gfc_add_modify_expr (&block, count, tmp);
/* The loop expression. */
@@ -1479,8 +1479,8 @@ gfc_do_allocate (tree bytesize, tree size, tree * pdata, stmtblock_t * pblock,
if (INTEGER_CST_P (size))
{
- tmp = fold (build2 (MINUS_EXPR, gfc_array_index_type, size,
- gfc_index_one_node));
+ tmp = fold_build2 (MINUS_EXPR, gfc_array_index_type, size,
+ gfc_index_one_node);
}
else
tmp = NULL_TREE;
@@ -1548,7 +1548,7 @@ generate_loop_for_temp_to_lhs (gfc_expr *expr, tree tmp1, tree size,
gfc_add_block_to_block (&block, &lse.post);
/* Increment the count1. */
- tmp = fold (build2 (PLUS_EXPR, TREE_TYPE (count1), count1, size));
+ tmp = fold_build2 (PLUS_EXPR, TREE_TYPE (count1), count1, size);
gfc_add_modify_expr (&block, count1, tmp);
tmp = gfc_finish_block (&block);
}
@@ -1582,8 +1582,8 @@ generate_loop_for_temp_to_lhs (gfc_expr *expr, tree tmp1, tree size,
/* Form the expression of the temporary. */
if (lss != gfc_ss_terminator)
{
- index = fold (build2 (PLUS_EXPR, gfc_array_index_type,
- count1, count2));
+ index = fold_build2 (PLUS_EXPR, gfc_array_index_type,
+ count1, count2);
rse.expr = gfc_build_array_ref (tmp1, index);
}
/* Translate expr. */
@@ -1610,15 +1610,15 @@ generate_loop_for_temp_to_lhs (gfc_expr *expr, tree tmp1, tree size,
gfc_add_expr_to_block (&body, tmp);
/* Increment count2. */
- tmp = fold (build2 (PLUS_EXPR, gfc_array_index_type,
- count2, gfc_index_one_node));
+ tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type,
+ count2, gfc_index_one_node);
gfc_add_modify_expr (&body, count2, tmp);
/* Increment count3. */
if (count3)
{
- tmp = fold (build2 (PLUS_EXPR, gfc_array_index_type,
- count3, gfc_index_one_node));
+ tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type,
+ count3, gfc_index_one_node);
gfc_add_modify_expr (&body, count3, tmp);
}
@@ -1629,7 +1629,7 @@ generate_loop_for_temp_to_lhs (gfc_expr *expr, tree tmp1, tree size,
gfc_cleanup_loop (&loop1);
/* Increment count1. */
- tmp = fold (build2 (PLUS_EXPR, TREE_TYPE (count1), count1, size));
+ tmp = fold_build2 (PLUS_EXPR, TREE_TYPE (count1), count1, size);
gfc_add_modify_expr (&block, count1, tmp);
tmp = gfc_finish_block (&block);
}
@@ -1689,7 +1689,7 @@ generate_loop_for_rhs_to_temp (gfc_expr *expr2, tree tmp1, tree size,
gfc_conv_expr (&rse, expr2);
/* Form the expression of the temporary. */
- index = fold (build2 (PLUS_EXPR, gfc_array_index_type, count1, count2));
+ index = fold_build2 (PLUS_EXPR, gfc_array_index_type, count1, count2);
lse.expr = gfc_build_array_ref (tmp1, index);
}
@@ -1720,15 +1720,15 @@ generate_loop_for_rhs_to_temp (gfc_expr *expr2, tree tmp1, tree size,
else
{
/* Increment count2. */
- tmp = fold (build2 (PLUS_EXPR, gfc_array_index_type,
- count2, gfc_index_one_node));
+ tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type,
+ count2, gfc_index_one_node);
gfc_add_modify_expr (&body1, count2, tmp);
/* Increment count3. */
if (count3)
{
- tmp = fold (build2 (PLUS_EXPR, gfc_array_index_type,
- count3, gfc_index_one_node));
+ tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type,
+ count3, gfc_index_one_node);
gfc_add_modify_expr (&body1, count3, tmp);
}
@@ -1743,7 +1743,7 @@ generate_loop_for_rhs_to_temp (gfc_expr *expr2, tree tmp1, tree size,
as tree nodes in SS may not be valid in different scope. */
}
/* Increment count1. */
- tmp = fold (build2 (PLUS_EXPR, TREE_TYPE (count1), count1, size));
+ tmp = fold_build2 (PLUS_EXPR, TREE_TYPE (count1), count1, size);
gfc_add_modify_expr (&block, count1, tmp);
tmp = gfc_finish_block (&block);
@@ -1800,11 +1800,11 @@ compute_inner_temp_size (gfc_expr *expr1, gfc_expr *expr2,
/* Figure out how many elements we need. */
for (i = 0; i < loop.dimen; i++)
{
- tmp = fold (build2 (MINUS_EXPR, gfc_array_index_type,
- gfc_index_one_node, loop.from[i]));
- tmp = fold (build2 (PLUS_EXPR, gfc_array_index_type,
- tmp, loop.to[i]));
- size = fold (build2 (MULT_EXPR, gfc_array_index_type, size, tmp));
+ tmp = fold_build2 (MINUS_EXPR, gfc_array_index_type,
+ gfc_index_one_node, loop.from[i]);
+ tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type,
+ tmp, loop.to[i]);
+ size = fold_build2 (MULT_EXPR, gfc_array_index_type, size, tmp);
}
gfc_add_block_to_block (pblock, &loop.pre);
size = gfc_evaluate_now (size, pblock);
@@ -1868,7 +1868,7 @@ allocate_temp_for_forall_nest (forall_info * nested_forall_info, tree type,
size = compute_overall_iter_number (nested_forall_info, inner_size, block);
unit = TYPE_SIZE_UNIT (type);
- bytesize = fold (build2 (MULT_EXPR, gfc_array_index_type, size, unit));
+ bytesize = fold_build2 (MULT_EXPR, gfc_array_index_type, size, unit);
*ptemp1 = NULL;
temp1 = gfc_do_allocate (bytesize, size, ptemp1, block, type);
@@ -2033,8 +2033,8 @@ gfc_trans_pointer_assign_need_temp (gfc_expr * expr1, gfc_expr * expr2,
gfc_add_block_to_block (&body, &rse.post);
/* Increment count. */
- tmp = fold (build2 (PLUS_EXPR, gfc_array_index_type,
- count, gfc_index_one_node));
+ tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type,
+ count, gfc_index_one_node);
gfc_add_modify_expr (&body, count, tmp);
tmp = gfc_finish_block (&body);
@@ -2078,8 +2078,8 @@ gfc_trans_pointer_assign_need_temp (gfc_expr * expr1, gfc_expr * expr2,
gfc_add_modify_expr (&body, lse.expr, rse.expr);
gfc_add_block_to_block (&body, &lse.post);
/* Increment count. */
- tmp = fold (build2 (PLUS_EXPR, gfc_array_index_type,
- count, gfc_index_one_node));
+ tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type,
+ count, gfc_index_one_node);
gfc_add_modify_expr (&body, count, tmp);
tmp = gfc_finish_block (&body);
@@ -2122,8 +2122,8 @@ gfc_trans_pointer_assign_need_temp (gfc_expr * expr1, gfc_expr * expr2,
gfc_add_block_to_block (&body, &lse.post);
/* Increment count. */
- tmp = fold (build2 (PLUS_EXPR, gfc_array_index_type,
- count, gfc_index_one_node));
+ tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type,
+ count, gfc_index_one_node);
gfc_add_modify_expr (&body, count, tmp);
tmp = gfc_finish_block (&body);
@@ -2167,8 +2167,8 @@ gfc_trans_pointer_assign_need_temp (gfc_expr * expr1, gfc_expr * expr2,
gfc_add_block_to_block (&body, &lse.post);
/* Increment count. */
- tmp = fold (build2 (PLUS_EXPR, gfc_array_index_type,
- count, gfc_index_one_node));
+ tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type,
+ count, gfc_index_one_node);
gfc_add_modify_expr (&body, count, tmp);
tmp = gfc_finish_block (&body);
@@ -2345,14 +2345,14 @@ gfc_trans_forall_1 (gfc_code * code, forall_info * nested_forall_info)
lenvar = NULL_TREE;
/* size = (end + step - start) / step. */
- tmp = fold (build2 (MINUS_EXPR, TREE_TYPE (start[n]),
- step[n], start[n]));
- tmp = fold (build2 (PLUS_EXPR, TREE_TYPE (end[n]), end[n], tmp));
+ tmp = fold_build2 (MINUS_EXPR, TREE_TYPE (start[n]),
+ step[n], start[n]);
+ tmp = fold_build2 (PLUS_EXPR, TREE_TYPE (end[n]), end[n], tmp);
- tmp = fold (build2 (FLOOR_DIV_EXPR, TREE_TYPE (tmp), tmp, step[n]));
+ tmp = fold_build2 (FLOOR_DIV_EXPR, TREE_TYPE (tmp), tmp, step[n]);
tmp = convert (gfc_array_index_type, tmp);
- size = fold (build2 (MULT_EXPR, gfc_array_index_type, size, tmp));
+ size = fold_build2 (MULT_EXPR, gfc_array_index_type, size, tmp);
}
/* Record the nvar and size of current forall level. */
@@ -2376,8 +2376,8 @@ gfc_trans_forall_1 (gfc_code * code, forall_info * nested_forall_info)
if (code->expr)
{
/* Allocate the mask temporary. */
- bytesize = fold (build2 (MULT_EXPR, gfc_array_index_type, size,
- TYPE_SIZE_UNIT (boolean_type_node)));
+ bytesize = fold_build2 (MULT_EXPR, gfc_array_index_type, size,
+ TYPE_SIZE_UNIT (boolean_type_node));
mask = gfc_do_allocate (bytesize, size, &pmask, &block, boolean_type_node);
@@ -2658,8 +2658,8 @@ gfc_evaluate_where_mask (gfc_expr * me, forall_info * nested_forall_info,
else
{
/* Increment count. */
- tmp1 = fold (build2 (PLUS_EXPR, gfc_array_index_type, count,
- gfc_index_one_node));
+ tmp1 = fold_build2 (PLUS_EXPR, gfc_array_index_type, count,
+ gfc_index_one_node);
gfc_add_modify_expr (&body1, count, tmp1);
/* Generate the copying loops. */
@@ -2825,8 +2825,8 @@ gfc_trans_where_assign (gfc_expr *expr1, gfc_expr *expr2, tree mask,
if (lss == gfc_ss_terminator)
{
/* Increment count1. */
- tmp = fold (build2 (PLUS_EXPR, gfc_array_index_type,
- count1, gfc_index_one_node));
+ tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type,
+ count1, gfc_index_one_node);
gfc_add_modify_expr (&body, count1, tmp);
/* Use the scalar assignment as is. */
@@ -2841,8 +2841,8 @@ gfc_trans_where_assign (gfc_expr *expr1, gfc_expr *expr2, tree mask,
{
/* Increment count1 before finish the main body of a scalarized
expression. */
- tmp = fold (build2 (PLUS_EXPR, gfc_array_index_type,
- count1, gfc_index_one_node));
+ tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type,
+ count1, gfc_index_one_node);
gfc_add_modify_expr (&body, count1, tmp);
gfc_trans_scalarized_loop_boundary (&loop, &body);
@@ -2884,15 +2884,15 @@ gfc_trans_where_assign (gfc_expr *expr1, gfc_expr *expr2, tree mask,
gfc_add_expr_to_block (&body, tmp);
/* Increment count2. */
- tmp = fold (build2 (PLUS_EXPR, gfc_array_index_type,
- count2, gfc_index_one_node));
+ tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type,
+ count2, gfc_index_one_node);
gfc_add_modify_expr (&body, count2, tmp);
}
else
{
/* Increment count1. */
- tmp = fold (build2 (PLUS_EXPR, gfc_array_index_type,
- count1, gfc_index_one_node));
+ tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type,
+ count1, gfc_index_one_node);
gfc_add_modify_expr (&body, count1, tmp);
}
diff --git a/gcc/fortran/trans-types.c b/gcc/fortran/trans-types.c
index 3ac068c0f11..11f17ddee60 100644
--- a/gcc/fortran/trans-types.c
+++ b/gcc/fortran/trans-types.c
@@ -187,10 +187,10 @@ gfc_init_kinds (void)
/* Choose the default integer kind. We choose 4 unless the user
directs us otherwise. */
- if (gfc_option.i8)
+ if (gfc_option.flag_default_integer)
{
if (!saw_i8)
- fatal_error ("integer kind=8 not available for -i8 option");
+ fatal_error ("integer kind=8 not available for -fdefault-integer-8 option");
gfc_default_integer_kind = 8;
}
else if (saw_i4)
@@ -199,10 +199,10 @@ gfc_init_kinds (void)
gfc_default_integer_kind = gfc_integer_kinds[i_index - 1].kind;
/* Choose the default real kind. Again, we choose 4 when possible. */
- if (gfc_option.r8)
+ if (gfc_option.flag_default_real)
{
if (!saw_r8)
- fatal_error ("real kind=8 not available for -r8 option");
+ fatal_error ("real kind=8 not available for -fdefault-real-8 option");
gfc_default_real_kind = 8;
}
else if (saw_r4)
@@ -210,9 +210,16 @@ gfc_init_kinds (void)
else
gfc_default_real_kind = gfc_real_kinds[0].kind;
- /* Choose the default double kind. If -r8 is specified, we use kind=16,
- if it's available, otherwise we do not change anything. */
- if (gfc_option.r8 && saw_r16)
+ /* Choose the default double kind. If -fdefault-real and -fdefault-double
+ are specified, we use kind=8, if it's available. If -fdefault-real is
+ specified without -fdefault-double, we use kind=16, if it's available.
+ Otherwise we do not change anything. */
+ if (gfc_option.flag_default_double && !gfc_option.flag_default_real)
+ fatal_error ("Use of -fdefault-double-8 requires -fdefault-real-8");
+
+ if (gfc_option.flag_default_real && gfc_option.flag_default_double && saw_r8)
+ gfc_default_double_kind = 8;
+ else if (gfc_option.flag_default_real && saw_r16)
gfc_default_double_kind = 16;
else if (saw_r4 && saw_r8)
gfc_default_double_kind = 8;
@@ -926,8 +933,8 @@ gfc_get_dtype (tree type)
if (size && !INTEGER_CST_P (size))
{
tmp = build_int_cst (gfc_array_index_type, GFC_DTYPE_SIZE_SHIFT);
- tmp = fold (build2 (LSHIFT_EXPR, gfc_array_index_type, size, tmp));
- dtype = fold (build2 (PLUS_EXPR, gfc_array_index_type, tmp, dtype));
+ tmp = fold_build2 (LSHIFT_EXPR, gfc_array_index_type, size, tmp);
+ dtype = fold_build2 (PLUS_EXPR, gfc_array_index_type, tmp, dtype);
}
/* If we don't know the size we leave it as zero. This should never happen
for anything that is actually used. */
@@ -1160,11 +1167,11 @@ gfc_get_array_type_bounds (tree etype, int dimen, tree * lbound,
if (upper != NULL_TREE && lower != NULL_TREE && stride != NULL_TREE)
{
- tmp = fold (build2 (MINUS_EXPR, gfc_array_index_type, upper, lower));
- tmp = fold (build2 (PLUS_EXPR, gfc_array_index_type, tmp,
- gfc_index_one_node));
+ tmp = fold_build2 (MINUS_EXPR, gfc_array_index_type, upper, lower);
+ tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type, tmp,
+ gfc_index_one_node);
stride =
- fold (build2 (MULT_EXPR, gfc_array_index_type, tmp, stride));
+ fold_build2 (MULT_EXPR, gfc_array_index_type, tmp, stride);
/* Check the folding worked. */
gcc_assert (INTEGER_CST_P (stride));
}
diff --git a/gcc/fortran/trans.c b/gcc/fortran/trans.c
index 8c9d342c5c2..70630cbecab 100644
--- a/gcc/fortran/trans.c
+++ b/gcc/fortran/trans.c
@@ -152,7 +152,7 @@ gfc_add_modify_expr (stmtblock_t * pblock, tree lhs, tree rhs)
|| AGGREGATE_TYPE_P (TREE_TYPE (lhs)));
#endif
- tmp = fold (build2_v (MODIFY_EXPR, lhs, rhs));
+ tmp = fold_build2 (MODIFY_EXPR, void_type_node, lhs, rhs);
gfc_add_expr_to_block (pblock, tmp);
}
diff --git a/gcc/gcc.c b/gcc/gcc.c
index eda3fa49f53..342ffa69d35 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -4381,6 +4381,7 @@ do_spec_path (struct prefix_list *pl, const char *option,
static size_t bufsize = 0;
static char *buffer;
int idx;
+ bool multilib_p = false;
/* Used on systems which record the specified -L dirs
and use them to search for dynamic linking. */
@@ -4403,6 +4404,7 @@ do_spec_path (struct prefix_list *pl, const char *option,
strcat (buffer, machine_suffix);
if (is_directory (buffer, dir_for_machine_suffix, 1))
{
+ multilib_p = true;
do_spec_1 (option, separate_options, NULL);
if (separate_options)
do_spec_1 (" ", 0, NULL);
@@ -4416,6 +4418,7 @@ do_spec_path (struct prefix_list *pl, const char *option,
{
if (is_directory (pl->prefix, dir_for_no_suffix, 1))
{
+ multilib_p = true;
do_spec_1 (option, separate_options, NULL);
if (separate_options)
do_spec_1 (" ", 0, NULL);
@@ -4426,7 +4429,7 @@ do_spec_path (struct prefix_list *pl, const char *option,
}
}
- if (only_subdir)
+ if (only_subdir || multilib_p)
return;
if (machine_suffix)
@@ -6188,10 +6191,6 @@ main (int argc, const char **argv)
startfile_prefix_spec exclusively. */
else if (*cross_compile == '0' || target_system_root)
{
- if (*md_exec_prefix)
- add_sysrooted_prefix (&startfile_prefixes, md_exec_prefix, "GCC",
- PREFIX_PRIORITY_LAST, 0, 1);
-
if (*md_startfile_prefix)
add_sysrooted_prefix (&startfile_prefixes, md_startfile_prefix,
"GCC", PREFIX_PRIORITY_LAST, 0, 1);
diff --git a/gcc/gcov.c b/gcc/gcov.c
index 6675a06b60e..66aa742fdd6 100644
--- a/gcc/gcov.c
+++ b/gcc/gcov.c
@@ -1,7 +1,7 @@
/* Gcov.c: prepend line execution counts and branch probabilities to a
source file.
Copyright (C) 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
Contributed by James E. Wilson of Cygnus Support.
Mangled by Bob Manson of Cygnus Support.
Mangled further by Nathan Sidwell <nathan@codesourcery.com>
diff --git a/gcc/genopinit.c b/gcc/genopinit.c
index a71abb074d3..92b1c207544 100644
--- a/gcc/genopinit.c
+++ b/gcc/genopinit.c
@@ -125,7 +125,6 @@ static const char * const optabs[] =
"nearbyint_optab->handlers[$A].insn_code = CODE_FOR_$(nearbyint$a2$)",
"rint_optab->handlers[$A].insn_code = CODE_FOR_$(rint$a2$)",
"lrint_optab->handlers[$A].insn_code = CODE_FOR_$(lrint$a2$)",
- "llrint_optab->handlers[$A].insn_code = CODE_FOR_$(llrint$a2$)",
"sincos_optab->handlers[$A].insn_code = CODE_FOR_$(sincos$a3$)",
"sin_optab->handlers[$A].insn_code = CODE_FOR_$(sin$a2$)",
"asin_optab->handlers[$A].insn_code = CODE_FOR_$(asin$a2$)",
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index b902ce1c97f..9191baea26a 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -2073,10 +2073,6 @@ gimple_boolify (tree expr)
if (TREE_CODE (type) == BOOLEAN_TYPE)
return expr;
- /* If this is the predicate of a COND_EXPR, it might not even be a
- truthvalue yet. */
- expr = lang_hooks.truthvalue_conversion (expr);
-
switch (TREE_CODE (expr))
{
case TRUTH_AND_EXPR:
diff --git a/gcc/hooks.c b/gcc/hooks.c
index 274d427a931..6e6e7c70321 100644
--- a/gcc/hooks.c
+++ b/gcc/hooks.c
@@ -228,11 +228,12 @@ hook_rtx_tree_int_null (tree a ATTRIBUTE_UNUSED, int b ATTRIBUTE_UNUSED)
return NULL;
}
-/* Generic hook that takes a tree and returns it as is. */
+/* Generic hook that takes three trees and returns the last one as is. */
tree
-hook_tree_tree_identity (tree a)
+hook_tree_tree_tree_tree_3rd_identity (tree a ATTRIBUTE_UNUSED,
+ tree b ATTRIBUTE_UNUSED, tree c)
{
- return a;
+ return c;
}
/* Generic hook that takes a tree and returns a NULL string. */
diff --git a/gcc/hooks.h b/gcc/hooks.h
index 133ea2a1b80..b799a8c0709 100644
--- a/gcc/hooks.h
+++ b/gcc/hooks.h
@@ -62,7 +62,7 @@ extern bool hook_bool_tree_tree_false (tree, tree);
extern rtx hook_rtx_rtx_identity (rtx);
extern rtx hook_rtx_rtx_null (rtx);
extern rtx hook_rtx_tree_int_null (tree, int);
-extern tree hook_tree_tree_identity (tree a);
+extern tree hook_tree_tree_tree_tree_3rd_identity (tree, tree, tree);
extern const char *hook_constcharptr_tree_null (tree);
extern tree hook_tree_tree_tree_bool_null (tree, tree, bool);
#endif
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index bcf91565981..0c0430ec6b1 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,22 @@
+2005-03-29 Tom Tromey <tromey@redhat.com>
+
+ * gcj.texi (libgcj Runtime Properties): Document
+ gnu.gcj.runtime.endorsed.dirs.
+
+2005-03-24 Anthony Green <green@redhat.com>
+
+ * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
+ 'gcj-dbtool -p'.
+
+2005-03-23 Tom Tromey <tromey@redhat.com>
+
+ * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
+ (parse_version): Use it.
+
+2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
+
+ * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
+
2005-03-18 Andrew Haley <aph@redhat.com>
PR java/20522
diff --git a/gcc/java/decl.c b/gcc/java/decl.c
index 2f9da979733..d462f269640 100644
--- a/gcc/java/decl.c
+++ b/gcc/java/decl.c
@@ -64,6 +64,13 @@ static void parse_version (void);
/* Used when computing the ABI version. */
#define GCJ_BINARYCOMPAT_ADDITION 5
+/* The version of the BC ABI that we generate. At the moment we are
+ compatible with what shipped in GCC 4.0. This must be kept in sync
+ with parse_version(), libgcj, and reality (if the BC format
+ changes, this must change. */
+#define GCJ_CURRENT_BC_ABI_VERSION \
+ (4 * 10000 + 0 * 10 + GCJ_BINARYCOMPAT_ADDITION)
+
/* The ABI version number. */
tree gcj_abi_version;
@@ -609,7 +616,7 @@ parse_version (void)
(objects generated by different version of gcj), but will
probably always require strict matching for ordinary ABI. */
if (flag_indirect_dispatch)
- abi_version += GCJ_BINARYCOMPAT_ADDITION;
+ abi_version = GCJ_CURRENT_BC_ABI_VERSION;
gcj_abi_version = build_int_cstu (ptr_type_node, abi_version);
}
diff --git a/gcc/java/gcj.texi b/gcc/java/gcj.texi
index ffa54a88df8..df693c057a0 100644
--- a/gcc/java/gcj.texi
+++ b/gcc/java/gcj.texi
@@ -991,7 +991,7 @@ Each time a class is initialized, print a short message on standard error.
gcj-dbtool @option{OPTION} @var{DBFILE} [@option{MORE}] @dots{}
gcj-dbtool [@option{-n}] [@option{-a}] [@option{-f}]
- [@option{-t}] [@option{-l}] [@option{-p}]
+ [@option{-t}] [@option{-l}] [@option{-p} [@var{LIBDIR}]]
[@option{-v}] [@option{--version}] [@option{--help}]
@c man end
@@ -1045,7 +1045,9 @@ List the contents of a database.
@item -p
Print the name of the default database. If there is no default
-database, this prints a blank line.
+database, this prints a blank line. If @var{LIBDIR} is specified, use
+it instead of the default library directory component of the database
+name.
@item --help
Print a help message, then exit.
@@ -2513,6 +2515,15 @@ search is done for each requested class. If this property is set to
tried again. If this property is set to @samp{never}, then lookups
are never done. For more information, @xref{Extensions}.
+@item gnu.gcj.runtime.endorsed.dirs
+This is like the standard @code{java.endorsed.dirs}, property, but
+specifies some extra directories which are searched after the standard
+endorsed directories. This is primarily useful for telling
+@code{libgcj} about additional libraries which are ordinarily
+incorporated into the JDK, and which should be loaded by the bootstrap
+class loader, but which are not yet part of @code{libgcj} itself for
+some reason.
+
@item gnu.gcj.jit.compiler
@c FIXME we should probably have a whole node on this...
This is the full path to @command{gcj} executable which should be
diff --git a/gcc/java/lang.c b/gcc/java/lang.c
index 67bc0e48e1e..553e20cf57f 100644
--- a/gcc/java/lang.c
+++ b/gcc/java/lang.c
@@ -172,8 +172,6 @@ struct language_function GTY(())
#define LANG_HOOKS_PARSE_FILE java_parse_file
#undef LANG_HOOKS_MARK_ADDRESSABLE
#define LANG_HOOKS_MARK_ADDRESSABLE java_mark_addressable
-#undef LANG_HOOKS_TRUTHVALUE_CONVERSION
-#define LANG_HOOKS_TRUTHVALUE_CONVERSION java_truthvalue_conversion
#undef LANG_HOOKS_DUP_LANG_SPECIFIC_DECL
#define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL java_dup_lang_specific_decl
#undef LANG_HOOKS_DECL_PRINTABLE_NAME
diff --git a/gcc/langhooks-def.h b/gcc/langhooks-def.h
index fc6decaaf85..67ea0f325dc 100644
--- a/gcc/langhooks-def.h
+++ b/gcc/langhooks-def.h
@@ -267,7 +267,6 @@ extern tree lhd_make_node (enum tree_code);
LANG_HOOKS_EXPAND_CONSTANT, \
LANG_HOOKS_EXPAND_EXPR, \
LANG_HOOKS_EXPAND_DECL, \
- LANG_HOOKS_TRUTHVALUE_CONVERSION, \
LANG_HOOKS_SAFE_FROM_P, \
LANG_HOOKS_FINISH_INCOMPLETE_DECL, \
LANG_HOOKS_MARK_ADDRESSABLE, \
diff --git a/gcc/langhooks.h b/gcc/langhooks.h
index 97b8f5e1ce4..e3ff6724eff 100644
--- a/gcc/langhooks.h
+++ b/gcc/langhooks.h
@@ -277,19 +277,6 @@ struct lang_hooks
1 if handled, 0 otherwise. */
int (*expand_decl) (tree);
- /* Prepare expr to be an argument of a TRUTH_NOT_EXPR or other logical
- operation.
-
- This preparation consists of taking the ordinary representation
- of an expression expr and producing a valid tree boolean
- expression describing whether expr is nonzero. We could simply
- always do build_binary_op (NE_EXPR, expr, integer_zero_node, 1),
- but we optimize comparisons, &&, ||, and !.
-
- The result should be an expression of boolean type (if not an
- error_mark_node). */
- tree (*truthvalue_conversion) (tree);
-
/* Hook called by safe_from_p for language-specific tree codes. It is
up to the language front-end to install a hook if it has any such
codes that safe_from_p needs to know about. Since same_from_p will
diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog
index 49e73af4960..00df6c3dffd 100644
--- a/gcc/objc/ChangeLog
+++ b/gcc/objc/ChangeLog
@@ -1,3 +1,9 @@
+2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
+
+ * objc-act.c (next_sjlj_build_enter_and_setjmp,
+ next_sjlj_build_catch_list, next_sjlj_build_try_catch_finally):
+ Call c_common_truthvalue_conversion.
+
2005-02-25 Joseph S. Myers <joseph@codesourcery.com>
* Make-lang.in (objc/objc-parse.o-warn, objc/objc-parse.o,
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index e6201afbad5..1848e3c6c47 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -3019,7 +3019,7 @@ next_sjlj_build_enter_and_setjmp (void)
sj = build_function_call (objc_setjmp_decl, t);
cond = build (COMPOUND_EXPR, TREE_TYPE (sj), enter, sj);
- cond = lang_hooks.truthvalue_conversion (cond);
+ cond = c_common_truthvalue_conversion (cond);
return build (COND_EXPR, void_type_node, cond, NULL, NULL);
}
@@ -3086,7 +3086,7 @@ next_sjlj_build_catch_list (void)
t = objc_get_class_reference (OBJC_TYPE_NAME (TREE_TYPE (type)));
args = tree_cons (NULL, t, args);
t = build_function_call (objc_exception_match_decl, args);
- cond = lang_hooks.truthvalue_conversion (t);
+ cond = c_common_truthvalue_conversion (t);
}
t = build (COND_EXPR, void_type_node, cond, body, NULL);
SET_EXPR_LOCUS (t, EXPR_LOCUS (stmt));
@@ -3208,7 +3208,7 @@ next_sjlj_build_try_catch_finally (void)
/* Build the complete FINALLY statement list. */
t = next_sjlj_build_try_exit ();
t = build_stmt (COND_EXPR,
- lang_hooks.truthvalue_conversion (rethrow_decl),
+ c_common_truthvalue_conversion (rethrow_decl),
NULL, t);
SET_EXPR_LOCATION (t, cur_try_context->finally_locus);
append_to_statement_list (t, &TREE_OPERAND (try_fin, 1));
@@ -3219,7 +3219,7 @@ next_sjlj_build_try_catch_finally (void)
t = tree_cons (NULL, rethrow_decl, NULL);
t = build_function_call (objc_exception_throw_decl, t);
t = build_stmt (COND_EXPR,
- lang_hooks.truthvalue_conversion (rethrow_decl),
+ c_common_truthvalue_conversion (rethrow_decl),
t, NULL);
SET_EXPR_LOCATION (t, cur_try_context->end_finally_locus);
append_to_statement_list (t, &TREE_OPERAND (try_fin, 1));
diff --git a/gcc/optabs.c b/gcc/optabs.c
index 57c3339437b..ecaff987e04 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -1534,6 +1534,11 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1,
}
emit_move_insn (target_piece, newx);
}
+ else
+ {
+ if (x != target_piece)
+ emit_move_insn (target_piece, x);
+ }
carry_in = carry_out;
}
@@ -5034,7 +5039,6 @@ init_optabs (void)
nearbyint_optab = init_optab (UNKNOWN);
rint_optab = init_optab (UNKNOWN);
lrint_optab = init_optab (UNKNOWN);
- llrint_optab = init_optab (UNKNOWN);
sincos_optab = init_optab (UNKNOWN);
sin_optab = init_optab (UNKNOWN);
asin_optab = init_optab (UNKNOWN);
diff --git a/gcc/optabs.h b/gcc/optabs.h
index 92885643604..53958fcd7b6 100644
--- a/gcc/optabs.h
+++ b/gcc/optabs.h
@@ -192,7 +192,6 @@ enum optab_index
OTI_nearbyint,
OTI_rint,
OTI_lrint,
- OTI_llrint,
/* Tangent */
OTI_tan,
/* Inverse tangent */
@@ -320,7 +319,6 @@ extern GTY(()) optab optab_table[OTI_MAX];
#define nearbyint_optab (optab_table[OTI_nearbyint])
#define rint_optab (optab_table[OTI_rint])
#define lrint_optab (optab_table[OTI_lrint])
-#define llrint_optab (optab_table[OTI_llrint])
#define tan_optab (optab_table[OTI_tan])
#define atan_optab (optab_table[OTI_atan])
#define copysign_optab (optab_table[OTI_copysign])
diff --git a/gcc/params.def b/gcc/params.def
index c424ad59f10..2dbc19758e0 100644
--- a/gcc/params.def
+++ b/gcc/params.def
@@ -58,10 +58,9 @@ DEFPARAM (PARAM_SRA_FIELD_STRUCTURE_RATIO,
of a function counted in internal gcc instructions (not in
real machine instructions) that is eligible for inlining
by the tree inliner.
- The default value is 500.
+ The default value is 450.
Only functions marked inline (or methods defined in the class
- definition for C++) are affected by this, unless you set the
- -finline-functions (included in -O3) compiler option.
+ definition for C++) are affected by this.
There are more restrictions to inlining: If inlined functions
call other functions, the already inlined instructions are
counted and once the recursive inline limit (see
@@ -70,7 +69,7 @@ DEFPARAM (PARAM_SRA_FIELD_STRUCTURE_RATIO,
DEFPARAM (PARAM_MAX_INLINE_INSNS_SINGLE,
"max-inline-insns-single",
"The maximum number of instructions in a single function eligible for inlining",
- 500, 0, 0)
+ 450, 0, 0)
/* The single function inlining limit for functions that are
inlined by virtue of -finline-functions (-O3).
@@ -78,21 +77,21 @@ DEFPARAM (PARAM_MAX_INLINE_INSNS_SINGLE,
that is applied to functions marked inlined (or defined in the
class declaration in C++) given by the "max-inline-insns-single"
parameter.
- The default value is 150. */
+ The default value is 90. */
DEFPARAM (PARAM_MAX_INLINE_INSNS_AUTO,
"max-inline-insns-auto",
"The maximum number of instructions when automatically inlining",
- 120, 0, 0)
+ 90, 0, 0)
DEFPARAM (PARAM_MAX_INLINE_INSNS_RECURSIVE,
"max-inline-insns-recursive",
"The maximum number of instructions inline function can grow to via recursive inlining",
- 500, 0, 0)
+ 450, 0, 0)
DEFPARAM (PARAM_MAX_INLINE_INSNS_RECURSIVE_AUTO,
"max-inline-insns-recursive-auto",
"The maximum number of instructions non-inline function can grow to via recursive inlining",
- 500, 0, 0)
+ 450, 0, 0)
DEFPARAM (PARAM_MAX_INLINE_RECURSIVE_DEPTH,
"max-inline-recursive-depth",
@@ -148,7 +147,7 @@ DEFPARAM(PARAM_MAX_PENDING_LIST_LENGTH,
DEFPARAM(PARAM_LARGE_FUNCTION_INSNS,
"large-function-insns",
"The size of function body to be considered large",
- 3000, 0, 0)
+ 2700, 0, 0)
DEFPARAM(PARAM_LARGE_FUNCTION_GROWTH,
"large-function-growth",
"Maximal growth due to inlining of large function (in percent)",
@@ -157,6 +156,10 @@ DEFPARAM(PARAM_INLINE_UNIT_GROWTH,
"inline-unit-growth",
"how much can given compilation unit grow because of the inlining (in percent)",
50, 0, 0)
+DEFPARAM(PARAM_INLINE_CALL_COST,
+ "inline-call-cost",
+ "expense of call operation relative to ordinary arithmetic operations",
+ 16, 0, 0)
/* The GCSE optimization will be disabled if it would require
significantly more memory than this value. */
diff --git a/gcc/po/ChangeLog b/gcc/po/ChangeLog
index 2d9f3d2b7b5..a5ed603e967 100644
--- a/gcc/po/ChangeLog
+++ b/gcc/po/ChangeLog
@@ -1,3 +1,7 @@
+2005-03-29 Joseph S. Myers <joseph@codesourcery.com>
+
+ * de.po: Update.
+
2005-03-06 Joseph S. Myers <joseph@codesourcery.com>
* es.po: Update.
diff --git a/gcc/po/de.po b/gcc/po/de.po
index 5395d99dde1..31952252ec6 100644
--- a/gcc/po/de.po
+++ b/gcc/po/de.po
@@ -6,10 +6,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: gcc 4.0-b20041128\n"
+"Project-Id-Version: gcc 4.0-b20050226\n"
"Report-Msgid-Bugs-To: http://gcc.gnu.org/bugs.html\n"
"POT-Creation-Date: 2005-02-25 23:36+0000\n"
-"PO-Revision-Date: 2004-12-20 15:53+0100\n"
+"PO-Revision-Date: 2005-03-28 16:20+0200\n"
"Last-Translator: Roland Stigge <stigge@antcom.de>\n"
"Language-Team: German <de@li.org>\n"
"MIME-Version: 1.0\n"
@@ -147,9 +147,8 @@ msgid "%<__builtin_next_arg%> called without an argument"
msgstr "%<__builtin_next_arg%> ohne Argument gerufen"
#: builtins.c:8933
-#, fuzzy
msgid "%<va_start%> used with too many arguments"
-msgstr "%<va_start%> in Funktion mit fester Parameterzahl verwendet"
+msgstr "%<va_start%> mit zu vielen Argumenten verwendet"
#. FIXME: Sometimes with the tree optimizers we can get the
#. not the last argument even though the user used the last
@@ -268,7 +267,7 @@ msgstr "die Adresse von %qD wird immer zu %<wahr%> auswerten"
#: c-common.c:2467
msgid "suggest parentheses around assignment used as truth value"
-msgstr "um Zuweisung, die als Wahrheitswert verwendet wird, werden Klammern vorgeschlagen"
+msgstr "um Zuweisung, die als Wahrheitswert verwendet wird, werden Klammern empfohlen"
#: c-common.c:2535 c-common.c:2575
msgid "invalid use of %<restrict%>"
@@ -457,9 +456,9 @@ msgid "visibility argument not a string"
msgstr "Sichtbarkeitsargument ist keine Zeichenkette"
#: c-common.c:4642
-#, fuzzy, c-format
+#, c-format
msgid "%qE attribute ignored on types"
-msgstr "Attribut %qs ignoriert für Nicht-Klassen-Typen"
+msgstr "Attribut %qE für Typen ignoriert"
#: c-common.c:4657
msgid "visibility argument must be one of \"default\", \"hidden\", \"protected\" or \"internal\""
@@ -623,9 +622,8 @@ msgid "%Jlabel %qD declared but not defined"
msgstr "%JMarke %qD deklariert, aber nicht definiert"
#: c-decl.c:770
-#, fuzzy
msgid "%Jnested function %qD declared but never defined"
-msgstr "inline-Funktion »%D« verwendet, aber nirgendwo definiert"
+msgstr "%Jgeschachtelte Funktion %qD deklariert, aber nirgendwo definiert"
#: c-decl.c:784 cp/decl.c:568
msgid "%Junused variable %qD"
@@ -633,7 +631,7 @@ msgstr "%JVariable %qD wird nicht verwendet"
#: c-decl.c:788
msgid "%Jtype of array %qD completed incompatibly with implicit initialization"
-msgstr "%JTyp des Feldes %qD unverträglich mit impliziter Initialisierung vervollständigt"
+msgstr "%JTyp des Feldes %qD vervollständigt Unverträglichkeit mit impliziter Initialisierung"
#: c-decl.c:1022
msgid "a parameter list with an ellipsis can%'t match an empty parameter name list declaration"
@@ -770,9 +768,8 @@ msgid "%Jredundant redeclaration of %qD"
msgstr "%Jredundante Redeklaration von %qD"
#: c-decl.c:1866
-#, fuzzy
msgid "%Jdeclaration of %qD shadows previous non-variable"
-msgstr "%JDeklaration von %qD überdeckt einen vorhergehenden lokalen Bezeichner"
+msgstr "%JDeklaration von %qD überdeckt eine vorhergehende Nicht-Variable"
#: c-decl.c:1871
msgid "%Jdeclaration of %qD shadows a parameter"
@@ -870,11 +867,11 @@ msgstr "%<inline%> in leerer Deklaration"
#: c-decl.c:2822
msgid "%<auto%> in file-scope empty declaration"
-msgstr "%<auto%> in einer leeren Deklaration im Datei-Gültigkeitsbereich"
+msgstr "%<auto%> in leerer Deklaration im Datei-Gültigkeitsbereich"
#: c-decl.c:2828
msgid "%<register%> in file-scope empty declaration"
-msgstr "%<register%> in leeren Deklaration im Datei-Gültigkeitsbereich"
+msgstr "%<register%> in leerer Deklaration im Datei-Gültigkeitsbereich"
#: c-decl.c:2834
msgid "useless storage class specifier in empty declaration"
@@ -2179,7 +2176,7 @@ msgstr "break-Anweisung nicht innerhalb einer Schleife oder »switch«"
#: c-gimplify.c:317
msgid "continue statement not within loop or switch"
-msgstr "break-Anweisung nicht innerhalb einer Schleife oder »switch«"
+msgstr "continue-Anweisung nicht innerhalb einer Schleife oder »switch«"
#: c-incpath.c:70
#, c-format
@@ -2265,7 +2262,6 @@ msgid "traditional C rejects string constant concatenation"
msgstr "traditionelles C weist Stringkonstantenverkettung zurück"
#: c-objc-common.c:80
-#, fuzzy
msgid "%Jfunction %qF can never be inlined because it is suppressed using -fno-inline"
msgstr "%JFunktion %qF kann nie inline sein, da dies mit -fno-inline unterdrückt wird"
@@ -2372,7 +2368,7 @@ msgstr "Ausgabedatei »%s« wird geöffnet: %m"
#: c-opts.c:1003
#, c-format
msgid "too many filenames given. Type %s --help for usage"
-msgstr "zu viele Dateinamen angegeben. Geben sie »%s --help« für Hilfe ein"
+msgstr "zu viele Dateinamen angegeben. Für Hilfe »%s --help« eingeben"
#: c-opts.c:1086
msgid "YYDEBUG was not defined at build time, -dy ignored"
@@ -2540,9 +2536,8 @@ msgid "%E qualifier ignored on asm"
msgstr "%E-Qualifizierer für asm ignoriert"
#: c-parse.y:2309 objc/objc-parse.y:2404
-#, fuzzy
msgid "wide string literal in %<asm%>"
-msgstr "unmögliche Bedingung in »asm«"
+msgstr "Wide-Zeichenkettenliteral in »asm«"
#: c-parse.y:2371 objc/objc-parse.y:2466
msgid "ISO C requires a named argument before %<...%>"
@@ -3486,7 +3481,7 @@ msgstr "Elementüberschreitung in Vektorinitialisierung"
#: c-typeck.c:6296
msgid "excess elements in scalar initializer"
-msgstr "Elementüberschreitung in Skalar-Initialisierung"
+msgstr "Elementüberschreitung in Skalarinitialisierung"
#: c-typeck.c:6492
msgid "ISO C forbids %<goto *expr;%>"
@@ -3510,7 +3505,7 @@ msgstr "Funktion liefert Adresse einer lokalen Variablen zurück"
#: c-typeck.c:6638 cp/semantics.c:879
msgid "switch quantity not an integer"
-msgstr "switch-Größe keine Ganzzahl"
+msgstr "switch-Größe ist keine Ganzzahl"
#: c-typeck.c:6649
msgid "%<long%> switch expression not converted to %<int%> in ISO C"
@@ -4007,34 +4002,32 @@ msgstr "Mehrere Inline-Aufrufer"
#: cgraphunit.c:577
msgid "Inlined_to pointer set for noninline callers"
-msgstr ""
+msgstr "Inlined_to-Zeiger für Nicht-Inline-Aufrufer gesetzt"
#: cgraphunit.c:583
msgid "Inlined_to pointer is set but no predecesors found"
-msgstr ""
+msgstr "Inlined_to-Zeiger gesetzt, aber keine Vorgänger gefunden"
#: cgraphunit.c:588
msgid "Inlined_to pointer reffers to itself"
-msgstr ""
+msgstr "Inlined_to-Zeiger verweist auf sich selbst"
#: cgraphunit.c:598
msgid "Node not found in DECL_ASSEMBLER_NAME hash"
-msgstr ""
+msgstr "Knoten in DECL_ASSEMBLER_NAME-Hash nicht gefunden"
#: cgraphunit.c:612
#, c-format
msgid "Edge %s->%s has no corresponding call_expr"
-msgstr ""
+msgstr "Kante %s->%s hat keine passende call_expr"
#: cgraphunit.c:623
-#, fuzzy
msgid "verify_cgraph_node failed."
-msgstr "verify_flow_info gescheitert"
+msgstr "verify_cgraph gescheitert."
#: cgraphunit.c:807
-#, fuzzy
msgid "failed to reclaim unneeded function"
-msgstr "Feld »%s« als Funktion deklariert"
+msgstr "Zurückfordern der nicht genötigten Funktion gescheitert"
#: cgraphunit.c:1194
msgid "--param large-function-growth limit reached"
@@ -4058,21 +4051,21 @@ msgstr "--param inline-unit-growth: Limit erreicht"
#: cgraphunit.c:1822
msgid "Nodes with no released memory found."
-msgstr ""
+msgstr "Knoten ohne freigegebenen Speicher gefunden."
#: collect2.c:402 gcc.c:6733
-#, fuzzy, c-format
+#, c-format
msgid "internal gcc abort in %s, at %s:%d"
-msgstr "Abbruch in %s, bei %s:%d"
+msgstr "interner GCC-Abbruch in %s, bei %s:%d"
#: collect2.c:895
msgid "no arguments"
msgstr "Keine Argumente"
#: collect2.c:1194
-#, fuzzy, c-format
+#, c-format
msgid "unknown demangling style '%s'"
-msgstr "unbekannter Maschinenzustand »%s«"
+msgstr "unbekannter Aufbereitungszustand »%s«"
#: collect2.c:1268 collect2.c:1416 collect2.c:1451
#, c-format
@@ -4117,12 +4110,12 @@ msgstr "%s gab Ende-Status %d zurück"
#: collect2.c:1557
#, c-format
msgid "[cannot find %s]"
-msgstr "[kann %s nicht finden]"
+msgstr "[%s kann nicht gefunden werden]"
#: collect2.c:1572
-#, fuzzy, c-format
+#, c-format
msgid "cannot find '%s'"
-msgstr "kann »%s« nicht finden"
+msgstr "»%s« kann nicht gefunden werden"
#: collect2.c:1583 collect2.c:1586
#, c-format
@@ -4132,7 +4125,7 @@ msgstr "leite Standardausgabe um: %s"
#: collect2.c:1625
#, c-format
msgid "[Leaving %s]\n"
-msgstr "[Verlasse %s]\n"
+msgstr "[Verlassen von %s]\n"
#: collect2.c:1845
#, c-format
@@ -4144,9 +4137,8 @@ msgstr ""
"write_c_file - Ausgabename ist %s, Präfix ist %s\n"
#: collect2.c:2049
-#, fuzzy
msgid "cannot find 'nm'"
-msgstr "kann »nm« nicht finden"
+msgstr "»nm« kann nicht gefunden werden"
#: collect2.c:2059 collect2.c:2225
msgid "pipe"
@@ -4187,9 +4179,8 @@ msgid "fclose"
msgstr "fclose"
#: collect2.c:2216
-#, fuzzy
msgid "cannot find 'ldd'"
-msgstr "kann »ldd« nicht finden"
+msgstr "»ldd« kann nicht gefunden werden"
#: collect2.c:2277
msgid ""
@@ -4264,7 +4255,7 @@ msgstr "Konvertierung in unvollständigen Typen"
#: convert.c:660 convert.c:736
msgid "can't convert between vector values of different size"
-msgstr "kann nicht zwischen Vektorwerten verschiedener Größen konvertieren"
+msgstr "zwischen Vektorwerten verschiedener Größen kann nicht konvertiert werden"
#: convert.c:666
msgid "aggregate value used where an integer was expected"
@@ -4280,17 +4271,16 @@ msgstr "zusammengesetzer Wert verwendet, wo »complex« erwartet wurde"
#: convert.c:742
msgid "can't convert value to a vector"
-msgstr "kann Wert nicht in Vektor konvertieren"
+msgstr "Wert kann nicht in Vektor konvertiert werden"
#: coverage.c:168
-#, fuzzy, c-format
+#, c-format
msgid "%qs is not a gcov data file"
-msgstr "»%s« ist keine gcov-Datei"
+msgstr "%qs ist keine gcov-Datei"
#: coverage.c:179
-#, fuzzy
msgid "%qs is version %q.*s, expected version %q.*s"
-msgstr "»%s« hat Version »%.4s«, Version »%.4s« erwartet"
+msgstr "%qs hat Version %q.*s, Version %q.*s erwartet"
#: coverage.c:259 coverage.c:267
#, c-format
@@ -4313,24 +4303,24 @@ msgid "cannot merge separate %s counters for function %u"
msgstr "separate %s Zähler für die Funktion %u können nicht verschmolzen werden"
#: coverage.c:296
-#, fuzzy, c-format
+#, c-format
msgid "%qs has overflowed"
-msgstr "»%s« übergelaufen"
+msgstr "%qs übergelaufen"
#: coverage.c:296
-#, fuzzy, c-format
+#, c-format
msgid "%qs is corrupted"
-msgstr "»%s« ist beschädigt"
+msgstr "%qs ist beschädigt"
#: coverage.c:333
-#, fuzzy, c-format
+#, c-format
msgid "no coverage for function %qs found."
-msgstr "keine Überdeckung für Funktion »%s« gefunden."
+msgstr "keine Überdeckung für Funktion %qs gefunden."
#: coverage.c:341 coverage.c:349
-#, fuzzy, c-format
+#, c-format
msgid "coverage mismatch for function %qs while reading counter %qs."
-msgstr "Überdeckung passt nicht bei Funktion »%s« beim Lesen des Zählers »%s«."
+msgstr "Überdeckung passt nicht bei Funktion %qs beim Lesen des Zählers %qs."
#: coverage.c:532
#, c-format
@@ -4338,9 +4328,9 @@ msgid "cannot open %s"
msgstr "Es ist nicht möglich, »%s« zu öffnen"
#: coverage.c:567
-#, fuzzy, c-format
+#, c-format
msgid "error writing %qs"
-msgstr "Fehler beim Schreiben der Datei »%s«"
+msgstr "Fehler beim Schreiben von %qs"
#: cppspec.c:106
#, c-format
@@ -4354,7 +4344,7 @@ msgstr "zu viele Eingabedateien"
#: cse.c:6772
#, c-format
msgid ";; Processing block from %d to %d, %d sets.\n"
-msgstr ";; Bearbeite Block von %d bis %d, %d Sets.\n"
+msgstr ";; Bearbeitung von Block von %d bis %d, %d Sets.\n"
#: diagnostic.c:168
#, c-format
@@ -4362,9 +4352,8 @@ msgid "%s:%d: confused by earlier errors, bailing out\n"
msgstr "%s:%d: durch frühere Fehler verwirrt, Abbruch\n"
#: diagnostic.c:228
-#, fuzzy
msgid "compilation terminated due to -Wfatal-errors.\n"
-msgstr "Kompilierung beendet.\n"
+msgstr "Kompilierung wegen -Wfatal-errors beendet.\n"
#: diagnostic.c:237
#, c-format
@@ -4394,9 +4383,9 @@ msgid "in %s, at %s:%d"
msgstr "in %s, bei %s:%d"
#: dominance.c:834
-#, fuzzy, c-format
+#, c-format
msgid "dominator of %d status unknown"
-msgstr "Herrscher über %d sollte %d sein, nicht %d"
+msgstr "unbekannter Status für Herrscher über %d"
#: dominance.c:836
#, c-format
@@ -4406,7 +4395,7 @@ msgstr "Herrscher über %d sollte %d sein, nicht %d"
#: dominance.c:848
#, c-format
msgid "ENTRY does not dominate bb %d"
-msgstr ""
+msgstr "ENTRY dominiert nicht bb %d"
#: dwarf2out.c:3388
#, c-format
@@ -4423,7 +4412,7 @@ msgstr "Gemeinsames rtx"
#: emit-rtl.c:2236
msgid "Internal consistency failure"
-msgstr ""
+msgstr "Interner Konsistenzfehler"
#: emit-rtl.c:3301
msgid "ICE: emit_insn used where emit_jump_insn needed:\n"
@@ -4436,10 +4425,9 @@ msgstr "Abbruch in %s, bei %s:%d"
#: except.c:340
msgid "exception handling disabled, use -fexceptions to enable"
-msgstr "Ausnahmebehandlung ausgeschaltet, benutzen Sie -fexeptions zum Anschalten"
+msgstr "Ausnahmebehandlung ausgeschaltet, benutzen Sie -fexeptions zum Einschalten"
#: except.c:2577
-#, fuzzy
msgid "argument of %<__builtin_eh_return_regno%> must be constant"
msgstr "Argument für »__builtin_eh_return_regno« muss konstant sein"
@@ -4460,7 +4448,6 @@ msgid "could not split insn"
msgstr "Befehl kann nicht aufgeteilt werden"
#: final.c:2851
-#, fuzzy
msgid "invalid 'asm': "
msgstr "ungültiges »asm«: "
@@ -4487,7 +4474,7 @@ msgid "invalid %%-code"
msgstr "ungültiger %%-Code"
#: final.c:3203
-#, fuzzy, c-format
+#, c-format
msgid "'%%l' operand isn't a label"
msgstr "»%%l«-Operand ist keine Marke"
@@ -4508,9 +4495,8 @@ msgid "invalid expression as operand"
msgstr "ungültiger Ausdruck als Operand"
#: flow.c:494 flow.c:518 flow.c:540
-#, fuzzy
msgid "internal consistency failure"
-msgstr "interner Abbruch des gcc"
+msgstr "internes Konsistenzproblem"
#: flow.c:1689
msgid "Attempt to delete prologue/epilogue insn:"
@@ -4527,47 +4513,40 @@ msgid "comparison is always %d"
msgstr "Vergleich ist immer %d"
#: fold-const.c:4933
-#, fuzzy
msgid "%<or%> of unmatched not-equal tests is always 1"
msgstr "»oder« nicht passender Ungleichheits-Tests ist immer 1"
#: fold-const.c:4938
-#, fuzzy
msgid "%<and%> of mutually exclusive equal-tests is always 0"
-msgstr "»und« gegenseitig ausschließender Gleichheits-Tests ist immer 0"
+msgstr "»und« sich gegenseitig ausschließender Gleichheits-Tests ist immer 0"
#: fold-const.c:9870
msgid "fold check: original tree changed by fold"
msgstr "Faltungstest: ursprünglicher Baum durch Faltung geändert"
#: function.c:832 varasm.c:1584
-#, fuzzy
msgid "%Jsize of variable %qD is too large"
-msgstr "%JGröße der Variable »%D« ist zu hoch"
+msgstr "%JGröße der Variable %qD ist zu hoch"
#: function.c:1443
-#, fuzzy
msgid "impossible constraint in %<asm%>"
msgstr "unmögliche Bedingung in »asm«"
#: function.c:3633
-#, fuzzy
msgid "%Jvariable %qD might be clobbered by %<longjmp%> or %<vfork%>"
-msgstr "%JVariable »%D« könnte von »longjmp« oder »vfork« zerstört werden"
+msgstr "%JVariable %qD könnte von »longjmp« oder »vfork« zerstört werden"
#: function.c:3654
-#, fuzzy
msgid "%Jargument %qD might be clobbered by %<longjmp%> or %<vfork%>"
-msgstr "%JArgument »%D« könnte von »longjmp« oder »vfork« zerstört werden"
+msgstr "%JArgument %qD könnte von »longjmp« oder »vfork« zerstört werden"
#: function.c:4045
msgid "function returns an aggregate"
msgstr "Funktion gibt Aggregat zurück"
#: function.c:4368
-#, fuzzy
msgid "%Junused parameter %qD"
-msgstr "%Jnicht benutzter Parameter »%D«"
+msgstr "%Jnicht benutzter Parameter %qD"
#: gcc.c:1237
#, c-format
@@ -4575,23 +4554,23 @@ msgid "ambiguous abbreviation %s"
msgstr "mehrdeutige Abkürzung %s"
#: gcc.c:1264
-#, fuzzy, c-format
+#, c-format
msgid "incomplete '%s' option"
msgstr "unvollständige »%s«-Option"
#: gcc.c:1275
-#, fuzzy, c-format
+#, c-format
msgid "missing argument to '%s' option"
msgstr "fehlendes Argument für »%s«-Option"
#: gcc.c:1288
-#, fuzzy, c-format
+#, c-format
msgid "extraneous argument to '%s' option"
-msgstr "zusätzliches (belangloses) Argument für »%s«-Option"
+msgstr "belangloses Argument für »%s«-Option"
#: gcc.c:1632
msgid "Using built-in specs.\n"
-msgstr "Benutze eingebaute Spezifikationen.\n"
+msgstr "Es werden eingebaute Spezifikationen verwendet.\n"
#: gcc.c:1815
#, c-format
@@ -4599,13 +4578,13 @@ msgid ""
"Setting spec %s to '%s'\n"
"\n"
msgstr ""
-"Setze Spezifikation %s auf '%s'\n"
+"Spezifikation %s wird auf '%s' gesetzt\n"
"\n"
#: gcc.c:1924
#, c-format
msgid "Reading specs from %s\n"
-msgstr "Lese Spezifikationen von %s\n"
+msgstr "Lesen der Spezifikationen von %s\n"
#: gcc.c:2020 gcc.c:2039
#, c-format
@@ -4635,7 +4614,7 @@ msgstr "%s: Versuch, Spezifikation »%s« in bereits definierte Spezifikation »
#: gcc.c:2111
#, c-format
msgid "rename spec %s to %s\n"
-msgstr "benenne Spezifikation %s nach %s um\n"
+msgstr "Spezifikation wird %s nach %s umbenannt\n"
#: gcc.c:2113
#, c-format
@@ -4661,9 +4640,9 @@ msgid "spec file has no spec for linking"
msgstr "Spezifikationsdatei hat keine Spezifikation zum Binden"
#: gcc.c:2625
-#, fuzzy, c-format
+#, c-format
msgid "system path '%s' is not absolute"
-msgstr "Reservierung »%s« ist unbenutzt"
+msgstr "System-Pfad »%s« ist nicht absolut"
#: gcc.c:2688
msgid "-pipe not supported"
@@ -4793,9 +4772,8 @@ msgid " -Xlinker <arg> Pass <arg> on to the linker\n"
msgstr " -Xlinker <arg> <arg> an den Linker übergeben\n"
#: gcc.c:3049
-#, fuzzy
msgid " -combine Pass multiple source files to compiler at once\n"
-msgstr " -o <Datei> Ausgabe in <Datei> schreiben\n"
+msgstr " -combine Mehrere Quelldateien auf einmal an Compiler übergeben\n"
#: gcc.c:3050
msgid " -save-temps Do not delete intermediate files\n"
@@ -4889,14 +4867,14 @@ msgstr ""
" -W<Buchstabe> verwendet werden.\n"
#: gcc.c:3191
-#, fuzzy, c-format
+#, c-format
msgid "'-%c' option must have argument"
msgstr "Die Option »-%c« muss ein Argument haben"
#: gcc.c:3213
-#, fuzzy, c-format
+#, c-format
msgid "couldn't run '%s': %s"
-msgstr "konnte »%s« nicht ausführen: %s"
+msgstr "»%s« nicht ausgeführt werden: %s"
#. translate_options () has turned --version into -fversion.
#: gcc.c:3398
@@ -4921,42 +4899,35 @@ msgstr ""
"\n"
#: gcc.c:3502
-#, fuzzy
msgid "argument to '-Xlinker' is missing"
msgstr "Argument für »-Xlinker« fehlt"
#: gcc.c:3510
-#, fuzzy
msgid "argument to '-Xpreprocessor' is missing"
msgstr "Argument für »-Xpreprocessor« fehlt"
#: gcc.c:3517
-#, fuzzy
msgid "argument to '-Xassembler' is missing"
msgstr "Argument für »-Xassembler« fehlt"
#: gcc.c:3524
-#, fuzzy
msgid "argument to '-l' is missing"
msgstr "Argument für »-l« fehlt"
#: gcc.c:3545
-#, fuzzy
msgid "argument to '-specs' is missing"
msgstr "Argument für »-specs« fehlt"
#: gcc.c:3559
-#, fuzzy
msgid "argument to '-specs=' is missing"
msgstr "Argument für »-specs=« fehlt"
#: gcc.c:3596
-#, fuzzy, c-format
+#, c-format
msgid "'-%c' must come at the start of the command line"
msgstr "»-%c« muss am Anfang der Kommandozeile stehen"
#: gcc.c:3605
-#, fuzzy
msgid "argument to '-B' is missing"
msgstr "Argument für »-B« fehlt"
@@ -4969,29 +4940,28 @@ msgid "warning: -pipe ignored because -time specified"
msgstr "Warnung: -pipe ignoriert, da -time angegeben"
#: gcc.c:3994
-#, fuzzy
msgid "argument to '-x' is missing"
msgstr "Argument für »-x« fehlt"
#: gcc.c:4022
-#, fuzzy, c-format
+#, c-format
msgid "argument to '-%s' is missing"
msgstr "Argument für »-%s« fehlt"
#: gcc.c:4083
-#, fuzzy, c-format
+#, c-format
msgid "warning: '-x %s' after last input file has no effect"
msgstr "Warnung: »-x %s« hinter letzter Eingabedatei hat keine Wirkung"
#: gcc.c:4360
#, c-format
msgid "switch '%s' does not start with '-'"
-msgstr ""
+msgstr "Schalter '%s' beginnt nicht mit '-'"
#: gcc.c:4587
#, c-format
msgid "spec '%s' invalid"
-msgstr ""
+msgstr "Spezifikation '%s' ist ungültig"
#: gcc.c:4653
#, c-format
@@ -4999,19 +4969,19 @@ msgid "%s\n"
msgstr "%s\n"
#: gcc.c:4726
-#, fuzzy, c-format
+#, c-format
msgid "spec '%s' has invalid '%%0%c'"
-msgstr "Bitfeld »%s« hat ungültigen Typen"
+msgstr "Spezifikation »%s« hat ungültiges »%%0%c«"
#: gcc.c:4923
-#, fuzzy, c-format
+#, c-format
msgid "spec '%s' has invalid '%%W%c"
-msgstr "Bitfeld »%s« hat ungültigen Typen"
+msgstr "Spezifikation »%s« hat ungültiges »%%W%c«"
#: gcc.c:4954
-#, fuzzy, c-format
+#, c-format
msgid "spec '%s' has invalid '%%x%c'"
-msgstr "Bitfeld »%s« hat ungültigen Typen"
+msgstr "Spezifikation »%s« hat ungültiges »%%x%c«"
#. Catch the case where a spec string contains something like
#. '%{foo:%*}'. i.e. there is no * in the pattern on the left
@@ -5029,7 +4999,7 @@ msgstr "Warnung: Verwendung des veralteten Operators %%[ in Spezifikation"
#: gcc.c:5176
#, c-format
msgid "Processing spec %c%s%c, which is '%s'\n"
-msgstr "Verarbeite Spezifikation %c%s%c, welche »%s« ist\n"
+msgstr "Spezifikation %c%s%c wird verarbeitet, welche »%s« ist\n"
#: gcc.c:5239
#, c-format
@@ -5037,12 +5007,12 @@ msgid "spec failure: unrecognized spec option '%c'"
msgstr "Spezifikationsfehler: nicht erkannte Option »%c«"
#: gcc.c:5318
-#, fuzzy, c-format
+#, c-format
msgid "unknown spec function '%s'"
msgstr "unbekannte Spezifikationsfunktion »%s«"
#: gcc.c:5337
-#, fuzzy, c-format
+#, c-format
msgid "error in args to spec function '%s'"
msgstr "Fehler in Argumenten für Spezifikationsfunktion »%s«"
@@ -5062,12 +5032,12 @@ msgstr "schlechte Argumente für Spezifikationsfunktion"
#: gcc.c:5646
#, c-format
msgid "braced spec '%s' is invalid at '%c'"
-msgstr ""
+msgstr "geschweift geklammertes '%s' ist bei '%c' ungültig"
#: gcc.c:5734
#, c-format
msgid "braced spec body '%s' is invalid"
-msgstr ""
+msgstr "geschweift geklammerter Körper '%s' ist ungültig"
#: gcc.c:6160
msgid "spec failure: more than one arg to SYSROOT_SUFFIX_SPEC."
@@ -5078,7 +5048,7 @@ msgid "spec failure: more than one arg to SYSROOT_HEADERS_SUFFIX_SPEC."
msgstr "Spezifikationsfehler: mehr als ein Argument für SYSROOT_HEADERS_SUFFIX_SPEC."
#: gcc.c:6263
-#, fuzzy, c-format
+#, c-format
msgid "unrecognized option '-%s'"
msgstr "nicht erkannte Option »-%s«"
@@ -5109,9 +5079,9 @@ msgstr ""
"zu melden:\n"
#: gcc.c:6344
-#, fuzzy, c-format
+#, c-format
msgid "Target: %s\n"
-msgstr "Bibliotheken: %s\n"
+msgstr "Ziel: %s\n"
#: gcc.c:6345
#, c-format
@@ -5131,7 +5101,7 @@ msgstr "gcc-Version %s\n"
#: gcc.c:6372
#, c-format
msgid "gcc driver version %s executing gcc version %s\n"
-msgstr "gcc-Treiberversion %s führt gcc Version %s aus\n"
+msgstr "gcc-Treiberversion %s führt GCC-Version %s aus\n"
#: gcc.c:6380
msgid "no input files"
@@ -5143,9 +5113,9 @@ msgid "%s: %s compiler not installed on this system"
msgstr "%s: %s-Compiler ist auf diesem System nicht installiert"
#: gcc.c:6460
-#, fuzzy, c-format
+#, c-format
msgid "spec '%s' is invalid"
-msgstr "Parameter »%s« ist initialisiert"
+msgstr "Spezifikation »%s« ist ungültig"
#: gcc.c:6596
#, c-format
@@ -5163,24 +5133,24 @@ msgid "%s: %s"
msgstr "%s: %s"
#: gcc.c:6927
-#, fuzzy, c-format
+#, c-format
msgid "multilib spec '%s' is invalid"
-msgstr "Templateargument %d ist ungültig"
+msgstr "Multilib-Spezifikation »%s« ist ungültig"
#: gcc.c:7119
-#, fuzzy, c-format
+#, c-format
msgid "multilib exclusions '%s' is invalid"
-msgstr "in Union »%T« werden mehrere Felder initialisiert"
+msgstr "Multilib-Ausschlüsse »%s« sind ungültig"
#: gcc.c:7177 gcc.c:7318
-#, fuzzy, c-format
+#, c-format
msgid "multilib select '%s' is invalid"
-msgstr "Templateargument %d ist ungültig"
+msgstr "Multilib-select »%s« ist ungültig"
#: gcc.c:7356
-#, fuzzy, c-format
+#, c-format
msgid "multilib exclusion '%s' is invalid"
-msgstr "in Union »%T« werden mehrere Felder initialisiert"
+msgstr "Multilib-Ausschluss »%s« ist ungültig"
#: gcov.c:385
msgid ""
@@ -5288,24 +5258,24 @@ msgid "\n"
msgstr "\n"
#: gcov.c:540
-#, fuzzy, c-format
+#, c-format
msgid "%s:creating '%s'\n"
-msgstr "%s: Erzeugen von »%s«\n"
+msgstr "%s: »%s« wird erzeugt\n"
#: gcov.c:544
-#, fuzzy, c-format
+#, c-format
msgid "%s:error writing output file '%s'\n"
msgstr "%s: Fehler beim Schreiben der Ausgabedatei »%s«\n"
#: gcov.c:549
-#, fuzzy, c-format
+#, c-format
msgid "%s:could not open output file '%s'\n"
-msgstr "%s: Ausgabedatei %s konnte nicht geöffnet werden\n"
+msgstr "%s: Ausgabedatei »%s« konnte nicht geöffnet werden\n"
#: gcov.c:700
#, c-format
msgid "%s:cannot open graph file\n"
-msgstr "%s: Graph-Datei kann nicht geöffnet werden\n"
+msgstr "%s: Graphen-Datei kann nicht geöffnet werden\n"
#: gcov.c:706
#, c-format
@@ -5313,12 +5283,12 @@ msgid "%s:not a gcov graph file\n"
msgstr "%s: keine gcov-Graph-Datei\n"
#: gcov.c:719
-#, fuzzy, c-format
+#, c-format
msgid "%s:version '%.4s', prefer '%.4s'\n"
msgstr "%s: Version »%.4s«, aber »%.4s« wird bevorzugt\n"
#: gcov.c:771
-#, fuzzy, c-format
+#, c-format
msgid "%s:already seen blocks for '%s'\n"
msgstr "%s: bereits gesehene Blöcke für »%s«\n"
@@ -5338,7 +5308,7 @@ msgid "%s:not a gcov data file\n"
msgstr "%s: keine gcov-Datei\n"
#: gcov.c:981
-#, fuzzy, c-format
+#, c-format
msgid "%s:version '%.4s', prefer version '%.4s'\n"
msgstr "%s: Version »%.4s«, aber Version »%.4s« wird bevorzugt\n"
@@ -5348,14 +5318,14 @@ msgid "%s:stamp mismatch with graph file\n"
msgstr "%s: Marke passt nicht zur Graph-Datei\n"
#: gcov.c:1013
-#, fuzzy, c-format
+#, c-format
msgid "%s:unknown function '%u'\n"
msgstr "%s: unbekannte Funktion »%u«\n"
#: gcov.c:1026
-#, fuzzy, c-format
+#, c-format
msgid "%s:profile mismatch for '%s'\n"
-msgstr "%s: Profil passt nicht für `%s'\n"
+msgstr "%s: Profil passt nicht für »%s«\n"
#: gcov.c:1045
#, c-format
@@ -5363,27 +5333,27 @@ msgid "%s:overflowed\n"
msgstr "%s: übergelaufen\n"
#: gcov.c:1069
-#, fuzzy, c-format
+#, c-format
msgid "%s:'%s' lacks entry and/or exit blocks\n"
msgstr "%s: Eintrag und/oder Exit-Blöcke fehlen in »%s«\n"
#: gcov.c:1074
-#, fuzzy, c-format
+#, c-format
msgid "%s:'%s' has arcs to entry block\n"
msgstr "%s: »%s« hat Bögen zum Eintrittsblock\n"
#: gcov.c:1082
-#, fuzzy, c-format
+#, c-format
msgid "%s:'%s' has arcs from exit block\n"
msgstr "%s: »%s« hat Bögen vom Eintrittsblock\n"
#: gcov.c:1290
-#, fuzzy, c-format
+#, c-format
msgid "%s:graph is unsolvable for '%s'\n"
msgstr "%s: Graph ist für »%s« unlösbar\n"
#: gcov.c:1370
-#, fuzzy, c-format
+#, c-format
msgid "%s '%s'\n"
msgstr "%s: »%s«\n"
@@ -5393,9 +5363,8 @@ msgid "Lines executed:%s of %d\n"
msgstr "%s von %d Zeilen ausgeführt\n"
#: gcov.c:1377
-#, fuzzy
msgid "No executable lines\n"
-msgstr "Keine ausführbaren Zeilen"
+msgstr "Keine ausführbaren Zeilen\n"
#: gcov.c:1383
#, c-format
@@ -5421,7 +5390,7 @@ msgid "No calls\n"
msgstr "Keine Aufrufe\n"
#: gcov.c:1540
-#, fuzzy, c-format
+#, c-format
msgid "%s:no lines for '%s'\n"
msgstr "%s: keine Zeilen für »%s«\n"
@@ -5461,9 +5430,9 @@ msgid "%s:cannot open source file\n"
msgstr "%s: Quelldatei kann nicht geöffnet werden\n"
#: gcov.c:1799
-#, fuzzy, c-format
+#, c-format
msgid "%s:source file is newer than graph file '%s'\n"
-msgstr "%s: Quelldatei ist neuer als Graph-Datei »%s«\n"
+msgstr "%s: Quelldatei ist neuer als Graphen-Datei »%s«\n"
#. Return if there's nothing to do, or it is too expensive.
#: gcse.c:689
@@ -5522,23 +5491,22 @@ msgid "can't write PCH file"
msgstr "PCH-Datei kann nicht geschrieben werden"
#: gimple-low.c:203
-#, fuzzy
msgid "unexpected node"
-msgstr "unerwarteter Operand"
+msgstr "unerwarteter Knoten"
#: gimplify.c:3317
-#, fuzzy, c-format
+#, c-format
msgid "invalid lvalue in asm output %d"
-msgstr "ungültiger L-Wert in asm-Anweisung"
+msgstr "ungültiger L-Wert in asm-Ausgabe %d"
#: gimplify.c:3364
-#, fuzzy, c-format
+#, c-format
msgid "memory input %d is not directly addressable"
-msgstr "Ausgabezahl %d nicht direkt adressierbar"
+msgstr "Speichereingabe %d ist nicht direkt adressierbar"
#: gimplify.c:4219
msgid "gimplification failed"
-msgstr ""
+msgstr "Gimplifikation gescheitert"
#: global.c:371 global.c:384 global.c:398
#, c-format
@@ -5559,26 +5527,26 @@ msgstr "fix_sched_param: unbekannter Parameter: %s"
#. Opening quotation mark.
#: intl.c:58
msgid "`"
-msgstr ""
+msgstr "»"
#. Closing quotation mark.
#: intl.c:61
msgid "'"
-msgstr ""
+msgstr "«"
#: langhooks.c:516
msgid "At top level:"
msgstr "Auf höchster Ebene:"
#: langhooks.c:521
-#, fuzzy, c-format
+#, c-format
msgid "In member function %qs:"
-msgstr "In Funktion »%s«:"
+msgstr "In Elementfunktion %qs:"
#: langhooks.c:525
-#, fuzzy, c-format
+#, c-format
msgid "In function %qs:"
-msgstr "In Funktion »%s«:"
+msgstr "In Funktion %qs:"
#. What to print when a switch has no documentation.
#: opts.c:89
@@ -5612,21 +5580,21 @@ msgstr "-Wuninitialized wird nicht ohne -O unterstützt"
#: opts.c:648
msgid "-freorder-blocks-and-partition does not work with exceptions"
-msgstr ""
+msgstr "-freorder-blocks-and-partition funktioniert nicht mit Ausnahmen"
#: opts.c:661
msgid "-freorder-blocks-and-partition does not work with -g (currently)"
-msgstr ""
+msgstr "-freorder-blocks-and-partition funktioniert (momentan) nicht mit -g"
#: opts.c:821
-#, fuzzy, c-format
+#, c-format
msgid "structure alignment must be a small power of two, not %d"
-msgstr "Ausrichtung muss eine kleine Zweierpotenz sein, nicht %d"
+msgstr "Strukturausrichtung muss eine kleine Zweierpotenz sein, nicht %d"
#: opts.c:886
-#, fuzzy, c-format
+#, c-format
msgid "unrecognised visibility value \"%s\""
-msgstr "unbekannter Registername: \"%s\""
+msgstr "unbekannter Sichtbarkeitswert \"%s\""
#: opts.c:938
#, c-format
@@ -5644,9 +5612,9 @@ msgid "%s: --param arguments should be of the form NAME=VALUE"
msgstr "%s: »--param«-Argumente sollten von der Form NAME=VALUE sein"
#: opts.c:1042
-#, fuzzy, c-format
+#, c-format
msgid "invalid --param value %qs"
-msgstr "ungültiger Wert für --param: »%s«"
+msgstr "ungültiger Wert für --param: %qs"
#: opts.c:1139
msgid "target system does not support debug output"
@@ -5685,20 +5653,20 @@ msgid "The --param option recognizes the following as parameters:\n"
msgstr "Die Option »--param« erkennt die folgenden Parameter:\n"
#: params.c:72
-#, fuzzy, c-format
+#, c-format
msgid "minimum value of parameter %qs is %u"
-msgstr "ungültiger Parameter »%s«"
+msgstr "minimaler Wert des Parameters %qs ist %u"
#: params.c:77
-#, fuzzy, c-format
+#, c-format
msgid "maximum value of parameter %qs is %u"
-msgstr "ungültiger Parameter »%s«"
+msgstr "maximaler Wert des Parameters %qs ist %u"
#. If we didn't find this parameter, issue an error message.
#: params.c:86
-#, fuzzy, c-format
+#, c-format
msgid "invalid parameter %qs"
-msgstr "ungültiger Parameter »%s«"
+msgstr "ungültiger Parameter %qs"
#: passes.c:1200
msgid "branch target register load optimization is not intended to be run twice"
@@ -5728,7 +5696,7 @@ msgid "corrupted profile info: number of executions for edge %d-%d thought to be
msgstr "Info zum beschädigten Profil: Anzahl der Ausführungen der Kante »%d-%d« sollte %i sein"
#: protoize.c:582
-#, fuzzy, c-format
+#, c-format
msgid "%s: error writing file '%s': %s\n"
msgstr "%s: Fehler beim Schreiben der Datei »%s«: %s\n"
@@ -5743,19 +5711,19 @@ msgid "%s: usage '%s [ -VqfnkNlgC ] [ -B <dirname> ] [ filename ... ]'\n"
msgstr "%s: Aufruf '%s [ -VqfnkNlgC ] [ -B <VerzName> ] [ Dateiname ... ]'\n"
#: protoize.c:735
-#, fuzzy, c-format
+#, c-format
msgid "%s: warning: no read access for file '%s'\n"
msgstr "%s: Warnung: kein Leserecht für Datei »%s«\n"
#: protoize.c:743
-#, fuzzy, c-format
+#, c-format
msgid "%s: warning: no write access for file '%s'\n"
msgstr "%s: Warnung: kein Schreibrecht für Datei »%s«\n"
#: protoize.c:751
-#, fuzzy, c-format
+#, c-format
msgid "%s: warning: no write access for dir containing '%s'\n"
-msgstr "%s: Warnung: kein Schreibrecht für Verzeichnis von »%s«\n"
+msgstr "%s: Warnung: kein Schreibrecht für Verzeichnis mit »%s«\n"
#. Catch cases like /.. where we try to backup to a
#. point above the absolute root of the logical file
@@ -5768,7 +5736,7 @@ msgstr "%s: ungültiger Dateiname: %s\n"
#: protoize.c:1286
#, c-format
msgid "%s: %s: can't get status: %s\n"
-msgstr "%s: %s: kann Status nicht ermitteln: %s\n"
+msgstr "%s: %s: Status kann nicht ermittelt werden: %s\n"
#: protoize.c:1307
#, c-format
@@ -5780,12 +5748,12 @@ msgstr ""
"%s: kritischer Fehler: Datei mit Hilfsinformationen beschädigt in Zeile %d\n"
#: protoize.c:1636
-#, fuzzy, c-format
+#, c-format
msgid "%s:%d: declaration of function '%s' takes different forms\n"
msgstr "%s:%d: Deklaration der Funktion »%s« nimmt verschiedene Formen an\n"
#: protoize.c:1891
-#, fuzzy, c-format
+#, c-format
msgid "%s: compiling '%s'\n"
msgstr "%s: »%s« wird kompiliert\n"
@@ -5805,47 +5773,47 @@ msgid "%s: %s exited with status %d\n"
msgstr "%s: %s beendet mit Status %d\n"
#: protoize.c:1976
-#, fuzzy, c-format
+#, c-format
msgid "%s: warning: missing SYSCALLS file '%s'\n"
msgstr "%s: Warnung: SYSCALLS-Datei »%s« fehlt\n"
#: protoize.c:1985 protoize.c:2014
-#, fuzzy, c-format
+#, c-format
msgid "%s: can't read aux info file '%s': %s\n"
-msgstr "%s: Datei mit Hilfsinformationen »%s« kann nicht gelesen werden: %s\n"
+msgstr "%s: Datei mit Zusatzinformationen »%s« kann nicht gelesen werden: %s\n"
#: protoize.c:2030 protoize.c:2058
-#, fuzzy, c-format
+#, c-format
msgid "%s: can't get status of aux info file '%s': %s\n"
-msgstr "%s: Status der Datei mit Hilfsinformationen »%s« kann nicht ermittelt werden: %s\n"
+msgstr "%s: Status der Datei mit Zusatzinformationen »%s« kann nicht ermittelt werden: %s\n"
#: protoize.c:2086
-#, fuzzy, c-format
+#, c-format
msgid "%s: can't open aux info file '%s' for reading: %s\n"
-msgstr "%s: Datei mit Hilfsinformationen »%s« kann nicht zum Lesen geöffnet werden: %s\n"
+msgstr "%s: Datei mit Zusatzinformationen »%s« kann nicht zum Lesen geöffnet werden: %s\n"
#: protoize.c:2104
-#, fuzzy, c-format
+#, c-format
msgid "%s: error reading aux info file '%s': %s\n"
-msgstr "%s: Fehler beim Lesen der Datei mit Hilfsinformationen »%s«: %s\n"
+msgstr "%s: Fehler beim Lesen der Datei mit Zusatzinformationen »%s«: %s\n"
#: protoize.c:2117
-#, fuzzy, c-format
+#, c-format
msgid "%s: error closing aux info file '%s': %s\n"
-msgstr "%s: Fehler beim Schließen der Datei mit Hilfsinformationen »%s«: %s\n"
+msgstr "%s: Fehler beim Schließen der Datei mit Zusatzinformationen »%s«: %s\n"
#: protoize.c:2133
-#, fuzzy, c-format
+#, c-format
msgid "%s: can't delete aux info file '%s': %s\n"
-msgstr "%s: Fehler beim Löschen der Datei mit Hilfsinformationen »%s«: %s\n"
+msgstr "%s: Fehler beim Löschen der Datei mit Zusatzinformationen »%s«: %s\n"
#: protoize.c:2215 protoize.c:4185
-#, fuzzy, c-format
+#, c-format
msgid "%s: can't delete file '%s': %s\n"
msgstr "%s: Fehler beim Löschen der Datei »%s«: %s\n"
#: protoize.c:2293
-#, fuzzy, c-format
+#, c-format
msgid "%s: warning: can't rename file '%s' to '%s': %s\n"
msgstr "%s: Warnung: Fehler beim Umbenennen der Datei »%s« in »%s«: %s\n"
@@ -5865,27 +5833,27 @@ msgid "%s: conflict list for '%s' follows:\n"
msgstr "%s: Konfliktliste für »%s« folgt:\n"
#: protoize.c:2454
-#, fuzzy, c-format
+#, c-format
msgid "%s: warning: using formals list from %s(%d) for function '%s'\n"
msgstr "%s: Warnung: Formalliste von %s(%d) für Funktion »%s« verwendet\n"
#: protoize.c:2494
-#, fuzzy, c-format
+#, c-format
msgid "%s: %d: '%s' used but missing from SYSCALLS\n"
msgstr "%s: %d: »%s« verwendet, fehlt jedoch in SYSCALLS\n"
#: protoize.c:2500
-#, fuzzy, c-format
+#, c-format
msgid "%s: %d: warning: no extern definition for '%s'\n"
msgstr "%s: %d: Warnung: keine externe Definition für »%s«\n"
#: protoize.c:2530
-#, fuzzy, c-format
+#, c-format
msgid "%s: warning: no static definition for '%s' in file '%s'\n"
msgstr "%s: Warnung: keine statische Definition für »%s« in Datei »%s«\n"
#: protoize.c:2536
-#, fuzzy, c-format
+#, c-format
msgid "%s: multiple static defs of '%s' in file '%s'\n"
msgstr "%s: mehrere statische Definitionen von »%s« in Datei »%s«\n"
@@ -5900,17 +5868,17 @@ msgid "%s: %d: warning: varargs function declaration not converted\n"
msgstr "%s: %d: Warnung: Funktionsdeklaration mit variablen Argumenten nicht konvertiert\n"
#: protoize.c:2920
-#, fuzzy, c-format
+#, c-format
msgid "%s: declaration of function '%s' not converted\n"
msgstr "%s: Deklaration der Funktion »%s« nicht konvertiert\n"
#: protoize.c:3043
-#, fuzzy, c-format
+#, c-format
msgid "%s: warning: too many parameter lists in declaration of '%s'\n"
msgstr "%s: Warnung: zu viele Parameterlisten in Deklaration von »%s«\n"
#: protoize.c:3064
-#, fuzzy, c-format
+#, c-format
msgid ""
"\n"
"%s: warning: too few parameter lists in declaration of '%s'\n"
@@ -5919,31 +5887,31 @@ msgstr ""
"%s: Warnung: zu wenige Parameterlisten in Deklaration von »%s«\n"
#: protoize.c:3160
-#, fuzzy, c-format
+#, c-format
msgid "%s: %d: warning: found '%s' but expected '%s'\n"
msgstr "%s: %d: Warnung: »%s« gefunden, aber »%s« erwartet\n"
#: protoize.c:3335
-#, fuzzy, c-format
+#, c-format
msgid "%s: local declaration for function '%s' not inserted\n"
msgstr "%s: lokale Deklaration für Funktion »%s« nicht eingefügt\n"
#: protoize.c:3362
-#, fuzzy, c-format
+#, c-format
msgid ""
"\n"
"%s: %d: warning: can't add declaration of '%s' into macro call\n"
msgstr ""
"\n"
-"%s: %d: Warnung: kann Deklaration von »%s« nicht zu Makro-Aufruf hinzufügen\n"
+"%s: %d: Warnung: Deklaration von »%s« kann nicht zu Makro-Aufruf hinzugefügt werden\n"
#: protoize.c:3434
-#, fuzzy, c-format
+#, c-format
msgid "%s: global declarations for file '%s' not inserted\n"
msgstr "%s: globale Deklarationen für Datei »%s« wurden nicht eingefügt\n"
#: protoize.c:3523 protoize.c:3553
-#, fuzzy, c-format
+#, c-format
msgid "%s: definition of function '%s' not converted\n"
msgstr "%s: Definition der Funktion »%s« nicht konvertiert\n"
@@ -5953,14 +5921,14 @@ msgid "%s: %d: warning: definition of %s not converted\n"
msgstr "%s: %d: Warnung: Definition von %s nicht konvertiert\n"
#: protoize.c:3868
-#, fuzzy, c-format
+#, c-format
msgid "%s: found definition of '%s' at %s(%d)\n"
-msgstr "%s: Definition von »%s« an Stelle %s(%d) gefunden\n"
+msgstr "%s: Definition von »%s« bei %s(%d) gefunden\n"
#. If we make it here, then we did not know about this
#. function definition.
#: protoize.c:3884
-#, fuzzy, c-format
+#, c-format
msgid "%s: %d: warning: '%s' excluded by preprocessing\n"
msgstr "%s: %d: Warnung: »%s« durch Präprozessor ausgeschlossen\n"
@@ -5970,32 +5938,32 @@ msgid "%s: function definition not converted\n"
msgstr "%s: Funktionsdefinition nicht konvertiert\n"
#: protoize.c:3945
-#, fuzzy, c-format
+#, c-format
msgid "%s: '%s' not converted\n"
msgstr "%s: »%s« nicht konvertiert\n"
#: protoize.c:3953
-#, fuzzy, c-format
+#, c-format
msgid "%s: would convert file '%s'\n"
-msgstr "%s: würde Datei »%s« konvertieren\n"
+msgstr "%s: Datei »%s« würde konvertiert werden\n"
#: protoize.c:3956
-#, fuzzy, c-format
+#, c-format
msgid "%s: converting file '%s'\n"
msgstr "%s: Datei »%s« wird konvertiert\n"
#: protoize.c:3966
-#, fuzzy, c-format
+#, c-format
msgid "%s: can't get status for file '%s': %s\n"
msgstr "%s: Status der Datei »%s« kann nicht ermittelt werden: %s\n"
#: protoize.c:4008
-#, fuzzy, c-format
+#, c-format
msgid "%s: can't open file '%s' for reading: %s\n"
-msgstr "%s: Datei »%s« kann nicht zum Schreiben geöffnet werden: %s\n"
+msgstr "%s: Datei »%s« kann nicht zum Lesen geöffnet werden: %s\n"
#: protoize.c:4023
-#, fuzzy, c-format
+#, c-format
msgid ""
"\n"
"%s: error reading input file '%s': %s\n"
@@ -6004,27 +5972,27 @@ msgstr ""
"%s: Fehler beim Lesen der Eingabedatei »%s«: %s\n"
#: protoize.c:4057
-#, fuzzy, c-format
+#, c-format
msgid "%s: can't create/open clean file '%s': %s\n"
msgstr "%s: die leere Datei »%s« kann nicht erzeugt oder geöffnet werden: %s\n"
#: protoize.c:4162
-#, fuzzy, c-format
+#, c-format
msgid "%s: warning: file '%s' already saved in '%s'\n"
msgstr "%s: Warnung: Datei »%s« bereits in »%s« gesichert\n"
#: protoize.c:4170
-#, fuzzy, c-format
+#, c-format
msgid "%s: can't link file '%s' to '%s': %s\n"
msgstr "%s: die Datei »%s« kann nicht mit »%s« verbunden werden (Link): %s\n"
#: protoize.c:4200
-#, fuzzy, c-format
+#, c-format
msgid "%s: can't create/open output file '%s': %s\n"
msgstr "%s: die Ausgabedatei »%s« kann nicht erzeugt oder geöffnet werden: %s\n"
#: protoize.c:4233
-#, fuzzy, c-format
+#, c-format
msgid "%s: can't change mode of file '%s': %s\n"
msgstr "%s: Rechte der Datei »%s« können nicht geändert werden: %s\n"
@@ -6057,9 +6025,8 @@ msgid "implicitly popped regs must be grouped at top of stack"
msgstr "implizit geholte (»pop«) Register müssen oben auf dem Stack gruppiert werden"
#: reg-stack.c:711
-#, fuzzy
msgid "output operand %d must use %<&%> constraint"
-msgstr "Ausgabeoperand %d muss »&«-Bedingung benutzen"
+msgstr "Ausgabeoperand %d muss %<&%>-Bedingung verwenden"
#: regclass.c:766
#, c-format
@@ -6105,28 +6072,24 @@ msgid "validate_value_data: [%u] Non-empty reg in chain (%s %u %i)"
msgstr "validate_value_data: [%u] Nicht leeres Register in Kette (%s %u %i)"
#: reload.c:1270
-#, fuzzy
msgid "cannot reload integer constant operand in %<asm%>"
-msgstr "Ganzzahlkonstantenoperand kann in »asm« nicht neu geladen werden"
+msgstr "Ganzzahlkonstantenoperand kann in %<asm%> nicht neu geladen werden"
#: reload.c:1293
-#, fuzzy
msgid "impossible register constraint in %<asm%>"
-msgstr "unmögliche Registerbedingung in »asm«"
+msgstr "unmögliche Registerbedingung in %<asm%>"
#: reload.c:3535
-#, fuzzy
msgid "%<&%> constraint used with no register class"
-msgstr "»&«-Bedingung ohne Registerklasse verwendet"
+msgstr "%<&%>-Bedingung ohne Registerklasse verwendet"
#: reload.c:3705
msgid "unable to generate reloads for:"
msgstr "Neuladungen konnten nicht generiert werden für:"
#: reload.c:3706 reload.c:3938
-#, fuzzy
msgid "inconsistent operand constraints in an %<asm%>"
-msgstr "inkonsistente Operandenbedingungen in einem »asm«"
+msgstr "inkonsistente Operandenbedingungen in einem %<asm%>"
#: reload1.c:1211
msgid "frame size too large for reliable stack checking"
@@ -6137,23 +6100,21 @@ msgid "try reducing the number of local variables"
msgstr "versuchen Sie, die Anzahl der lokalen Variablen zu verringern"
#: reload1.c:1865
-#, fuzzy
msgid "can't find a register in class %qs while reloading %<asm%>"
-msgstr "in der Klasse »%s« konnte während des Neuladens von »asm« kein Register gefunden werden"
+msgstr "in der Klasse %qs konnte während des Neuladens von %<asm%> kein Register gefunden werden"
#: reload1.c:1870
-#, fuzzy, c-format
+#, c-format
msgid "unable to find a register to spill in class %qs"
-msgstr "in Klasse »%s« konnte kein Register für Überlauf gefunden werden"
+msgstr "in Klasse %qs konnte kein Register für Überlauf gefunden werden"
#: reload1.c:1872
msgid "this is the insn:"
msgstr "dies ist der Befehl:"
#: reload1.c:3863
-#, fuzzy
msgid "%<asm%> operand requires impossible reload"
-msgstr "»asm«-Operand erfordert unmögliches Neuladen"
+msgstr "%<asm%>-Operand erfordert unmögliches Neuladen"
#. It's the compiler's fault.
#: reload1.c:4982
@@ -6161,9 +6122,8 @@ msgid "could not find a spill register"
msgstr "es konnte kein Ãœberlaufregister gefunden werden"
#: reload1.c:4987
-#, fuzzy
msgid "%<asm%> operand constraint incompatible with operand size"
-msgstr "»asm«-Operandenbedingung inkompatibel mit Operandengröße"
+msgstr "%<asm%>-Operandenbedingung inkompatibel mit Operandengröße"
#. It's the compiler's fault.
#: reload1.c:6614
@@ -6171,9 +6131,8 @@ msgid "VOIDmode on an output"
msgstr "VOIDmode bei einer Ausgabe"
#: reload1.c:6615
-#, fuzzy
msgid "output operand is constant in %<asm%>"
-msgstr "Ausgabeoperand ist in »asm« konstant"
+msgstr "Ausgabeoperand ist in %<asm%> konstant"
#: rtl-error.c:128
msgid "unrecognizable insn:"
@@ -6184,7 +6143,7 @@ msgid "insn does not satisfy its constraints:"
msgstr "Befehl erfüllt nicht seine Bedingungen:"
#: rtl.c:471
-#, fuzzy, c-format
+#, c-format
msgid "RTL check: access of elt %d of '%s' with last elt %d in %s, at %s:%d"
msgstr "RTL-Überprüfung: Zugriff von Elt %d von »%s« mit letztem Elt %d in %s, bei %s:%d"
@@ -6199,12 +6158,12 @@ msgid "RTL check: expected elt %d type '%c' or '%c', have '%c' (rtx %s) in %s, a
msgstr "RTL-Überprüfung: Elt-%d-Typ %c oder %c erwartet, haben Typ %c (rtx %s) in %s, bei %s:%d"
#: rtl.c:500
-#, fuzzy, c-format
+#, c-format
msgid "RTL check: expected code '%s', have '%s' in %s, at %s:%d"
msgstr "RTL-Überprüfung: Code »%s« erwartet, haben »%s« in %s, bei %s:%d"
#: rtl.c:510
-#, fuzzy, c-format
+#, c-format
msgid "RTL check: expected code '%s' or '%s', have '%s' in %s, at %s:%d"
msgstr "RTL-Überprüfung: Code »%s« oder »%s« erwartet, haben »%s« in %s, bei %s:%d"
@@ -6214,71 +6173,65 @@ msgid "RTL check: access of elt %d of vector with last elt %d in %s, at %s:%d"
msgstr "RTL-Überprüfung: Zugriff von Elt %d von Vektor mit letztem Elt %d in %s, bei %s:%d"
#: rtl.c:532
-#, fuzzy, c-format
+#, c-format
msgid "RTL flag check: %s used with unexpected rtx code '%s' in %s, at %s:%d"
msgstr "RTL-Kennzeichenüberprüfung: %s mit unerwartetem RTX-Code »%s« in %s bei %s:%d verwendet"
#: stmt.c:317
-#, fuzzy
msgid "output operand constraint lacks %<=%>"
-msgstr "Bedingung des Ausgabeoperanden erfordert »=«"
+msgstr "Bedingung des Ausgabeoperanden erfordert %<=%>"
#: stmt.c:332
-#, fuzzy, c-format
+#, c-format
msgid "output constraint %qc for operand %d is not at the beginning"
-msgstr "Ausgabebedingung »%c« für Operand %d steht nicht am Anfang"
+msgstr "Ausgabebedingung %qc für Operand %d steht nicht am Anfang"
#: stmt.c:355
-#, fuzzy
msgid "operand constraint contains incorrectly positioned %<+%> or %<=%>"
-msgstr "Operandenbedingung enthält falsch positioniertes »+« oder »=«"
+msgstr "Operandenbedingung enthält falsch positioniertes %<+%> oder %<=%>"
#: stmt.c:362 stmt.c:461
-#, fuzzy
msgid "%<%%%> constraint used with last operand"
-msgstr "»%%«-Bedingung mit letztem Operanden verwendet"
+msgstr "%<%%%>-Bedingung mit letztem Operanden verwendet"
#: stmt.c:381
msgid "matching constraint not valid in output operand"
msgstr "dazu passende Bedingung in Ausgabeoperanden ungültig"
#: stmt.c:452
-#, fuzzy, c-format
+#, c-format
msgid "input operand constraint contains %qc"
-msgstr "Bedingung für Eingabeoperanden enthält »%c«"
+msgstr "Bedingung für Eingabeoperanden enthält %qc"
#: stmt.c:494
msgid "matching constraint references invalid operand number"
msgstr "dazu passende Bedingung referenziert ungültige Operandennummer"
#: stmt.c:532
-#, fuzzy, c-format
+#, c-format
msgid "invalid punctuation %qc in constraint"
-msgstr "ungültiges Zeichen »%c« in Bedingung"
+msgstr "ungültiges Zeichen %qc in Bedingung"
#: stmt.c:556
msgid "matching constraint does not allow a register"
msgstr "dazu passende Bedingung erlaubt kein Register"
#: stmt.c:584
-#, fuzzy, c-format
+#, c-format
msgid "asm-specifier for variable %qs conflicts with asm clobber list"
-msgstr "asm-Spezifizierer für Variable »%s« steht in Konflikt mit asm-Konflikt-Liste"
+msgstr "asm-Spezifizierer für Variable %qs steht in Konflikt mit asm-Konflikt-Liste"
#: stmt.c:673
-#, fuzzy
msgid "unknown register name %qs in %<asm%>"
-msgstr "unbekannter Registername »%s« in »asm«"
+msgstr "unbekannter Registername %qs in %<asm%>"
#: stmt.c:681
-#, fuzzy
msgid "PIC register %qs clobbered in %<asm%>"
-msgstr "PIC-Register »%s« wird in »asm« zerstört"
+msgstr "PIC-Register %qs wird in %<asm%> zerstört"
#: stmt.c:728
-#, fuzzy
msgid "more than %d operands in %<asm%>"
-msgstr "mehr als %d Operanden in »asm«"
+msgstr "mehr als %d Operanden in %<asm%>"
#: stmt.c:791
#, c-format
@@ -6286,7 +6239,6 @@ msgid "output number %d not directly addressable"
msgstr "Ausgabezahl %d nicht direkt adressierbar"
#: stmt.c:870
-#, fuzzy
msgid "asm operand %d probably doesn%'t match constraints"
msgstr "asm-Operand %d passt wahrscheinlich nicht zu den Bedingungen"
@@ -6304,35 +6256,32 @@ msgid "asm clobber conflict with input operand"
msgstr "asm-Konflikt mit Eingabeoperand"
#: stmt.c:1109
-#, fuzzy
msgid "too many alternatives in %<asm%>"
-msgstr "zu viele Alternativen in »asm«"
+msgstr "zu viele Alternativen in %<asm%>"
#: stmt.c:1121
-#, fuzzy
msgid "operand constraints for %<asm%> differ in number of alternatives"
-msgstr "Operandenbedingungen für »asm« unterscheiden sich in der Anzahl der Alternativen"
+msgstr "Operandenbedingungen für %<asm%> unterscheiden sich in der Anzahl der Alternativen"
#: stmt.c:1174
-#, fuzzy, c-format
+#, c-format
msgid "duplicate asm operand name %qs"
-msgstr "doppelter asm-Operandenname »%s«"
+msgstr "doppelter asm-Operandenname %qs"
#: stmt.c:1272
msgid "missing close brace for named operand"
msgstr "schließende geschweifte Klammer für benannten Operanden fehlt"
#: stmt.c:1300
-#, fuzzy, c-format
+#, c-format
msgid "undefined named operand %qs"
-msgstr "benannter Operand »%s« ist nicht definiert"
+msgstr "benannter Operand %qs ist nicht definiert"
#: stmt.c:1465
msgid "%Hvalue computed is not used"
msgstr "%Hberechneter Wert ist unbenutzt"
#: stor-layout.c:152
-#, fuzzy
msgid "type size can%'t be explicitly evaluated"
msgstr "die Typgröße kann nicht explizit ausgewertet werden"
@@ -6341,43 +6290,38 @@ msgid "variable-size type declared outside of any function"
msgstr "Typ mit variabler Größe wurde außerhalb einer Funktion definiert"
#: stor-layout.c:458
-#, fuzzy
msgid "%Jsize of %qD is %d bytes"
-msgstr "%JGröße von »%Ds« ist %d Bytes"
+msgstr "%JGröße von %qD ist %d Bytes"
#: stor-layout.c:460
-#, fuzzy
msgid "%Jsize of %qD is larger than %d bytes"
-msgstr "%JGröße von »%D« übertrifft %d Bytes"
+msgstr "%JGröße von %qD überschreitet %d Bytes"
#: stor-layout.c:844
-#, fuzzy
msgid "%Jpacked attribute causes inefficient alignment for %qD"
-msgstr "%Jgepacktes Attribut verursacht ineffiziente Ausrichtung für »%D«"
+msgstr "%Jgepacktes Attribut verursacht ineffiziente Ausrichtung für %qD"
#: stor-layout.c:847
-#, fuzzy
msgid "%Jpacked attribute is unnecessary for %qD"
-msgstr "%Jgepacktes Attribut ist unnötig für »%D«"
+msgstr "%Jgepacktes Attribut ist unnötig für %qD"
#: stor-layout.c:863
-#, fuzzy
msgid "%Jpadding struct to align %qD"
-msgstr "%Jstruct wird aufgefüllt, um »%D« auszurichten"
+msgstr "%Jstruct wird aufgefüllt, um %qD auszurichten"
#: stor-layout.c:1205
msgid "padding struct size to alignment boundary"
msgstr "struct wird bis zur Ausrichtungsgrenze aufgefüllt"
#: stor-layout.c:1235
-#, fuzzy, c-format
+#, c-format
msgid "packed attribute causes inefficient alignment for %qs"
-msgstr "gepacktes Attribut verursacht ineffiziente Ausrichtung für »%s«"
+msgstr "gepacktes Attribut verursacht ineffiziente Ausrichtung für %qs"
#: stor-layout.c:1238
-#, fuzzy, c-format
+#, c-format
msgid "packed attribute is unnecessary for %qs"
-msgstr "gepacktes Attribut ist unnötig für »%s«"
+msgstr "gepacktes Attribut ist unnötig für %qs"
#: stor-layout.c:1243
msgid "packed attribute causes inefficient alignment"
@@ -6417,7 +6361,7 @@ msgstr "sammeln: %s lesen\n"
#: tlink.c:475
#, c-format
msgid "repository file '%s' does not contain command-line arguments"
-msgstr ""
+msgstr "Repository-Datei »%s« enthält keine Kommandozeilenargumente"
#: tlink.c:525
#, c-format
@@ -6427,7 +6371,7 @@ msgstr "sammeln: %s neu kompilieren\n"
#: tlink.c:696
#, c-format
msgid "'%s' was assigned to '%s', but was not defined during recompilation, or vice versa"
-msgstr ""
+msgstr "»%s« wurde an »%s« zugewiesen, war aber nicht während Rekompilierung definiert, oder umgekehrt"
#: tlink.c:705
#, c-format
@@ -6455,14 +6399,13 @@ msgid " %s"
msgstr " %s"
#: toplev.c:536
-#, fuzzy, c-format
+#, c-format
msgid "invalid option argument %qs"
-msgstr "ungültiges Optionsargument »%s«"
+msgstr "ungültiges Optionsargument %qs"
#: toplev.c:606
-#, fuzzy
msgid "unrecoverable error"
-msgstr "interner Fehler"
+msgstr "nicht behebbarer Fehler"
#: toplev.c:626
#, c-format
@@ -6475,19 +6418,17 @@ msgid "setting core file size limit to maximum: %m"
msgstr "Kern-Dateigrößenlimit wird gesetzt: %m"
#: toplev.c:850
-#, fuzzy
msgid "%J%qF declared %<static%> but never defined"
-msgstr "%J»%F« als »static« deklariert, aber nirgendwo definiert"
+msgstr "%J%qF als %<static%> deklariert, aber nirgendwo definiert"
#: toplev.c:876
-#, fuzzy
msgid "%J%qD defined but not used"
-msgstr "%J»%D« definiert, aber nicht verwendet"
+msgstr "%J%qD definiert, aber nicht verwendet"
#: toplev.c:899 toplev.c:922
-#, fuzzy, c-format
+#, c-format
msgid "%qs is deprecated (declared at %s:%d)"
-msgstr "»%s« ist veraltet (deklariert bei %s:%d)"
+msgstr "%qs ist veraltet (deklariert bei %s:%d)"
#: toplev.c:925
#, c-format
@@ -6495,9 +6436,9 @@ msgid "type is deprecated (declared at %s:%d)"
msgstr "Typ ist veraltet (in %s:%d deklariert)"
#: toplev.c:931
-#, fuzzy, c-format
+#, c-format
msgid "%qs is deprecated"
-msgstr "»%s« ist veraltet"
+msgstr "%qs ist veraltet"
#: toplev.c:933
msgid "type is deprecated"
@@ -6534,14 +6475,14 @@ msgstr " Es gibt sie, aber sie sind nicht dokumentiert.\n"
#: toplev.c:1175
#, c-format
msgid "unrecognized gcc debugging option: %c"
-msgstr "gcc-Debuggingoption nicht erkannt: %c"
+msgstr "GCC-Debuggingoption nicht erkannt: %c"
#. Handle -mfix-and-continue.
#: toplev.c:1237 config/rs6000/rs6000.c:1400 config/rs6000/rs6000.c:1411
#: config/rs6000/darwin.h:106
-#, fuzzy, c-format
+#, c-format
msgid "invalid option %qs"
-msgstr "ungültige Option »%s«"
+msgstr "ungültige Option %qs"
#: toplev.c:1252
#, c-format
@@ -6568,9 +6509,8 @@ msgid "options enabled: "
msgstr "angeschaltete Optionen: "
#: toplev.c:1414
-#, fuzzy
msgid "can%'t open %s for writing: %m"
-msgstr "Datei »%s« kann nicht zum Schreiben geöffnet werden: %m"
+msgstr "%s kann nicht zum Schreiben geöffnet werden: %m"
#: toplev.c:1492 config/sh/sh.c:7334
msgid "created and used with different settings of -fpic"
@@ -6581,7 +6521,7 @@ msgid "created and used with different settings of -fpie"
msgstr "erzeugt und mit anderen Einstellungen von -fpie verwendet"
#: toplev.c:1545 config/sh/sh.c:7386
-#, fuzzy, c-format
+#, c-format
msgid "created and used with differing settings of '-m%s'"
msgstr "erzeugt und mit anderen Einstellungen von »-m%s« verwendet"
@@ -6598,9 +6538,8 @@ msgid "this target machine does not have delayed branches"
msgstr "diese Zielmaschine hat keine verzögerten Zweige"
#: toplev.c:1764
-#, fuzzy
msgid "value-based profiling not yet implemented in trees."
-msgstr "Profiling noch nicht implementiert"
+msgstr "wertebasiertes Profiling noch nicht in Bäumen implementiert"
#: toplev.c:1777
#, c-format
@@ -6614,15 +6553,13 @@ msgstr "Zielsystem unterstützt nicht das Testformat \"%s\""
#: toplev.c:1863
msgid "variable tracking requested, but useless unless producing debug info"
-msgstr ""
+msgstr "Variablenverfolgung angefordert, jedoch nutzlos ohne Debug-Info"
#: toplev.c:1866
-#, fuzzy
msgid "variable tracking requested, but not supported by this debug format"
-msgstr "Zielsystem unterstützt nicht das Testformat \"%s\""
+msgstr "Variablenverfolgung angefordert, jedoch nicht von diesem Debug-Format unterstützt"
#: toplev.c:1886
-#, fuzzy
msgid "can%'t open %s: %m"
msgstr "%s kann nicht geöffnet werden: %m"
@@ -6643,18 +6580,16 @@ msgid "-fprefetch-loop-arrays not supported for this target"
msgstr "-fprefetch-loop-arrays wird für dieses Ziel nicht unterstützt"
#: toplev.c:1918
-#, fuzzy
msgid "-fspeculative-prefetching not supported for this target"
-msgstr "-fdata-sections wird für dieses Ziel nicht unterstützt"
+msgstr "-fspeculative-prefetching wird für dieses Ziel nicht unterstützt"
#: toplev.c:1924
msgid "-fprefetch-loop-arrays not supported for this target (try -march switches)"
-msgstr "-fprefetch-loop-arrays wird für dieses Ziel nicht unterstützt (versuchen Sie die »-march«-Schalter)"
+msgstr "-fprefetch-loop-arrays wird für dieses Ziel nicht unterstützt (ggf. die »-march«-Schalter versuchen)"
#: toplev.c:1930
-#, fuzzy
msgid "-fspeculative-prefetching not supported for this target (try -march switches)"
-msgstr "-fprefetch-loop-arrays wird für dieses Ziel nicht unterstützt (versuchen Sie die »-march«-Schalter)"
+msgstr "-fspeculative-prefetching wird für dieses Ziel nicht unterstützt (ggf die »-march«-Schalter versuchen)"
#: toplev.c:1939
msgid "-fprefetch-loop-arrays is not supported with -Os"
@@ -6680,290 +6615,269 @@ msgstr "%Hwird niemals ausgeführt"
#: tree-cfg.c:3289
msgid "SSA name in freelist but still referenced"
-msgstr ""
+msgstr "SSA-Name in Frei-Liste, jedoch immer noch referenziert"
#: tree-cfg.c:3299
msgid "GIMPLE register modified with BIT_FIELD_REF"
-msgstr ""
+msgstr "GIMPLE-Register mit BIT_FIELD_REF verändert"
#: tree-cfg.c:3327
msgid "address taken, but ADDRESSABLE bit not set"
-msgstr ""
+msgstr "Adresse genommen, aber ADDRESSABLE-Bit nicht gesetzt"
#: tree-cfg.c:3336
msgid "non-boolean used in condition"
-msgstr ""
+msgstr "Nicht-Boolean in Bedingung verwendet"
#: tree-cfg.c:3391
-#, fuzzy
msgid "Invalid reference prefix."
-msgstr "Ungültiger Referenztyp"
+msgstr "Ungültiger Referenzprefix."
#: tree-cfg.c:3456
-#, fuzzy
msgid "Is not a valid GIMPLE statement."
-msgstr "Ungültige Init-Anweisung"
+msgstr "Ist keine gültige GIMPLE-Anweisung."
#: tree-cfg.c:3476
msgid "Statement marked for throw, but doesn%'t."
-msgstr ""
+msgstr "Anweisung für throw markiert, tut es jedoch nicht."
#: tree-cfg.c:3481
msgid "Statement marked for throw in middle of block."
-msgstr ""
+msgstr "Anweisung für throw inmitten eines Blockes markiert."
#: tree-cfg.c:3585
msgid "PHI def is not a GIMPLE value"
-msgstr ""
+msgstr "PHI def ist kein GIMPLE-Wert"
#: tree-cfg.c:3601 tree-cfg.c:3617
msgid "Incorrect sharing of tree nodes"
-msgstr ""
+msgstr "Falscher gemeinsamer Zugriff auf Baumknoten"
#: tree-cfg.c:3626
-#, fuzzy
msgid "verify_stmts failed."
-msgstr "verify_flow_info gescheitert"
+msgstr "verify_stmts gescheitert."
#: tree-cfg.c:3647
msgid "ENTRY_BLOCK has a statement list associated with it\n"
-msgstr ""
+msgstr "ENTRY_BLOCK hat zugehörige Anweisungsliste\n"
#: tree-cfg.c:3653
msgid "EXIT_BLOCK has a statement list associated with it\n"
-msgstr ""
+msgstr "EXIT_BLOCK hat zugehörige Anweisungsliste\n"
#: tree-cfg.c:3660
#, c-format
msgid "Fallthru to exit from bb %d\n"
-msgstr ""
+msgstr "Fallthru zum Austritt von bb %d\n"
#: tree-cfg.c:3682
#, c-format
msgid "Nonlocal label %s is not first in a sequence of labels in bb %d"
-msgstr ""
+msgstr "Nicht-lokale Marke %s kommt nicht zuerst in Sequenz der Marken in bb %d"
#: tree-cfg.c:3691
#, c-format
msgid "Label %s to block does not match in bb %d\n"
-msgstr ""
+msgstr "Marke %s zum Block passt nicht in bb %d\n"
#: tree-cfg.c:3700
#, c-format
msgid "Label %s has incorrect context in bb %d\n"
-msgstr ""
+msgstr "Marke %s hat falschen Kontext in bb %d\n"
#: tree-cfg.c:3714
-#, fuzzy, c-format
+#, c-format
msgid "Control flow in the middle of basic block %d\n"
-msgstr "Flusskontrollbefehl innerhalb eines Basis-Blockes"
+msgstr "Kontrollfluss inmitten des Basis-Blockes %d\n"
#: tree-cfg.c:3724
-#, fuzzy, c-format
+#, c-format
msgid "Label %s in the middle of basic block %d\n"
-msgstr "NOTE_INSN_BASIC_BLOCK %d in der Mitte des Basis-Blocks %d"
+msgstr "Marke %s in der Mitte des Basis-Blocks %d\n"
#: tree-cfg.c:3741
-#, fuzzy, c-format
+#, c-format
msgid "Fallthru edge after a control statement in bb %d \n"
-msgstr "Fallthru-Kante nach unbedingtem Sprung %i"
+msgstr "Fallthru-Kante hinter einer Kontrollanweisung in bb %d \n"
#: tree-cfg.c:3756
#, c-format
msgid "Structured COND_EXPR at the end of bb %d\n"
-msgstr ""
+msgstr "Strukturiertes COND_EXPR am Ende von bb %d\n"
#: tree-cfg.c:3769 tree-cfg.c:3807 tree-cfg.c:3819 tree-cfg.c:3890
#, c-format
msgid "Wrong outgoing edge flags at end of bb %d\n"
-msgstr ""
+msgstr "Falsche ausgehende Kantenmarken am Ende des bb %d\n"
#: tree-cfg.c:3777
msgid "%<then%> label does not match edge at end of bb %d\n"
-msgstr ""
+msgstr "%<then%>-Marke passt nicht zur Kante am Ende des bb %d\n"
#: tree-cfg.c:3785
msgid "%<else%> label does not match edge at end of bb %d\n"
-msgstr ""
+msgstr "%<else%>-Marke passt nicht zur Kante am Ende von bb %d\n"
#: tree-cfg.c:3795
#, c-format
msgid "Explicit goto at end of bb %d\n"
-msgstr ""
+msgstr "Explizites Goto am Ende von bb %d\n"
#: tree-cfg.c:3824
#, c-format
msgid "Return edge does not point to exit in bb %d\n"
-msgstr ""
+msgstr "Return-Kante zeigt nicht auf Ausgang in bb %d\n"
#: tree-cfg.c:3857
msgid "Found default case not at end of case vector"
-msgstr ""
+msgstr "Default-Fall nicht am Ende des case-Vektors gefunden"
#: tree-cfg.c:3863
-#, fuzzy
msgid ""
"Case labels not sorted:\n"
" "
-msgstr "Keine Trampoline unterstützt"
+msgstr ""
+"Case-Marken nicht sortiert:\n"
+" "
#: tree-cfg.c:3874
msgid "No default case found at end of case vector"
-msgstr ""
+msgstr "Kein Default-Fall am Ende des Case-Vektors gefunden"
#: tree-cfg.c:3882
#, c-format
msgid "Extra outgoing edge %d->%d\n"
-msgstr ""
+msgstr "Zusätzliche ausgehende Kante %d->%d\n"
#: tree-cfg.c:3904
-#, fuzzy, c-format
+#, c-format
msgid "Missing edge %i->%i"
-msgstr "Fehlender Bezeichner"
+msgstr "Fehlende Kante %i->%i"
#: tree-cfg.c:5707
-#, fuzzy
msgid "%Jfunction might be possible candidate for attribute %<noreturn%>"
-msgstr "Funktion könnte möglicher Kandidat für Attribut »noreturn« sein"
+msgstr "%JFunktion könnte möglicher Kandidat für Attribut %<noreturn%> sein"
#: tree-cfg.c:5734 tree-cfg.c:5738
-#, fuzzy
msgid "%H%<noreturn%> function does return"
-msgstr "»noreturn«-Funktion kehrt zurück"
+msgstr "%H%<noreturn%>-Funktion kehrt zurück"
#: tree-cfg.c:5759 tree-cfg.c:5764
-#, fuzzy
msgid "%Hcontrol reaches end of non-void function"
-msgstr "Kontrollfluss erreicht Ende einer Nicht-void-Funktion"
+msgstr "%HKontrollfluss erreicht Ende einer Nicht-void-Funktion"
#: tree-dump.c:849
-#, fuzzy, c-format
+#, c-format
msgid "could not open dump file %qs: %s"
-msgstr "Abzugsdatei »%s« konnte nicht geöffnet werden"
+msgstr "Abzugsdatei %qs konnte nicht geöffnet werden: %s"
#: tree-dump.c:965
-#, fuzzy
msgid "ignoring unknown option %q.*s in %<-fdump-%s%>"
-msgstr "unbekannte Option »%.*s« in »-fdump-%s« wird ignoriert"
+msgstr "unbekannte Option %q.*s in %<-fdump-%s%> wird ignoriert"
#: tree-inline.c:969
-#, fuzzy
msgid "%Jfunction %qF can never be inlined because it uses alloca (override using the always_inline attribute)"
-msgstr "%Jdie Funktion »%F« kann nie »inline« sein, da sie alloca verwendet (zum Aufheben: Attribut »always_inline« verwenden)"
+msgstr "%Jdie Funktion %qF kann nie »inline« sein, da sie alloca verwendet (zum Aufheben: Attribut »always_inline« verwenden)"
#: tree-inline.c:981
-#, fuzzy
msgid "%Jfunction %qF can never be inlined because it uses setjmp"
-msgstr "%Jdie Funktion »%F« kann nie »inline« sein, da sie setjmp verwendet"
+msgstr "%Jdie Funktion %qF kann nie »inline« sein, da sie setjmp verwendet"
#: tree-inline.c:995
-#, fuzzy
msgid "%Jfunction %qF can never be inlined because it uses variable argument lists"
-msgstr "%Jdie Funktion »%F« kann nie »inline« sein, da sie eine variable Argumentliste verwendet"
+msgstr "%Jdie Funktion %qF kann nie »inline« sein, da sie eine variable Argumentliste verwendet"
#: tree-inline.c:1006
-#, fuzzy
msgid "%Jfunction %qF can never be inlined because it uses setjmp-longjmp exception handling"
-msgstr "%Jdie Funktion »%F« kann nie »inline« sein, da sie »setjmp-longjmp«-Ausnahmebehandlung verwendet"
+msgstr "%Jdie Funktion %qF kann nie »inline« sein, da sie »setjmp-longjmp«-Ausnahmebehandlung verwendet"
#: tree-inline.c:1013
-#, fuzzy
msgid "%Jfunction %qF can never be inlined because it uses non-local goto"
-msgstr "%Jdie Funktion »%F« kann nie »inline« sein, da sie ein nichtlokales »goto« enthält"
+msgstr "%Jdie Funktion %qF kann nie »inline« sein, da sie ein nichtlokales »goto« enthält"
#: tree-inline.c:1032
-#, fuzzy
msgid "%Jfunction %qF can never be inlined because it contains a computed goto"
-msgstr "%Jdie Funktion »%F« kann nie »inline« sein, da sie ein berechnetes »goto« enthält"
+msgstr "%Jdie Funktion %qF kann nie »inline« sein, da sie ein berechnetes »goto« enthält"
#: tree-inline.c:1046
-#, fuzzy
msgid "%Jfunction %qF can never be inlined because it receives a non-local goto"
-msgstr "%Jdie Funktion »%F« kann nie »inline« sein, da sie ein nichtlokales »goto« enthält"
+msgstr "%Jdie Funktion %qF kann nie »inline« sein, da sie ein nichtlokales »goto« empfängt"
#: tree-inline.c:1071
-#, fuzzy
msgid "%Jfunction %qF can never be inlined because it uses variable sized variables"
-msgstr "%Jdie Funktion »%F« kann nie »inline« sein, da sie Variablen variabler Größe verwendet"
+msgstr "%Jdie Funktion %qF kann nie »inline« sein, da sie Variablen variabler Größe verwendet"
#: tree-inline.c:1495
-#, fuzzy
msgid "originally indirect function call not considered for inlining"
-msgstr "redefinierte »extern inline«-Funktionen kommen nicht als »inline« in Betracht"
+msgstr "ursprünglich indirekter Funktionsaufruf kommt nicht als »inline« in Betracht"
#: tree-inline.c:1505 tree-inline.c:1513
-#, fuzzy
msgid "%Jinlining failed in call to %qF: %s"
-msgstr "%J»inline« beim Aufruf von »%F« gescheitert: %s"
+msgstr "%J»inline« beim Aufruf von %qF gescheitert: %s"
#: tree-inline.c:1506 tree-inline.c:1514
msgid "called from here"
msgstr "von hier aufgerufen"
#: tree-inline.c:1628
-#, fuzzy
msgid "control may reach end of non-void function %qD being inlined"
-msgstr "Kontrollfluss erreicht Ende einer Nicht-void-Funktion"
+msgstr "Kontrollfluss kann Ende der Nicht-void-Funktion %qD erreichen"
#: tree-mudflap.c:857
msgid "mudflap checking not yet implemented for ARRAY_RANGE_REF"
-msgstr ""
+msgstr "Schmutzfängerprüfung noch nicht für ARRAY_RANGE_REF implementiert"
#: tree-mudflap.c:1048
#, c-format
msgid "mudflap cannot track %qs in stub function"
-msgstr ""
+msgstr "Schmutzfänger kann nicht %qs in Stub-Funktion verfolgen"
#: tree-mudflap.c:1279
#, c-format
msgid "mudflap cannot track unknown size extern %qs"
-msgstr ""
+msgstr "Schmutzfänger kann nicht externes %qs unbekannter Größe verfolgen"
#: tree-nomudflap.c:51
-#, fuzzy
msgid "mudflap: this language is not supported"
-msgstr "-pipe wird nicht unterstützt"
+msgstr "Schmutzfänger: diese Sprache wird nicht unterstützt"
#: tree-optimize.c:720
-#, fuzzy
msgid "%Jsize of return value of %qD is %u bytes"
-msgstr "%JGröße des Rückgabewertes von »%D« ist %u Bytes"
+msgstr "%JGröße des Rückgabewertes von %qD ist %u Bytes"
#: tree-optimize.c:723
-#, fuzzy
msgid "%Jsize of return value of %qD is larger than %wd bytes"
-msgstr "%JGröße des Rückgabewertes von »%D« ist größer als %wd Bytes"
+msgstr "%JGröße des Rückgabewertes von %qD ist größer als %wd Bytes"
#: tree-outof-ssa.c:610 tree-outof-ssa.c:625 tree-outof-ssa.c:639
#: tree-outof-ssa.c:661 tree-outof-ssa.c:1029 tree-outof-ssa.c:1865
#: tree-ssa-live.c:417 tree-ssa-live.c:1799
msgid "SSA corruption"
-msgstr ""
+msgstr "SSA-Beschädigung"
#: tree-outof-ssa.c:2270
#, c-format
msgid " Pending stmts not issued on PRED edge (%d, %d)\n"
-msgstr ""
+msgstr " Hängende Anweisungen auf PRED-Kante nicht ausgeführt (%d, %d)\n"
#: tree-outof-ssa.c:2276
#, c-format
msgid " Pending stmts not issued on SUCC edge (%d, %d)\n"
-msgstr ""
+msgstr " Hängende Anweisungen auf SUCC-Kante nicht ausgeführt (%d, %d)\n"
#: tree-outof-ssa.c:2283
#, c-format
msgid " Pending stmts not issued on ENTRY edge (%d, %d)\n"
-msgstr ""
+msgstr " Hängende Anweisungen auf ENTRY-Kante nicht ausgeführt (%d, %d)\n"
#: tree-outof-ssa.c:2289
#, c-format
msgid " Pending stmts not issued on EXIT edge (%d, %d)\n"
-msgstr ""
+msgstr " Hängende Anweisungen auf EXIT-Kante nicht ausgeführt (%d, %d)\n"
#: tree-profile.c:111 tree-profile.c:127 tree-profile.c:143 tree-profile.c:160
-#, fuzzy
msgid "unimplemented functionality"
-msgstr "In Anweisungsfunktion"
+msgstr "nicht implementierte Funktionalität"
#: tree-ssa-operands.c:1273
msgid "internal error"
@@ -6971,122 +6885,117 @@ msgstr "interner Fehler"
#: tree-ssa.c:113
msgid "Expected an SSA_NAME object"
-msgstr ""
+msgstr "SSA_NAME-Objekt erwartet"
#: tree-ssa.c:119
msgid "Type mismatch between an SSA_NAME and its symbol."
-msgstr ""
+msgstr "Unpassende Typen für SSA_NAME und sein Symbol."
#: tree-ssa.c:125
msgid "Found an SSA_NAME that had been released into the free pool"
-msgstr ""
+msgstr "SSA_NAME gefunden, das bereits in den Frei-Bereich geschoben wurde"
#: tree-ssa.c:131
msgid "Found a virtual definition for a GIMPLE register"
-msgstr ""
+msgstr "Virtuelle Definition für ein GIMPLE-Register gefunden"
#: tree-ssa.c:137
msgid "Found a real definition for a non-register"
-msgstr ""
+msgstr "Reale Definition für Nicht-Register gefunden"
#: tree-ssa.c:166
#, c-format
msgid "SSA_NAME created in two different blocks %i and %i"
-msgstr ""
+msgstr "SSA_NAME in zwei verschiedenen Blöcken (%i und %i) erzeugt"
#: tree-ssa.c:175
msgid "SSA_NAME_DEF_STMT is wrong"
-msgstr ""
+msgstr "SSA_NAME_DEF_STMT ist falsch"
#: tree-ssa.c:227
-#, fuzzy
msgid "Missing definition"
-msgstr "Fehlender Bezeichner"
+msgstr "Fehlende Definition"
#: tree-ssa.c:233
#, c-format
msgid "Definition in block %i does not dominate use in block %i"
-msgstr ""
+msgstr "Definition in Block %i herrscht nicht vor in Block %i"
#: tree-ssa.c:241
#, c-format
msgid "Definition in block %i follows the use"
-msgstr ""
+msgstr "Definition in Block %i folgt der Verwendung"
#: tree-ssa.c:248
msgid "SSA_NAME_OCCURS_IN_ABNORMAL_PHI should be set"
-msgstr ""
+msgstr "SSA_NAME_OCCURS_IN_ABNORMAL_PHI sollte gesetzt sein"
#: tree-ssa.c:280
msgid "Incoming edge count does not match number of PHI arguments\n"
-msgstr ""
+msgstr "Eingehende Kantenzahl passt nicht zur Anzahl der PHI-Argumente\n"
#: tree-ssa.c:293
#, c-format
msgid "PHI argument is missing for edge %d->%d\n"
-msgstr ""
+msgstr "PHI-Argument fehlt für Kante %d->%d\n"
#: tree-ssa.c:302
-#, fuzzy
msgid "PHI argument is not SSA_NAME, or invariant"
-msgstr "Argument »%d« ist keine Konstante"
+msgstr "PHI-Argument ist kein SSA_NAME, oder invariant"
#: tree-ssa.c:314
#, c-format
msgid "Wrong edge %d->%d for PHI argument\n"
-msgstr ""
+msgstr "Falsche Kante %d->%d für PHI-Argument\n"
#: tree-ssa.c:364
msgid "Non-addressable variable inside an alias set."
-msgstr ""
+msgstr "Nicht-adressierbare Variable innerhalb einer Alias-Menge"
#: tree-ssa.c:382
msgid "Addressable variable that is an alias tag but is not in any alias set."
-msgstr ""
+msgstr "Adressierbare Variable, die eine Aliasmarke ist, jedoch in keiner Aliasmenge vorkommt."
#: tree-ssa.c:392
-#, fuzzy
msgid "verify_flow_insensitive_alias_info failed."
-msgstr "verify_flow_info gescheitert"
+msgstr "verify_flow_insensitive_alias_info gescheitert."
#: tree-ssa.c:434
msgid "Dereferenced pointers should have a name or a type tag"
-msgstr ""
+msgstr "Dereferenzierte Zeiger sollten einen Namen oder eine Typenmarke haben"
#: tree-ssa.c:442
msgid "Pointers with a memory tag, should have points-to sets or point to malloc"
-msgstr ""
+msgstr "Zeiger mit Speichermarke sollten Zeigt-Auf-Menge haben oder auf malloc zeigen"
#: tree-ssa.c:450
msgid "Pointer escapes but its name tag is not call-clobbered."
-msgstr ""
+msgstr "Zeiger entweicht, aber sein Namensschild ist nicht aufrufmarkiert."
#: tree-ssa.c:459
-#, fuzzy
msgid "verify_flow_sensitive_alias_info failed."
-msgstr "verify_flow_info gescheitert"
+msgstr "verify_flow_sensitive_alias_info gescheitert."
#: tree-ssa.c:535
msgid "Alias set of a pointer's type tag should be a superset of the corresponding name tag"
-msgstr ""
+msgstr "Aliasmenge einer Zeiger-Typenmarke sollte eine Obermenge des korrespondierenden Namensschilds sein"
#: tree-ssa.c:551
msgid "Two different pointers with identical points-to sets but different name tags"
-msgstr ""
+msgstr "Zwei verschiedene Zeiger mit identischen Zeigt-Auf-Mengen, aber mit verschiedenen Namensschildern"
#: tree-ssa.c:580
-#, fuzzy
msgid "verify_name_tags failed"
-msgstr "verify_flow_info gescheitert"
+msgstr "verify_name_tags gescheitert"
#: tree-ssa.c:647
#, c-format
msgid "AUX pointer initialized for edge %d->%d\n"
-msgstr ""
+msgstr "AUX-Zeiger für Kante %d->%d initialisiert\n"
#: tree-ssa.c:672
msgid "Statement makes aliased stores, but has no V_MAY_DEFS"
-msgstr ""
+msgstr "Anweisung erzeugt Alias-Speicherzugriffe, hat aber kein V_MAY_DEFS"
#: tree-ssa.c:710
#, fuzzy
@@ -13146,23 +13055,20 @@ msgid "operands to ?: have different types"
msgstr "Operanden für ?: haben verschiedene Typen"
#: cp/call.c:3405
-#, fuzzy
msgid "enumeral mismatch in conditional expression: %qT vs %qT"
-msgstr "Aufzählungsfehler in bedingtem Ausdruck: »%T« vs. »%T«"
+msgstr "Aufzählungsfehler in bedingtem Ausdruck: %qT vs. %qT"
#: cp/call.c:3412
msgid "enumeral and non-enumeral type in conditional expression"
msgstr "Aufzählungs- und Nicht-Aufzählungstyp in bedingtem Ausdruck"
#: cp/call.c:3706
-#, fuzzy
msgid "no %<%D(int)%> declared for postfix %qs, trying prefix operator instead"
-msgstr "kein »%D(int)« für Suffix »%s« deklariert, stattdessen wird Präfixoperator versucht"
+msgstr "kein %<%D(int)%> für Suffix %qs deklariert, stattdessen wird Präfixoperator versucht"
#: cp/call.c:3759
-#, fuzzy
msgid "using synthesized %q#D for copy assignment"
-msgstr "künstlich erstelltes »%#D« für Kopierzuweisung"
+msgstr "künstlich erstelltes %q#D für Kopierzuweisung wird verwendet"
#: cp/call.c:3761
#, fuzzy
diff --git a/gcc/profile.c b/gcc/profile.c
index b1dc941b39e..25d14713408 100644
--- a/gcc/profile.c
+++ b/gcc/profile.c
@@ -224,6 +224,7 @@ instrument_values (histogram_values values)
abort ();
}
}
+ VEC_free (histogram_value, values);
}
@@ -641,7 +642,7 @@ compute_branch_probabilities (void)
}
/* Load value histograms values whose description is stored in VALUES array
- from .da file. */
+ from .gcda file. */
static void
compute_value_histograms (histogram_values values)
@@ -688,21 +689,32 @@ compute_value_histograms (histogram_values values)
hist = VEC_index (histogram_value, values, i);
t = (int) hist->type;
- /* FIXME: make this work for trees. */
+ aact_count = act_count[t];
+ act_count[t] += hist->n_counters;
+
if (!ir_type ())
{
- aact_count = act_count[t];
- act_count[t] += hist->n_counters;
for (j = hist->n_counters; j > 0; j--)
hist_list = alloc_EXPR_LIST (0, GEN_INT (aact_count[j - 1]),
hist_list);
- hist_list = alloc_EXPR_LIST (0,
- copy_rtx ((rtx) hist->value), hist_list);
+ hist_list = alloc_EXPR_LIST (0,
+ copy_rtx (hist->hvalue.rtl.value), hist_list);
hist_list = alloc_EXPR_LIST (0, GEN_INT (hist->type), hist_list);
- REG_NOTES ((rtx) hist->insn) =
- alloc_EXPR_LIST (REG_VALUE_PROFILE, hist_list,
- REG_NOTES ((rtx) hist->insn));
+ REG_NOTES (hist->hvalue.rtl.insn) =
+ alloc_EXPR_LIST (REG_VALUE_PROFILE, hist_list,
+ REG_NOTES (hist->hvalue.rtl.insn));
}
+ else
+ {
+ tree stmt = hist->hvalue.tree.stmt;
+ stmt_ann_t ann = get_stmt_ann (stmt);
+ hist->hvalue.tree.next = ann->histograms;
+ ann->histograms = hist;
+ hist->hvalue.tree.counters =
+ xmalloc (sizeof (gcov_type) * hist->n_counters);
+ for (j = 0; j < hist->n_counters; j++)
+ hist->hvalue.tree.counters[j] = aact_count[j];
+ }
}
for (t = 0; t < GCOV_N_VALUE_COUNTERS; t++)
diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c
index e92e73cbf54..6f58341ba27 100644
--- a/gcc/reg-stack.c
+++ b/gcc/reg-stack.c
@@ -1672,6 +1672,27 @@ subst_stack_regs_pat (rtx insn, stack regstack, rtx pat)
case UNSPEC:
switch (XINT (pat_src, 1))
{
+ case UNSPEC_FIST:
+ /* These insns only operate on the top of the stack. */
+
+ src1 = get_true_reg (&XVECEXP (pat_src, 0, 0));
+ emit_swap_insn (insn, regstack, *src1);
+
+ src1_note = find_regno_note (insn, REG_DEAD, REGNO (*src1));
+
+ if (STACK_REG_P (*dest))
+ replace_reg (dest, FIRST_STACK_REG);
+
+ if (src1_note)
+ {
+ replace_reg (&XEXP (src1_note, 0), FIRST_STACK_REG);
+ regstack->top--;
+ CLEAR_HARD_REG_BIT (regstack->reg_set, REGNO (*src1));
+ }
+
+ replace_reg (src1, FIRST_STACK_REG);
+ break;
+
case UNSPEC_SIN:
case UNSPEC_COS:
case UNSPEC_FRNDINT:
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 31407b3d96f..5e1ab1a27cc 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -268,7 +268,7 @@ enum insn_code reload_out_optab[NUM_MACHINE_MODES];
/* This obstack is used for allocation of rtl during register elimination.
The allocated storage can be freed once find_reloads has processed the
insn. */
-struct obstack reload_obstack;
+static struct obstack reload_obstack;
/* Points to the beginning of the reload_obstack. All insn_chain structures
are allocated first. */
@@ -1174,6 +1174,19 @@ reload (rtx first, int global)
replace_pseudos_in (& XEXP (PATTERN (insn), 0),
VOIDmode, PATTERN (insn));
+ /* Discard obvious no-ops, even without -O. This optimization
+ is fast and doesn't interfere with debugging. */
+ if (NONJUMP_INSN_P (insn)
+ && GET_CODE (PATTERN (insn)) == SET
+ && REG_P (SET_SRC (PATTERN (insn)))
+ && REG_P (SET_DEST (PATTERN (insn)))
+ && (REGNO (SET_SRC (PATTERN (insn)))
+ == REGNO (SET_DEST (PATTERN (insn)))))
+ {
+ delete_insn (insn);
+ continue;
+ }
+
pnote = &REG_NOTES (insn);
while (*pnote != 0)
{
diff --git a/gcc/reorg.c b/gcc/reorg.c
index 09c8ea583c5..6d0db45a37d 100644
--- a/gcc/reorg.c
+++ b/gcc/reorg.c
@@ -3582,17 +3582,6 @@ dbr_schedule (rtx first, FILE *file)
{
rtx insn, next, epilogue_insn = 0;
int i;
-#if 0
- int old_flag_no_peephole = flag_no_peephole;
-
- /* Execute `final' once in prescan mode to delete any insns that won't be
- used. Don't let final try to do any peephole optimization--it will
- ruin dataflow information for this pass. */
-
- flag_no_peephole = 1;
- final (first, 0, NO_DEBUG, 1, 1);
- flag_no_peephole = old_flag_no_peephole;
-#endif
/* If the current function has no insns other than the prologue and
epilogue, then do not try to fill any delay slots. */
diff --git a/gcc/rtl-profile.c b/gcc/rtl-profile.c
index 3439f472b7b..d07d564b41e 100644
--- a/gcc/rtl-profile.c
+++ b/gcc/rtl-profile.c
@@ -1,6 +1,6 @@
/* Calculate branch probabilities, and basic block execution counts.
Copyright (C) 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ 2000, 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
Contributed by James E. Wilson, UC Berkeley/Cygnus Support;
based on some ideas from Dain Samples of UC Berkeley.
Further mangling by Bob Manson, Cygnus Support.
@@ -23,30 +23,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
/* Generate basic block profile instrumentation and auxiliary files.
- Profile generation is optimized, so that not all arcs in the basic
- block graph need instrumenting. First, the BB graph is closed with
- one entry (function start), and one exit (function exit). Any
- ABNORMAL_EDGE cannot be instrumented (because there is no control
- path to place the code). We close the graph by inserting fake
- EDGE_FAKE edges to the EXIT_BLOCK, from the sources of abnormal
- edges that do not go to the exit_block. We ignore such abnormal
- edges. Naturally these fake edges are never directly traversed,
- and so *cannot* be directly instrumented. Some other graph
- massaging is done. To optimize the instrumentation we generate the
- BB minimal span tree, only edges that are not on the span tree
- (plus the entry point) need instrumenting. From that information
- all other edge counts can be deduced. By construction all fake
- edges must be on the spanning tree. We also attempt to place
- EDGE_CRITICAL edges on the spanning tree.
-
- The auxiliary file generated is <dumpbase>.bbg. The format is
- described in full in gcov-io.h. */
-
-/* ??? Register allocation should use basic block execution counts to
- give preference to the most commonly executed blocks. */
-
-/* ??? Should calculate branch probabilities before instrumenting code, since
- then we can use arc counts to help decide which arcs to instrument. */
+ RTL-based version. See profile.c for overview. */
#include "config.h"
#include "system.h"
@@ -114,33 +91,33 @@ rtl_gen_interval_profiler (histogram_value value, unsigned tag, unsigned base)
rtx less_label = gen_label_rtx ();
rtx end_of_code_label = gen_label_rtx ();
int per_counter = gcov_size / BITS_PER_UNIT;
- edge e = split_block (BLOCK_FOR_INSN ((rtx)value->insn),
- PREV_INSN ((rtx)value->insn));
+ edge e = split_block (BLOCK_FOR_INSN (value->hvalue.rtl.insn),
+ PREV_INSN (value->hvalue.rtl.insn));
start_sequence ();
- if (value->seq)
- emit_insn (value->seq);
+ if (value->hvalue.rtl.seq)
+ emit_insn (value->hvalue.rtl.seq);
mr = gen_reg_rtx (Pmode);
tmp = rtl_coverage_counter_ref (tag, base);
tmp = force_reg (Pmode, XEXP (tmp, 0));
- val = expand_simple_binop (value->mode, MINUS,
- copy_rtx (value->value),
+ val = expand_simple_binop (value->hvalue.rtl.mode, MINUS,
+ copy_rtx (value->hvalue.rtl.value),
GEN_INT (value->hdata.intvl.int_start),
NULL_RTX, 0, OPTAB_WIDEN);
- if (value->hdata.intvl.may_be_more)
do_compare_rtx_and_jump (copy_rtx (val), GEN_INT (value->hdata.intvl.steps),
- GE, 0, value->mode, NULL_RTX, NULL_RTX, more_label);
- if (value->hdata.intvl.may_be_less)
- do_compare_rtx_and_jump (copy_rtx (val), const0_rtx, LT, 0, value->mode,
+ GE, 0, value->hvalue.rtl.mode, NULL_RTX, NULL_RTX,
+ more_label);
+ do_compare_rtx_and_jump (copy_rtx (val), const0_rtx, LT, 0,
+ value->hvalue.rtl.mode,
NULL_RTX, NULL_RTX, less_label);
/* We are in range. */
- tmp1 = expand_simple_binop (value->mode, MULT,
+ tmp1 = expand_simple_binop (value->hvalue.rtl.mode, MULT,
copy_rtx (val), GEN_INT (per_counter),
NULL_RTX, 0, OPTAB_WIDEN);
tmp1 = expand_simple_binop (Pmode, PLUS, copy_rtx (tmp), tmp1, mr,
@@ -148,43 +125,27 @@ rtl_gen_interval_profiler (histogram_value value, unsigned tag, unsigned base)
if (tmp1 != mr)
emit_move_insn (copy_rtx (mr), tmp1);
- if (value->hdata.intvl.may_be_more
- || value->hdata.intvl.may_be_less)
- {
emit_jump_insn (gen_jump (end_of_code_label));
emit_barrier ();
- }
/* Above the interval. */
- if (value->hdata.intvl.may_be_more)
- {
emit_label (more_label);
tmp1 = expand_simple_binop (Pmode, PLUS, copy_rtx (tmp),
GEN_INT (per_counter * value->hdata.intvl.steps),
mr, 0, OPTAB_WIDEN);
if (tmp1 != mr)
emit_move_insn (copy_rtx (mr), tmp1);
- if (value->hdata.intvl.may_be_less)
- {
emit_jump_insn (gen_jump (end_of_code_label));
emit_barrier ();
- }
- }
/* Below the interval. */
- if (value->hdata.intvl.may_be_less)
- {
emit_label (less_label);
tmp1 = expand_simple_binop (Pmode, PLUS, copy_rtx (tmp),
- GEN_INT (per_counter * (value->hdata.intvl.steps
- + (value->hdata.intvl.may_be_more ? 1 : 0))),
+ GEN_INT (per_counter * (value->hdata.intvl.steps +1)),
mr, 0, OPTAB_WIDEN);
if (tmp1 != mr)
emit_move_insn (copy_rtx (mr), tmp1);
- }
- if (value->hdata.intvl.may_be_more
- || value->hdata.intvl.may_be_less)
emit_label (end_of_code_label);
mem_ref = validize_mem (gen_rtx_MEM (mode, mr));
@@ -215,32 +176,32 @@ rtl_gen_pow2_profiler (histogram_value value, unsigned tag, unsigned base)
rtx end_of_code_label = gen_label_rtx ();
rtx loop_label = gen_label_rtx ();
int per_counter = gcov_size / BITS_PER_UNIT;
- edge e = split_block (BLOCK_FOR_INSN ((rtx)value->insn),
- PREV_INSN ((rtx)value->insn));
+ edge e = split_block (BLOCK_FOR_INSN (value->hvalue.rtl.insn),
+ PREV_INSN (value->hvalue.rtl.insn));
start_sequence ();
- if (value->seq)
- emit_insn (value->seq);
+ if (value->hvalue.rtl.seq)
+ emit_insn (value->hvalue.rtl.seq);
mr = gen_reg_rtx (Pmode);
tmp = rtl_coverage_counter_ref (tag, base);
tmp = force_reg (Pmode, XEXP (tmp, 0));
emit_move_insn (mr, tmp);
- uval = gen_reg_rtx (value->mode);
- emit_move_insn (uval, copy_rtx (value->value));
+ uval = gen_reg_rtx (value->hvalue.rtl.mode);
+ emit_move_insn (uval, copy_rtx (value->hvalue.rtl.value));
/* Check for non-power of 2. */
if (value->hdata.pow2.may_be_other)
{
- do_compare_rtx_and_jump (copy_rtx (uval), const0_rtx, LE, 0, value->mode,
+ do_compare_rtx_and_jump (copy_rtx (uval), const0_rtx, LE, 0, value->hvalue.rtl.mode,
NULL_RTX, NULL_RTX, end_of_code_label);
- tmp = expand_simple_binop (value->mode, PLUS, copy_rtx (uval),
+ tmp = expand_simple_binop (value->hvalue.rtl.mode, PLUS, copy_rtx (uval),
constm1_rtx, NULL_RTX, 0, OPTAB_WIDEN);
- tmp = expand_simple_binop (value->mode, AND, copy_rtx (uval), tmp,
+ tmp = expand_simple_binop (value->hvalue.rtl.mode, AND, copy_rtx (uval), tmp,
NULL_RTX, 0, OPTAB_WIDEN);
- do_compare_rtx_and_jump (tmp, const0_rtx, NE, 0, value->mode, NULL_RTX,
+ do_compare_rtx_and_jump (tmp, const0_rtx, NE, 0, value->hvalue.rtl.mode, NULL_RTX,
NULL_RTX, end_of_code_label);
}
@@ -251,12 +212,12 @@ rtl_gen_pow2_profiler (histogram_value value, unsigned tag, unsigned base)
if (tmp != mr)
emit_move_insn (copy_rtx (mr), tmp);
- tmp = expand_simple_binop (value->mode, ASHIFTRT, copy_rtx (uval), const1_rtx,
+ tmp = expand_simple_binop (value->hvalue.rtl.mode, ASHIFTRT, copy_rtx (uval), const1_rtx,
uval, 0, OPTAB_WIDEN);
if (tmp != uval)
emit_move_insn (copy_rtx (uval), tmp);
- do_compare_rtx_and_jump (copy_rtx (uval), const0_rtx, NE, 0, value->mode,
+ do_compare_rtx_and_jump (copy_rtx (uval), const0_rtx, NE, 0, value->hvalue.rtl.mode,
NULL_RTX, NULL_RTX, loop_label);
/* Increase the counter. */
@@ -295,8 +256,8 @@ rtl_gen_one_value_profiler_no_edge_manipulation (histogram_value value,
start_sequence ();
- if (value->seq)
- emit_insn (value->seq);
+ if (value->hvalue.rtl.seq)
+ emit_insn (value->hvalue.rtl.seq);
stored_value_ref = rtl_coverage_counter_ref (tag, base);
counter_ref = rtl_coverage_counter_ref (tag, base + 1);
@@ -306,7 +267,7 @@ rtl_gen_one_value_profiler_no_edge_manipulation (histogram_value value,
all = validize_mem (all_ref);
uval = gen_reg_rtx (mode);
- convert_move (uval, copy_rtx (value->value), 0);
+ convert_move (uval, copy_rtx (value->hvalue.rtl.value), 0);
/* Check if the stored value matches. */
do_compare_rtx_and_jump (copy_rtx (uval), copy_rtx (stored_value), EQ,
@@ -362,8 +323,8 @@ rtl_gen_one_value_profiler_no_edge_manipulation (histogram_value value,
static void
rtl_gen_one_value_profiler (histogram_value value, unsigned tag, unsigned base)
{
- edge e = split_block (BLOCK_FOR_INSN ((rtx)value->insn),
- PREV_INSN ((rtx)value->insn));
+ edge e = split_block (BLOCK_FOR_INSN (value->hvalue.rtl.insn),
+ PREV_INSN (value->hvalue.rtl.insn));
rtx sequence = rtl_gen_one_value_profiler_no_edge_manipulation (value,
tag, base);
rebuild_jump_labels (sequence);
@@ -383,28 +344,28 @@ rtl_gen_const_delta_profiler (histogram_value value, unsigned tag, unsigned base
enum machine_mode mode = mode_for_size (gcov_size, MODE_INT, 0);
rtx stored_value_ref, stored_value, tmp, uval;
rtx sequence;
- edge e = split_block (BLOCK_FOR_INSN ((rtx)value->insn),
- PREV_INSN ((rtx)value->insn));
+ edge e = split_block (BLOCK_FOR_INSN (value->hvalue.rtl.insn),
+ PREV_INSN (value->hvalue.rtl.insn));
start_sequence ();
- if (value->seq)
- emit_insn (value->seq);
+ if (value->hvalue.rtl.seq)
+ emit_insn (value->hvalue.rtl.seq);
stored_value_ref = rtl_coverage_counter_ref (tag, base);
stored_value = validize_mem (stored_value_ref);
uval = gen_reg_rtx (mode);
- convert_move (uval, copy_rtx (value->value), 0);
+ convert_move (uval, copy_rtx (value->hvalue.rtl.value), 0);
tmp = expand_simple_binop (mode, MINUS,
copy_rtx (uval), copy_rtx (stored_value),
NULL_RTX, 0, OPTAB_WIDEN);
one_value_delta = ggc_alloc (sizeof (*one_value_delta));
- one_value_delta->value = tmp;
- one_value_delta->mode = mode;
- one_value_delta->seq = NULL_RTX;
- one_value_delta->insn = value->insn;
+ one_value_delta->hvalue.rtl.value = tmp;
+ one_value_delta->hvalue.rtl.mode = mode;
+ one_value_delta->hvalue.rtl.seq = NULL_RTX;
+ one_value_delta->hvalue.rtl.insn = value->hvalue.rtl.insn;
one_value_delta->type = HIST_TYPE_SINGLE_VALUE;
emit_insn (rtl_gen_one_value_profiler_no_edge_manipulation (one_value_delta,
tag, base + 1));
diff --git a/gcc/rtl.h b/gcc/rtl.h
index 0d507ccba77..ae31db49be7 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -1942,7 +1942,6 @@ extern void init_emit (void);
extern void init_emit_once (int);
extern void push_topmost_sequence (void);
extern void pop_topmost_sequence (void);
-extern void reverse_comparison (rtx);
extern void set_new_first_and_last_insn (rtx, rtx);
extern void unshare_all_rtl (void);
extern void unshare_all_rtl_again (rtx);
diff --git a/gcc/rtlhooks-def.h b/gcc/rtlhooks-def.h
index cd9cd52d0f0..32d0292e6ae 100644
--- a/gcc/rtlhooks-def.h
+++ b/gcc/rtlhooks-def.h
@@ -1,5 +1,5 @@
/* Default macros to initialize an rtl_hooks data structure.
- Copyright 2004 Free Software Foundation, Inc.
+ Copyright 2004, 2005 Free Software Foundation, Inc.
This file is part of GCC.
diff --git a/gcc/rtlhooks.c b/gcc/rtlhooks.c
index 5303af54716..dbe959308c0 100644
--- a/gcc/rtlhooks.c
+++ b/gcc/rtlhooks.c
@@ -1,5 +1,5 @@
/* Generic hooks for the RTL middle-end.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GCC.
diff --git a/gcc/sdbout.c b/gcc/sdbout.c
index 91a7a2cc256..fb098474d19 100644
--- a/gcc/sdbout.c
+++ b/gcc/sdbout.c
@@ -1,6 +1,6 @@
/* Output sdb-format symbol table information from GNU compiler.
Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GCC.
@@ -335,7 +335,8 @@ const struct gcc_debug_hooks sdb_debug_hooks =
debug_nothing_tree, /* outlining_inline_function */
sdbout_label, /* label */
debug_nothing_int, /* handle_pch */
- debug_nothing_rtx /* var_location */
+ debug_nothing_rtx, /* var_location */
+ 0 /* start_end_main_source_file */
};
/* Return a unique string to name an anonymous type. */
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index a7033315e98..865d6f933bb 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -1257,44 +1257,67 @@ simplify_binary_operation_1 (enum rtx_code code, enum machine_mode mode,
if (! FLOAT_MODE_P (mode))
{
- HOST_WIDE_INT coeff0 = 1, coeff1 = 1;
+ HOST_WIDE_INT coeff0h = 0, coeff1h = 0;
+ unsigned HOST_WIDE_INT coeff0l = 1, coeff1l = 1;
rtx lhs = op0, rhs = op1;
if (GET_CODE (lhs) == NEG)
- coeff0 = -1, lhs = XEXP (lhs, 0);
+ {
+ coeff0l = -1;
+ coeff0h = -1;
+ lhs = XEXP (lhs, 0);
+ }
else if (GET_CODE (lhs) == MULT
&& GET_CODE (XEXP (lhs, 1)) == CONST_INT)
- coeff0 = INTVAL (XEXP (lhs, 1)), lhs = XEXP (lhs, 0);
+ {
+ coeff0l = INTVAL (XEXP (lhs, 1));
+ coeff0h = INTVAL (XEXP (lhs, 1)) < 0 ? -1 : 0;
+ lhs = XEXP (lhs, 0);
+ }
else if (GET_CODE (lhs) == ASHIFT
&& GET_CODE (XEXP (lhs, 1)) == CONST_INT
&& INTVAL (XEXP (lhs, 1)) >= 0
&& INTVAL (XEXP (lhs, 1)) < HOST_BITS_PER_WIDE_INT)
{
- coeff0 = ((HOST_WIDE_INT) 1) << INTVAL (XEXP (lhs, 1));
+ coeff0l = ((HOST_WIDE_INT) 1) << INTVAL (XEXP (lhs, 1));
+ coeff0h = 0;
lhs = XEXP (lhs, 0);
}
if (GET_CODE (rhs) == NEG)
- coeff1 = -1, rhs = XEXP (rhs, 0);
+ {
+ coeff1l = -1;
+ coeff1h = -1;
+ rhs = XEXP (rhs, 0);
+ }
else if (GET_CODE (rhs) == MULT
&& GET_CODE (XEXP (rhs, 1)) == CONST_INT)
{
- coeff1 = INTVAL (XEXP (rhs, 1)), rhs = XEXP (rhs, 0);
+ coeff1l = INTVAL (XEXP (rhs, 1));
+ coeff1h = INTVAL (XEXP (rhs, 1)) < 0 ? -1 : 0;
+ rhs = XEXP (rhs, 0);
}
else if (GET_CODE (rhs) == ASHIFT
&& GET_CODE (XEXP (rhs, 1)) == CONST_INT
&& INTVAL (XEXP (rhs, 1)) >= 0
&& INTVAL (XEXP (rhs, 1)) < HOST_BITS_PER_WIDE_INT)
{
- coeff1 = ((HOST_WIDE_INT) 1) << INTVAL (XEXP (rhs, 1));
+ coeff1l = ((HOST_WIDE_INT) 1) << INTVAL (XEXP (rhs, 1));
+ coeff1h = 0;
rhs = XEXP (rhs, 0);
}
if (rtx_equal_p (lhs, rhs))
{
rtx orig = gen_rtx_PLUS (mode, op0, op1);
- tem = simplify_gen_binary (MULT, mode, lhs,
- GEN_INT (coeff0 + coeff1));
+ rtx coeff;
+ unsigned HOST_WIDE_INT l;
+ HOST_WIDE_INT h;
+
+ add_double (coeff0l, coeff0h, coeff1l, coeff1h, &l, &h);
+ coeff = immed_double_const (l, h, mode);
+
+ tem = simplify_gen_binary (MULT, mode, lhs, coeff);
return rtx_cost (tem, SET) <= rtx_cost (orig, SET)
? tem : 0;
}
@@ -1405,46 +1428,67 @@ simplify_binary_operation_1 (enum rtx_code code, enum machine_mode mode,
if (! FLOAT_MODE_P (mode))
{
- HOST_WIDE_INT coeff0 = 1, coeff1 = 1;
+ HOST_WIDE_INT coeff0h = 0, negcoeff1h = -1;
+ unsigned HOST_WIDE_INT coeff0l = 1, negcoeff1l = -1;
rtx lhs = op0, rhs = op1;
if (GET_CODE (lhs) == NEG)
- coeff0 = -1, lhs = XEXP (lhs, 0);
+ {
+ coeff0l = -1;
+ coeff0h = -1;
+ lhs = XEXP (lhs, 0);
+ }
else if (GET_CODE (lhs) == MULT
&& GET_CODE (XEXP (lhs, 1)) == CONST_INT)
{
- coeff0 = INTVAL (XEXP (lhs, 1)), lhs = XEXP (lhs, 0);
+ coeff0l = INTVAL (XEXP (lhs, 1));
+ coeff0h = INTVAL (XEXP (lhs, 1)) < 0 ? -1 : 0;
+ lhs = XEXP (lhs, 0);
}
else if (GET_CODE (lhs) == ASHIFT
&& GET_CODE (XEXP (lhs, 1)) == CONST_INT
&& INTVAL (XEXP (lhs, 1)) >= 0
&& INTVAL (XEXP (lhs, 1)) < HOST_BITS_PER_WIDE_INT)
{
- coeff0 = ((HOST_WIDE_INT) 1) << INTVAL (XEXP (lhs, 1));
+ coeff0l = ((HOST_WIDE_INT) 1) << INTVAL (XEXP (lhs, 1));
+ coeff0h = 0;
lhs = XEXP (lhs, 0);
}
if (GET_CODE (rhs) == NEG)
- coeff1 = - 1, rhs = XEXP (rhs, 0);
+ {
+ negcoeff1l = 1;
+ negcoeff1h = 0;
+ rhs = XEXP (rhs, 0);
+ }
else if (GET_CODE (rhs) == MULT
&& GET_CODE (XEXP (rhs, 1)) == CONST_INT)
{
- coeff1 = INTVAL (XEXP (rhs, 1)), rhs = XEXP (rhs, 0);
+ negcoeff1l = -INTVAL (XEXP (rhs, 1));
+ negcoeff1h = INTVAL (XEXP (rhs, 1)) <= 0 ? 0 : -1;
+ rhs = XEXP (rhs, 0);
}
else if (GET_CODE (rhs) == ASHIFT
&& GET_CODE (XEXP (rhs, 1)) == CONST_INT
&& INTVAL (XEXP (rhs, 1)) >= 0
&& INTVAL (XEXP (rhs, 1)) < HOST_BITS_PER_WIDE_INT)
{
- coeff1 = ((HOST_WIDE_INT) 1) << INTVAL (XEXP (rhs, 1));
+ negcoeff1l = -(((HOST_WIDE_INT) 1) << INTVAL (XEXP (rhs, 1)));
+ negcoeff1h = -1;
rhs = XEXP (rhs, 0);
}
if (rtx_equal_p (lhs, rhs))
{
rtx orig = gen_rtx_MINUS (mode, op0, op1);
- tem = simplify_gen_binary (MULT, mode, lhs,
- GEN_INT (coeff0 - coeff1));
+ rtx coeff;
+ unsigned HOST_WIDE_INT l;
+ HOST_WIDE_INT h;
+
+ add_double (coeff0l, coeff0h, negcoeff1l, negcoeff1h, &l, &h);
+ coeff = immed_double_const (l, h, mode);
+
+ tem = simplify_gen_binary (MULT, mode, lhs, coeff);
return rtx_cost (tem, SET) <= rtx_cost (orig, SET)
? tem : 0;
}
@@ -1531,6 +1575,16 @@ simplify_binary_operation_1 (enum rtx_code code, enum machine_mode mode,
|| val != HOST_BITS_PER_WIDE_INT - 1))
return simplify_gen_binary (ASHIFT, mode, op0, GEN_INT (val));
+ /* Likewise for multipliers wider than a word. */
+ else if (GET_CODE (trueop1) == CONST_DOUBLE
+ && (GET_MODE (trueop1) == VOIDmode
+ || GET_MODE_CLASS (GET_MODE (trueop1)) == MODE_INT)
+ && GET_MODE (op0) == mode
+ && CONST_DOUBLE_LOW (trueop1) == 0
+ && (val = exact_log2 (CONST_DOUBLE_HIGH (trueop1))) >= 0)
+ return simplify_gen_binary (ASHIFT, mode, op0,
+ GEN_INT (val + HOST_BITS_PER_WIDE_INT));
+
/* x*2 is x+x and x*(-1) is -x */
if (GET_CODE (trueop1) == CONST_DOUBLE
&& GET_MODE_CLASS (GET_MODE (trueop1)) == MODE_FLOAT
diff --git a/gcc/stmt.c b/gcc/stmt.c
index 9a1df90ef22..2e292028bdb 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -31,6 +31,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "tm.h"
#include "rtl.h"
+#include "hard-reg-set.h"
#include "tree.h"
#include "tm_p.h"
#include "flags.h"
@@ -39,7 +40,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "insn-config.h"
#include "expr.h"
#include "libfuncs.h"
-#include "hard-reg-set.h"
#include "recog.h"
#include "machmode.h"
#include "toplev.h"
@@ -558,15 +558,12 @@ parse_input_constraint (const char **constraint_p, int input_num,
return true;
}
-/* Check for overlap between registers marked in CLOBBERED_REGS and
- anything inappropriate in DECL. Emit error and return TRUE for error,
- FALSE for ok. */
+/* Return true iff there's an overlap between REGS and DECL, where DECL
+ can be an asm-declared register. */
-static bool
-decl_conflicts_with_clobbers_p (tree decl, const HARD_REG_SET clobbered_regs)
+bool
+decl_overlaps_hard_reg_set_p (tree decl, const HARD_REG_SET regs)
{
- /* Conflicts between asm-declared register variables and the clobber
- list are not allowed. */
if ((TREE_CODE (decl) == VAR_DECL || TREE_CODE (decl) == PARM_DECL)
&& DECL_REGISTER (decl)
&& REG_P (DECL_RTL (decl))
@@ -579,18 +576,34 @@ decl_conflicts_with_clobbers_p (tree decl, const HARD_REG_SET clobbered_regs)
regno < (REGNO (reg)
+ hard_regno_nregs[REGNO (reg)][GET_MODE (reg)]);
regno++)
- if (TEST_HARD_REG_BIT (clobbered_regs, regno))
- {
- error ("asm-specifier for variable %qs conflicts with "
- "asm clobber list",
- IDENTIFIER_POINTER (DECL_NAME (decl)));
-
- /* Reset registerness to stop multiple errors emitted for a
- single variable. */
- DECL_REGISTER (decl) = 0;
- return true;
- }
+ if (TEST_HARD_REG_BIT (regs, regno))
+ return true;
+ }
+
+ return false;
+}
+
+
+/* Check for overlap between registers marked in CLOBBERED_REGS and
+ anything inappropriate in DECL. Emit error and return TRUE for error,
+ FALSE for ok. */
+
+static bool
+decl_conflicts_with_clobbers_p (tree decl, const HARD_REG_SET clobbered_regs)
+{
+ /* Conflicts between asm-declared register variables and the clobber
+ list are not allowed. */
+ if (decl_overlaps_hard_reg_set_p (decl, clobbered_regs))
+ {
+ error ("asm-specifier for variable %qs conflicts with asm clobber list",
+ IDENTIFIER_POINTER (DECL_NAME (decl)));
+
+ /* Reset registerness to stop multiple errors emitted for a single
+ variable. */
+ DECL_REGISTER (decl) = 0;
+ return true;
}
+
return false;
}
@@ -656,7 +669,7 @@ expand_asm_operands (tree string, tree outputs, tree inputs,
Case in point is when the i386 backend moved from cc0 to a hard reg --
maintaining source-level compatibility means automatically clobbering
the flags register. */
- clobbers = targetm.md_asm_clobbers (clobbers);
+ clobbers = targetm.md_asm_clobbers (outputs, inputs, clobbers);
/* Count the number of meaningful clobbered registers, ignoring what
we would ignore later. */
diff --git a/gcc/system.h b/gcc/system.h
index d45e56afb33..f285e87674c 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -670,7 +670,7 @@ extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS \
LANG_HOOKS_PUSHLEVEL LANG_HOOKS_SET_BLOCK \
LANG_HOOKS_MAYBE_BUILD_CLEANUP LANG_HOOKS_UPDATE_DECL_AFTER_SAVING \
- LANG_HOOKS_POPLEVEL
+ LANG_HOOKS_POPLEVEL LANG_HOOKS_TRUTHVALUE_CONVERSION
/* Libiberty macros that are no longer used in GCC. */
#undef ANSI_PROTOTYPES
diff --git a/gcc/target-def.h b/gcc/target-def.h
index bb989f94345..6c9b4758a70 100644
--- a/gcc/target-def.h
+++ b/gcc/target-def.h
@@ -379,7 +379,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define TARGET_BUILTIN_SETJMP_FRAME_VALUE default_builtin_setjmp_frame_value
-#define TARGET_MD_ASM_CLOBBERS hook_tree_tree_identity
+#define TARGET_MD_ASM_CLOBBERS hook_tree_tree_tree_tree_3rd_identity
#define TARGET_DWARF_CALLING_CONVENTION hook_int_tree_0
diff --git a/gcc/target.h b/gcc/target.h
index 152cb7d3584..bb914da7037 100644
--- a/gcc/target.h
+++ b/gcc/target.h
@@ -487,8 +487,8 @@ struct gcc_target
rtx (* builtin_setjmp_frame_value) (void);
/* This target hook should add STRING_CST trees for any hard regs
- the port wishes to automatically clobber for all asms. */
- tree (* md_asm_clobbers) (tree);
+ the port wishes to automatically clobber for an asm. */
+ tree (* md_asm_clobbers) (tree, tree, tree);
/* This target hook allows the backend to specify a calling convention
in the debug information. This function actually returns an
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 0a73ba3e4b7..7c7534420d7 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,213 @@
+2005-03-26 Steven G. Kargl <kargls@comcast.net>
+
+ * gfortran.dg/promotion.f90: New test.
+
+2005-03-29 Alexandre Oliva <aoliva@redhat.com>
+
+ PR middle-end/20491
+ * gcc.dg/torture/asm-subreg-1.c: New test.
+
+2005-03-29 Joseph S. Myers <joseph@codesourcery.com>
+
+ PR c/20672
+ * gcc.dg/pr20672-1.c: New test.
+
+2005-03-29 Dorit Naishlos <dorit@il.ibm.com>
+
+ * gfortran.dg/vect: New directory.
+ * gfortran.dg/vect/vect.exp: New.
+ * gfortran.dg/vect/vect-1.f90: New test.
+ * gfortran.dg/vect/vect-2.f90: New test.
+ * gfortran.dg/vect/vect-3.f90: New test.
+ * gfortran.dg/vect/vect-4.f90: New test.
+ * gfortran.dg/vect/vect-5.f90: New test.
+
+2005-03-29 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/20622
+ * gcc.dg/alias-7.c: New test.
+
+2005-03-29 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ * gcc.dg/sparc-reg-1.c: New test.
+
+2005-03-28 Steve Ellcey <sje@cup.hp.com>
+
+ PR target/19890
+ * gcc.dg/20020219-1.c: Skip on IA64 HP-UX in ILP32 mode.
+
+2005-03-29 Dale Ranta <dir@lanl.gov>
+ Francois-Xavier Coudert <coudert@clipper.ens.fr>
+
+ PR libfortran/20163
+ * gfortran.dg/pr20163-2.f: New test.
+
+2005-03-28 Jan Hubicka <jh@suse.cz>
+
+ PR middle-end/20635
+ * compile/gcc.c-torture/compile/20050328-1.c: New testcase made
+ by Jakub Jelinek.
+
+2005-03-27 Dorit Naishlos <dorit@il.ibm.com>
+
+ PR tree-optimization/20626
+ * gcc.dg/vect/vect-80.c: Add xfail for no_align targets.
+ * gcc.dg/vect/vect-96.c: Add xfail for no_align targets.
+
+2005-03-26 Steven G. Kargl <kargls@comcast.net>
+
+ * gfortran.dg/underflow.f90: New test.
+ * gfortran.dg/g77/20030326-1.f: Fix illegal code.
+
+2005-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * gcc.dg/nonnull-3.c: Also test __builtin_strndup.
+
+2005-03-25 Mark Mitchell <mark@codesourcery.com>
+
+ * lib/g++.exp (g++_link_flags): Use gcc-set-multilib-library-path.
+ (g++_init): Make sure that CXXFLAGS is set.
+ * lib/gcc-defs.exp (gcc-set-multilib-library-path): New function.
+ * lib/gcc-dg.exp: Use gcc-set-multilib-library-path.
+ * lib/gfortran.exp (gfortran_link_flags): Likewise.
+ * lib/objc.exp (objc_init): Likewise.
+ * lib/treelang.exp (treelang_init): Likewise.
+
+2005-03-25 Pat Haugen <pthaugen@us.ibm.com>
+
+ PR tree-optimization/20470
+ * gcc.dg/tree-ssa/pr20470.c: New test.
+
+2005-03-25 Geoffrey Keating <geoffk@apple.com>
+
+ * gcc.dg/ppc-stfiwx.c: New.
+
+2005-03-25 Steve Ellcey <sje@cup.hp.com>
+
+ PR target/19888
+ * g++.old-deja/g++.eh/badalloc1.C: increase arena_size on hpux.
+
+2005-03-25 Zdenek Dvorak <dvorakz@suse.cz>
+
+ * gcc.dg/20050325-1.c: Fix a typo.
+
+2005-03-25 Francois-Xavier Coudert <coudert@clipper.ens.fr>
+
+ PR libfortran/19678
+ PR libfortran/19679
+ * gfortran.dg/dos_eol.f: New test.
+
+2005-03-25 Zdenek Dvorak <dvorakz@suse.cz>
+
+ PR rtl-optimization/20249
+ * gcc.dg/20050325-1.c: New test.
+
+2005-03-25 Francois-Xavier Coudert <coudert@clipper.ens.fr>
+
+ PR libfortran/15332
+ * gfortran.dg/pr15332.f: New test.
+
+2005-03-24 Dale Johannesen <dalej@apple.com>
+
+ * gcc.dg/20020919-1.c: Fix for x86 Darwin.
+
+2005-03-24 Geoffrey Keating <geoffk@apple.com>
+
+ * g++.dg/ext/visibility/pragma-override1.C: Mark as requiring
+ 'internal' visibility.
+ * g++.dg/ext/visibility/pragma-override2.C: Likewise.
+ * g++.dg/ext/visibility/visibility-7.C: Mark as requiring
+ 'protected' visibility.
+ * gcc.dg/visibility-7.c: Likewise.
+ * lib/target-supports.exp (check_visibility_available): Take
+ a parameter, the kind of visibility to check for.
+ * lib/target-supports-dg.exp (dg-require-visibility): Pass parameter
+ to check_visibility_available.
+
+ * g++.dg/expr/cast3.C: New.
+
+2005-03-24 David Edelsohn <edelsohn@gnu.org>
+
+ * gcc.c-torture/execute/20020720-1.x: XFAIL for all powerpc and
+ rs6000.
+
+2005-03-24 Steve Ellcey <sje@cup.hp.com>
+
+ PR target/20095
+ * gcc.dg/cleanup-5.c: skip if ia64-hp-hpux11.*
+
+2005-03-24 Alexandre Oliva <aoliva@redhat.com>
+
+ * gcc.dg/badshift.c: Renamed to...
+ * gcc.dg/torture/badshift.c: ... this. Remove explicit -O1.
+
+ * gcc.target/i386/badshift.c: Renamed to...
+ * gcc.dg/badshift.c: ... this. Fix typo. Use -march=i386 on i?86
+ only.
+
+ PR rtl-optimization/20532
+ * gcc.target/i386/badshift.c: New.
+
+2005-03-23 Francois-Xavier Coudert <coudert@clipper.ens.fr>
+
+ * gfortran.dg/pr18025.f90: New test.
+
+2005-03-23 Dale Johannesen <dalej@apple.com>
+
+ * gcc.dg/20020312-2.c: Fix for non-PowerPC Darwin.
+
+2005-03-23 Mark Mitchell <mark@codesourcery.com>
+
+ * g++.old-deja/g++.warn/compare1.C: Run with -Wno-deprecated.
+
+ * lib/target-supports.exp (check_iconv_available): Default
+ libiconv to -liconv, if there is no definition.
+
+2005-03-23 Hans-Peter Nilsson <hp@axis.com>
+
+ * gcc.dg/torture/cris-asm-mof-1.c: New test.
+
+2005-03-22 Mark Mitchell <mark@codesourcery.com>
+
+ * g++.dg/opt/max1.C: Run with -Wno-deprecated.
+ * g++.dg/opt/pr7503-2.C: Likewise.
+ * g++.dg/opt/pr7503-3.C: Likewise.
+ * g++.dg/opt/pr7503-4.C: Likewise.
+ * g++.dg/opt/pr7503-5.C: Likewise.
+ * g++.dg/warn/minmax.C: New test.
+
+2005-03-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
+
+ * gfortran.dg/g77_intrinsics_funcs.f: New test.
+ * gfortran.dg/g77_intrinsics_sub.f: New test.
+
+2005-03-22 Richard Guenther <rguenth@tat.physik.uni-tuebingen.de>
+ Jan Hubicka <jh@suse.cz>
+ Steven Bosscher <stevenb@suse.de
+
+ * gcc.dg/winline-6.c: Modify so inlined function have nonzero cost.
+
+2005-03-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR c++/19980
+ * g++.dg/template/redecl3.C: New test.
+
+2005-03-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR c++/20499
+ * g++.dg/parse/error16.C: Tweak error markers.
+
+2005-03-22 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/20561
+ * gcc.dg/20050321-2.c: New test.
+
+2005-03-22 Nathan Sidwell <nathan@codesourcery.com>
+
+ PR c++/20465
+ PR c++/20381
+ * g++.dg/template/ptrmem12.C: New.
+
2005-03-22 Hans-Peter Nilsson <hp@axis.com>
PR rtl-optimization/20527
@@ -73,12 +283,12 @@
2005-03-16 Francois-Xavier Coudert <coudert@clipper.ens.fr>
PR libfortran/20257
- * pr20257.f90: New test.
+ * gfortran.dg/pr20257.f90: New test.
2005-03-16 Francois-Xavier Coudert <coudert@clipper.ens.fr>
PR libfortran/20480
- * pr20480.f90: New test.
+ * gfortran.dg/pr20480.f90: New test.
2005-03-16 Richard Henderson <rth@redhat.com>
diff --git a/gcc/testsuite/g++.dg/ext/visibility/pragma-override1.C b/gcc/testsuite/g++.dg/ext/visibility/pragma-override1.C
index a2c93ebb752..e292df41b4c 100644
--- a/gcc/testsuite/g++.dg/ext/visibility/pragma-override1.C
+++ b/gcc/testsuite/g++.dg/ext/visibility/pragma-override1.C
@@ -1,6 +1,6 @@
/* Test that #pragma GCC visibility does not override class member specific settings. */
/* { dg-do compile } */
-/* { dg-require-visibility "" } */
+/* { dg-require-visibility "internal" } */
/* { dg-final { scan-assembler "\\.internal.*Foo.methodEv" } } */
#pragma GCC visibility push(hidden)
diff --git a/gcc/testsuite/g++.dg/ext/visibility/pragma-override2.C b/gcc/testsuite/g++.dg/ext/visibility/pragma-override2.C
index a4bb42c728a..fe6c47fdbf5 100644
--- a/gcc/testsuite/g++.dg/ext/visibility/pragma-override2.C
+++ b/gcc/testsuite/g++.dg/ext/visibility/pragma-override2.C
@@ -1,6 +1,6 @@
/* Test that #pragma GCC visibility does not override class member specific settings. */
/* { dg-do compile } */
-/* { dg-require-visibility "" } */
+/* { dg-require-visibility "internal" } */
/* { dg-final { scan-assembler "\\.internal.*Foo.methodEv" } } */
#pragma GCC visibility push(hidden)
diff --git a/gcc/testsuite/g++.dg/ext/visibility/visibility-7.C b/gcc/testsuite/g++.dg/ext/visibility/visibility-7.C
index dbd7010d028..ae4589397b6 100644
--- a/gcc/testsuite/g++.dg/ext/visibility/visibility-7.C
+++ b/gcc/testsuite/g++.dg/ext/visibility/visibility-7.C
@@ -1,5 +1,5 @@
/* Test warning from conflicting visibility specifications. */
-/* { dg-require-visibility "" } */
+/* { dg-require-visibility "protected" } */
/* { dg-final { scan-hidden "xyzzy" } } */
extern int
diff --git a/gcc/testsuite/g++.dg/opt/max1.C b/gcc/testsuite/g++.dg/opt/max1.C
index 61b7021da66..10a6e57d92d 100644
--- a/gcc/testsuite/g++.dg/opt/max1.C
+++ b/gcc/testsuite/g++.dg/opt/max1.C
@@ -1,7 +1,7 @@
/* PR middle-end/19068 */
/* Test case by Andrew Pinski <pinskia@physics.uc.edu> */
/* { dg-do run } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O2 -Wno-deprecated" } */
extern "C" void abort (void);
diff --git a/gcc/testsuite/g++.dg/opt/pr7503-2.C b/gcc/testsuite/g++.dg/opt/pr7503-2.C
index 68bb143e45e..02ce5988d70 100644
--- a/gcc/testsuite/g++.dg/opt/pr7503-2.C
+++ b/gcc/testsuite/g++.dg/opt/pr7503-2.C
@@ -1,6 +1,6 @@
// PR c++/7503
// { dg-do run }
-// { dg-options "-O2" }
+// { dg-options "-O2 -Wno-deprecated" }
extern "C" void abort();
diff --git a/gcc/testsuite/g++.dg/opt/pr7503-3.C b/gcc/testsuite/g++.dg/opt/pr7503-3.C
index 34d91ddb6c0..4e8de0f207c 100644
--- a/gcc/testsuite/g++.dg/opt/pr7503-3.C
+++ b/gcc/testsuite/g++.dg/opt/pr7503-3.C
@@ -1,6 +1,6 @@
// PR c++/7503
// { dg-do compile }
-// { dg-options "-O2" }
+// { dg-options "-O2 -Wno-deprecated" }
extern int A, B;
diff --git a/gcc/testsuite/g++.dg/opt/pr7503-4.C b/gcc/testsuite/g++.dg/opt/pr7503-4.C
index 06ac901229f..7ed70946984 100644
--- a/gcc/testsuite/g++.dg/opt/pr7503-4.C
+++ b/gcc/testsuite/g++.dg/opt/pr7503-4.C
@@ -1,6 +1,6 @@
// PR c++/7503
// { dg-do run }
-// { dg-options "-O2" }
+// { dg-options "-O2 -Wno-deprecated" }
extern "C" void abort();
diff --git a/gcc/testsuite/g++.dg/opt/pr7503-5.C b/gcc/testsuite/g++.dg/opt/pr7503-5.C
index 9e1e719f5c2..236ac93aa3a 100644
--- a/gcc/testsuite/g++.dg/opt/pr7503-5.C
+++ b/gcc/testsuite/g++.dg/opt/pr7503-5.C
@@ -1,6 +1,6 @@
// PR c++/7503
// { dg-do run }
-// { dg-options "-O2" }
+// { dg-options "-O2 -Wno-deprecated" }
extern "C" void abort();
diff --git a/gcc/testsuite/g++.dg/parse/error16.C b/gcc/testsuite/g++.dg/parse/error16.C
index afc790e072e..3dc58ad53c0 100644
--- a/gcc/testsuite/g++.dg/parse/error16.C
+++ b/gcc/testsuite/g++.dg/parse/error16.C
@@ -2,7 +2,7 @@
struct A
{
- struct B {}; // { dg-error "" }
+ struct B {}; // { dg-error "previous" }
};
-struct A::B{}; // { dg-error "" }
+struct A::B{}; // { dg-error "redefinition" }
diff --git a/gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C b/gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C
index b4a24504585..1cd7bf458a7 100644
--- a/gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C
+++ b/gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C
@@ -14,8 +14,8 @@ extern "C" void *memcpy(void *, const void *, size_t);
#ifdef STACK_SIZE
const int arena_size = 256;
#else
-#if defined(__FreeBSD__) || defined(__sun__)
-// FreeBSD with threads and Solaris with threads require even more
+#if defined(__FreeBSD__) || defined(__sun__) || defined(__hpux__)
+// FreeBSD, Solaris and HP-UX with threads require even more
// space at initialization time. FreeBSD 5 now requires over 131072 bytes.
const int arena_size = 262144;
#else
diff --git a/gcc/testsuite/g++.old-deja/g++.warn/compare1.C b/gcc/testsuite/g++.old-deja/g++.warn/compare1.C
index 5407c936057..7a231801bfa 100644
--- a/gcc/testsuite/g++.old-deja/g++.warn/compare1.C
+++ b/gcc/testsuite/g++.old-deja/g++.warn/compare1.C
@@ -1,5 +1,5 @@
// { dg-do assemble }
-// { dg-options "-ansi -pedantic-errors -Wsign-compare" }
+// { dg-options "-ansi -pedantic-errors -Wsign-compare -Wno-deprecated" }
// Copyright (C) 2001 Free Software Foundation, Inc.
// Contributed by Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 5/13/2001
diff --git a/gcc/testsuite/gcc.c-torture/execute/20020720-1.x b/gcc/testsuite/gcc.c-torture/execute/20020720-1.x
index c693128a791..8020ef131da 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20020720-1.x
+++ b/gcc/testsuite/gcc.c-torture/execute/20020720-1.x
@@ -29,7 +29,7 @@ set torture_eval_before_compile {
set compiler_conditional_xfail_data {
"This test fails to optimize completely on certain platforms." \
{ "xtensa-*-*" "sh-*-*" "arm*-*-*" "strongarm*-*-*" "xscale*-*-*" \
- "h8300*-*-*" "frv-*-*" "powerpc-*-*spe" } \
+ "h8300*-*-*" "frv-*-*" "powerpc*-*-*" "rs6000-*-*" } \
{ "*" } \
{ "-O0" }
}
diff --git a/gcc/testsuite/gcc.dg/20020219-1.c b/gcc/testsuite/gcc.dg/20020219-1.c
index a3cda0e65d6..36649490e7d 100644
--- a/gcc/testsuite/gcc.dg/20020219-1.c
+++ b/gcc/testsuite/gcc.dg/20020219-1.c
@@ -1,13 +1,18 @@
/* PR c/4389
This testcase failed because host_integerp (x, 0) was returning
- 1 even for constants bigger than 2^31. It fails under under hpux
- without -mdisable-indexing because the pointer x - 1 is used as
- the base address of an indexed load. Because the struct A is not
+ 1 even for constants bigger than 2^31. It fails under under hppa
+ hpux without -mdisable-indexing because the pointer x - 1 is used
+ as the base address of an indexed load. Because the struct A is not
actually allocated, x - 1 lies in the text segment and this causes
- the wrong space register to be selected for the load. */
+ the wrong space register to be selected for the load. It fails on
+ IA64 hpux in ILP32 mode because extending x - 1 before adding the
+ array offset gives a different answer then adding first and then
+ extending. The underlying problem is the same as with hppa, x - 1 is
+ not a legal data address. */
/* { dg-do run } */
/* { dg-options "-O2" } */
/* { dg-options "-O2 -mdisable-indexing" { target hppa*-*-hpux* } } */
+/* { dg-skip-if "" { "ia64-*-hpux*" } "*" "-mlp64" } */
/* Disable the test entirely for 16-bit targets. */
#if __INT_MAX__ > 32767
diff --git a/gcc/testsuite/gcc.dg/20020312-2.c b/gcc/testsuite/gcc.dg/20020312-2.c
index 322c1d04898..763e167a12b 100644
--- a/gcc/testsuite/gcc.dg/20020312-2.c
+++ b/gcc/testsuite/gcc.dg/20020312-2.c
@@ -120,7 +120,7 @@ main()
save and restore global registers. Not possible when the PIC
register is in a register window, of course. On Darwin, you can't
call library routines from non-PIC code. */
-#if !defined (__sparc__) && !(defined(__MACH__) && defined(__POWERPC__))
+#if !defined (__sparc__) && !defined(__MACH__)
if (reg)
abort ();
#endif
diff --git a/gcc/testsuite/gcc.dg/20020919-1.c b/gcc/testsuite/gcc.dg/20020919-1.c
index 0eb6b50bdc9..a60fff30b1d 100644
--- a/gcc/testsuite/gcc.dg/20020919-1.c
+++ b/gcc/testsuite/gcc.dg/20020919-1.c
@@ -31,8 +31,14 @@
#elif defined (__i386__)
# define REG1 "%eax"
# define REG2 "%edx"
+#if defined (__MACH__)
+/* On Darwin -fpic is on by default, so don't use %ebx. */
+# define REG3 "%esi"
+# define REG4 "%edi"
+#else
# define REG3 "%ecx"
# define REG4 "%ebx"
+#endif
#elif defined (__MMIX__)
# define REG1 "$8"
# define REG2 "$9"
diff --git a/gcc/testsuite/gcc.dg/alias-7.c b/gcc/testsuite/gcc.dg/alias-7.c
index 591c3028e03..697497021f1 100644
--- a/gcc/testsuite/gcc.dg/alias-7.c
+++ b/gcc/testsuite/gcc.dg/alias-7.c
@@ -4,11 +4,7 @@
extern void abort (void);
-#define ASMNAME(cname) ASMNAME2 (__USER_LABEL_PREFIX__, cname)
-#define ASMNAME2(prefix, cname) STRING (prefix) cname
-#define STRING(x) #x
-
-int foo __asm__ (ASMNAME ("foo")) __attribute__((nocommon));
+int foo __asm__ ("foo") __attribute__((nocommon));
extern __typeof (foo) bar __attribute__ ((weak, alias ("foo")));
int
diff --git a/gcc/testsuite/gcc.dg/cleanup-5.c b/gcc/testsuite/gcc.dg/cleanup-5.c
index 2770c3db764..497ab0be90f 100644
--- a/gcc/testsuite/gcc.dg/cleanup-5.c
+++ b/gcc/testsuite/gcc.dg/cleanup-5.c
@@ -1,6 +1,7 @@
/* HP-UX libunwind.so doesn't provide _UA_END_OF_STACK */
-/* { dg-do run { xfail "ia64-hp-hpux11.*" } } */
+/* { dg-do run } */
/* { dg-options "-fexceptions" } */
+/* { dg-skip-if "" { "ia64-*-hpux11.*" } { "*" } { "" } } */
/* Verify that cleanups work with exception handling. */
#include <unwind.h>
diff --git a/gcc/testsuite/gcc.dg/nonnull-3.c b/gcc/testsuite/gcc.dg/nonnull-3.c
index 3b53eaf7b95..e8725cf12d2 100644
--- a/gcc/testsuite/gcc.dg/nonnull-3.c
+++ b/gcc/testsuite/gcc.dg/nonnull-3.c
@@ -51,6 +51,7 @@ foo (void *p, char *s)
__builtin_strchr (NULL, 16); /* { dg-warning "null" "null pointer check" } */
__builtin_strrchr (NULL, 16); /* { dg-warning "null" "null pointer check" } */
__builtin_strdup (NULL); /* { dg-warning "null" "null pointer check" } */
+ __builtin_strndup (NULL, 16); /* { dg-warning "null" "null pointer check" } */
__builtin_nan (NULL); /* { dg-warning "null" "null pointer check" } */
__builtin_nanf (NULL); /* { dg-warning "null" "null pointer check" } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-80.c b/gcc/testsuite/gcc.dg/vect/vect-80.c
index 112e892f531..9531ae96179 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-80.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-80.c
@@ -44,4 +44,4 @@ int main (void)
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail vect_no_align } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-96.c b/gcc/testsuite/gcc.dg/vect/vect-96.c
index cd9257a2f54..4ac405cd5fd 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-96.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-96.c
@@ -39,4 +39,4 @@ int main (void)
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail vect_no_align } } } */
diff --git a/gcc/testsuite/gcc.dg/visibility-7.c b/gcc/testsuite/gcc.dg/visibility-7.c
index f5e6e9aae5c..aaa8165e3e0 100644
--- a/gcc/testsuite/gcc.dg/visibility-7.c
+++ b/gcc/testsuite/gcc.dg/visibility-7.c
@@ -1,6 +1,6 @@
/* Test warning from conflicting visibility specifications. */
/* { dg-do compile } */
-/* { dg-require-visibility "" } */
+/* { dg-require-visibility "protected" } */
/* { dg-final { scan-hidden "xyzzy" } } */
extern int
diff --git a/gcc/testsuite/gcc.dg/winline-6.c b/gcc/testsuite/gcc.dg/winline-6.c
index 7ce7481a3ef..dd8d3a81b08 100644
--- a/gcc/testsuite/gcc.dg/winline-6.c
+++ b/gcc/testsuite/gcc.dg/winline-6.c
@@ -17,5 +17,5 @@ inline int q(void)
}
inline int t (void)
{
- return q (); /* { dg-warning "called from here" } */
+ return q () + 1; /* { dg-warning "called from here" } */
}
diff --git a/gcc/testsuite/gfortran.dg/g77/20030326-1.f b/gcc/testsuite/gfortran.dg/g77/20030326-1.f
index 2f44a405872..dc4ff43cd47 100644
--- a/gcc/testsuite/gfortran.dg/g77/20030326-1.f
+++ b/gcc/testsuite/gfortran.dg/g77/20030326-1.f
@@ -1,15 +1,10 @@
-C { dg-do compile }
-C PR fortran/9793
-C larson@w6yx.stanford.edu
-C
- integer a, b, c
-
- c = -2147483648 / -1 ! { dg-warning "outside symmetric range" "" }
-
- a = 1
- b = 0
- c = a / b
-
- print *, c
-
+! { dg-do compile }
+! { dg-options -pedantic }
+! PR fortran/9793
+! larson@w6yx.stanford.edu
+!
+! For gfortran, see PR 13490
+!
+ integer c
+ c = -2147483648 / (-1) ! { dg-warning "outside symmetric range" "" }
end
diff --git a/gcc/testsuite/lib/g++.exp b/gcc/testsuite/lib/g++.exp
index bc2bf60fb7d..e1fa69f836b 100644
--- a/gcc/testsuite/lib/g++.exp
+++ b/gcc/testsuite/lib/g++.exp
@@ -97,7 +97,6 @@ proc g++_include_flags { paths } {
#
proc g++_link_flags { paths } {
- global rootme
global srcdir
global ld_library_path
global GXX_UNDER_TEST
@@ -129,21 +128,7 @@ proc g++_link_flags { paths } {
if [file exists "${gccpath}/librx/librx.a"] {
append flags "-L${gccpath}/librx "
}
- append ld_library_path ":${rootme}"
- set compiler [lindex $GXX_UNDER_TEST 0]
- if { [is_remote host] == 0 && [which $compiler] != 0 } {
- foreach i "[exec $compiler --print-multi-lib]" {
- set mldir ""
- regexp -- "\[a-z0-9=/\.-\]*;" $i mldir
- set mldir [string trimright $mldir "\;@"]
- if { "$mldir" == "." } {
- continue
- }
- if { [llength [glob -nocomplain ${rootme}/${mldir}/libgcc_s*.so.*]] >= 1 } {
- append ld_library_path ":${rootme}/${mldir}"
- }
- }
- }
+ append ld_library_path [gcc-set-multilib-library-path $GXX_UNDER_TEST]
} else {
global tool_root_dir
@@ -185,6 +170,7 @@ proc g++_init { args } {
global gluefile wrap_flags
global objdir srcdir
global ALWAYS_CXXFLAGS
+ global CXXFLAGS
global TOOL_EXECUTABLE TOOL_OPTIONS
global GXX_UNDER_TEST
global TESTING_IN_BUILD_TREE
@@ -227,6 +213,10 @@ proc g++_init { args } {
g++_maybe_build_wrapper "${tmpdir}/g++-testglue.o"
+ if {![info exists CXXFLAGS]} {
+ set CXXFLAGS ""
+ }
+
set ALWAYS_CXXFLAGS ""
if ![is_remote host] {
diff --git a/gcc/testsuite/lib/gcc-defs.exp b/gcc/testsuite/lib/gcc-defs.exp
index 87e8564e97a..c48b5399ac0 100644
--- a/gcc/testsuite/lib/gcc-defs.exp
+++ b/gcc/testsuite/lib/gcc-defs.exp
@@ -219,3 +219,35 @@ proc dg-additional-files-options { options source } {
return $options
}
+
+# Return a colon-separate list of directories to search for libraries
+# for COMPILER, including multilib directories.
+
+proc gcc-set-multilib-library-path { compiler } {
+ global rootme
+
+ # ??? rootme will not be set when testing an installed compiler.
+ # In that case, we should perhaps use some other method to find
+ # libraries.
+ if {![info exists rootme]} {
+ return ""
+ }
+
+ set libpath ":${rootme}"
+ set compiler [lindex $compiler 0]
+ if { [is_remote host] == 0 && [which $compiler] != 0 } {
+ foreach i "[exec $compiler --print-multi-lib]" {
+ set mldir ""
+ regexp -- "\[a-z0-9=/\.-\]*;" $i mldir
+ set mldir [string trimright $mldir "\;@"]
+ if { "$mldir" == "." } {
+ continue
+ }
+ if { [llength [glob -nocomplain ${rootme}/${mldir}/libgcc_s*.so.*]] >= 1 } {
+ append libpath ":${rootme}/${mldir}"
+ }
+ }
+ }
+
+ return $libpath
+}
diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
index ee16d2efc67..aecce0f5eb5 100644
--- a/gcc/testsuite/lib/gcc-dg.exp
+++ b/gcc/testsuite/lib/gcc-dg.exp
@@ -52,28 +52,12 @@ if ![info exists GCC_UNDER_TEST] {
set GCC_UNDER_TEST "[find_gcc]"
}
-global rootme
-global ld_library_path
global orig_environment_saved
# This file may be sourced, so don't override environment settings
# that have been previously setup.
if { $orig_environment_saved == 0 } {
- set ld_library_path "${rootme}"
- set compiler [lindex $GCC_UNDER_TEST 0]
- if { [is_remote host] == 0 && [which $compiler] != 0 } {
- foreach i "[exec $compiler --print-multi-lib]" {
- set mldir ""
- regexp -- "\[a-z0-9=/\.-\]*;" $i mldir
- set mldir [string trimright $mldir "\;@"]
- if { "$mldir" == "." } {
- continue
- }
- if { [llength [glob -nocomplain ${rootme}/${mldir}/libgcc_s*.so.*]] >= 1 } {
- append ld_library_path ":${rootme}/${mldir}"
- }
- }
- }
+ append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST]
set_ld_library_path_env_vars
}
diff --git a/gcc/testsuite/lib/gfortran.exp b/gcc/testsuite/lib/gfortran.exp
index 8762c906838..43a104e1f51 100644
--- a/gcc/testsuite/lib/gfortran.exp
+++ b/gcc/testsuite/lib/gfortran.exp
@@ -73,7 +73,6 @@ proc gfortran_version { } {
#
proc gfortran_link_flags { paths } {
- global rootme
global srcdir
global ld_library_path
global GFORTRAN_UNDER_TEST
@@ -94,21 +93,8 @@ proc gfortran_link_flags { paths } {
if [file exists "${gccpath}/libiberty/libiberty.a"] {
append flags "-L${gccpath}/libiberty "
}
- append ld_library_path ":${rootme}"
- set compiler [lindex $GFORTRAN_UNDER_TEST 0]
- if { [is_remote host] == 0 && [which $compiler] != 0 } {
- foreach i "[exec $compiler --print-multi-lib]" {
- set mldir ""
- regexp -- "\[a-z0-9=/\.-\]*;" $i mldir
- set mldir [string trimright $mldir "\;@"]
- if { "$mldir" == "." } {
- continue
- }
- if { [llength [glob -nocomplain ${rootme}/${mldir}/libgcc_s*.so.*]] >= 1 } {
- append ld_library_path ":${rootme}/${mldir}"
- }
- }
- }
+ append ld_library_path \
+ [gcc-set-multilib-library-path $GFORTRAN_UNDER_TEST]
}
set_ld_library_path_env_vars
diff --git a/gcc/testsuite/lib/objc.exp b/gcc/testsuite/lib/objc.exp
index d016a379bb7..fe86b0e2bff 100644
--- a/gcc/testsuite/lib/objc.exp
+++ b/gcc/testsuite/lib/objc.exp
@@ -115,21 +115,7 @@ proc objc_init { args } {
objc_maybe_build_wrapper "${tmpdir}/objc-testglue.o"
- set objc_libgcc_s_path "${rootme}"
- set compiler [lindex $OBJC_UNDER_TEST 0]
- if { [is_remote host] == 0 && [which $compiler] != 0 } {
- foreach i "[exec $compiler --print-multi-lib]" {
- set mldir ""
- regexp -- "\[a-z0-9=/\.-\]*;" $i mldir
- set mldir [string trimright $mldir "\;@"]
- if { "$mldir" == "." } {
- continue
- }
- if { [llength [glob -nocomplain ${rootme}/${mldir}/libgcc_s*.so.*]] >= 1 } {
- append objc_libgcc_s_path ":${rootme}/${mldir}"
- }
- }
- }
+ append objc_libgcc_s_path [gcc-set-multilib-library-path $OBJC_UNDER_TEST]
}
proc objc_target_compile { source dest type options } {
diff --git a/gcc/testsuite/lib/target-supports-dg.exp b/gcc/testsuite/lib/target-supports-dg.exp
index e3ad1d540fa..1f2242fdc5d 100644
--- a/gcc/testsuite/lib/target-supports-dg.exp
+++ b/gcc/testsuite/lib/target-supports-dg.exp
@@ -32,7 +32,7 @@ proc dg-require-weak { args } {
# test.
proc dg-require-visibility { args } {
- set visibility_available [ check_visibility_available ]
+ set visibility_available [ check_visibility_available [lindex $args 1 ] ]
if { $visibility_available == -1 } {
upvar name name
unresolved "$name"
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 2acef12aeea..4b129a870a1 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -110,13 +110,14 @@ proc check_weak_available { } {
}
###############################
-# proc check_visibility_available { }
+# proc check_visibility_available { what_kind }
###############################
# The visibility attribute is only support in some object formats
# This proc returns 1 if it is supported, 0 if not.
+# The argument is the kind of visibility, default/protected/hidden/internal.
-proc check_visibility_available { } {
+proc check_visibility_available { what_kind } {
global visibility_available_saved
global tool
global target_triplet
@@ -126,18 +127,29 @@ proc check_visibility_available { } {
return 0
}
- if {![info exists visibility_available_saved] } {
- set lines [get_compiler_messages visibility object {
- void f() __attribute__((visibility("hidden")));
- void f() {}
- }]
- if [string match "" $lines] then {
- set visibility_available_saved 1
- } else {
- set visibility_available_saved 0
+ if [string match "" $what_kind] { set what_kind "hidden" }
+
+ if { [info exists visibility_available_saved] } {
+ verbose "Saved result is <$visibility_available_saved>" 1
+ if { [ lsearch -exact $visibility_available_saved $what_kind ] != -1 } {
+ return 1
+ } elseif { [ lsearch -exact $visibility_available_saved "!$what_kind" ] != -1 } {
+ return 0
}
}
- return $visibility_available_saved
+
+ set lines [get_compiler_messages visibility object "
+ void f() __attribute__((visibility(\"$what_kind\")));
+ void f() {}
+ "]
+ if [string match "" $lines] then {
+ set answer 1
+ lappend visibility_available_saved $what_kind
+ } else {
+ set answer 0
+ lappend visibility_available_saved "!$what_kind"
+ }
+ return $answer
}
###############################
@@ -303,6 +315,10 @@ proc check_iconv_available { test_what } {
puts $f "return 0;\n}"
close $f
+ # If the tool configuration file has not set libiconv, try "-liconv"
+ if { ![info exists libiconv] } {
+ set libiconv "-liconv"
+ }
set lines [${tool}_target_compile $src $exe executable "libs=$libiconv" ]
file delete $src
diff --git a/gcc/testsuite/lib/treelang.exp b/gcc/testsuite/lib/treelang.exp
index 8ce830d4c80..aba9379793c 100644
--- a/gcc/testsuite/lib/treelang.exp
+++ b/gcc/testsuite/lib/treelang.exp
@@ -84,7 +84,6 @@ proc default_treelang_version { } {
set treelang_initialized 0
proc treelang_init { args } {
- global rootme
global tmpdir
global libdir
global gluefile wrap_flags
@@ -115,21 +114,8 @@ proc treelang_init { args } {
treelang_maybe_build_wrapper "${tmpdir}/treelang-testglue.o"
- set treelang_libgcc_s_path "${rootme}"
- set compiler [lindex $TREELANG_UNDER_TEST 0]
- if { [is_remote host] == 0 && [which $compiler] != 0 } {
- foreach i "[exec $compiler --print-multi-lib]" {
- set mldir ""
- regexp -- "\[a-z0-9=/\.-\]*;" $i mldir
- set mldir [string trimright $mldir "\;@"]
- if { "$mldir" == "." } {
- continue
- }
- if { [llength [glob -nocomplain ${rootme}/${mldir}/libgcc_s*.so.*]] >= 1 } {
- append treelang_libgcc_s_path ":${rootme}/${mldir}"
- }
- }
- }
+ set treelang_libgcc_s_path \
+ [gcc-set-multilib-library-path $TREELANG_UNDER_TEST]
}
proc treelang_target_compile { source dest type options } {
diff --git a/gcc/testsuite/treelang/ChangeLog b/gcc/testsuite/treelang/ChangeLog
index 4f7fd02b5e9..410cb9480ab 100644
--- a/gcc/testsuite/treelang/ChangeLog
+++ b/gcc/testsuite/treelang/ChangeLog
@@ -1,3 +1,7 @@
+2005-03-22 James A. Morrison <phython@gcc.gnu.org>
+
+ * compile/memory.tree: New test.
+
2005-02-26 James A. Morrison <phython@gcc.gnu.org>
* compile/var_defs: Add uninitialized variables.
diff --git a/gcc/tlink.c b/gcc/tlink.c
index f09a8652880..bf4e1d757b0 100644
--- a/gcc/tlink.c
+++ b/gcc/tlink.c
@@ -1,7 +1,7 @@
/* Scan linker error messages for missing template instantiations and provide
them.
- Copyright (C) 1995, 1998, 1999, 2000, 2001, 2003, 2004
+ Copyright (C) 1995, 1998, 1999, 2000, 2001, 2003, 2004, 2005
Free Software Foundation, Inc.
Contributed by Jason Merrill (jason@cygnus.com).
@@ -281,8 +281,10 @@ tlink_init (void)
static int
tlink_execute (const char *prog, char **argv, const char *redir)
{
- collect_execute (prog, argv, redir);
- return collect_wait (prog);
+ struct pex_obj *pex;
+
+ pex = collect_execute (prog, argv, redir);
+ return collect_wait (prog, pex);
}
static char *
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 5eb0d0deac9..5895d37a0bc 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -783,6 +783,8 @@ wrapup_global_declarations (tree *vec, int len)
if (flag_unit_at_a_time && node->finalized)
needed = 0;
+ else if (node->alias)
+ needed = 0;
else if ((flag_unit_at_a_time && !cgraph_global_info_ready)
&& (TREE_USED (decl)
|| TREE_USED (DECL_ASSEMBLER_NAME (decl))))
@@ -1773,9 +1775,6 @@ process_options (void)
warning ("this target machine does not have delayed branches");
#endif
- if (flag_tree_based_profiling && flag_profile_values)
- sorry ("value-based profiling not yet implemented in trees.");
-
user_label_prefix = USER_LABEL_PREFIX;
if (flag_leading_underscore != -1)
{
diff --git a/gcc/tree-flow.h b/gcc/tree-flow.h
index 2d0f43d74c1..5f06100bcd1 100644
--- a/gcc/tree-flow.h
+++ b/gcc/tree-flow.h
@@ -337,6 +337,12 @@ struct stmt_ann_d GTY(())
by each pass on an as-needed basis in any order convenient for the
pass which needs statement UIDs. */
unsigned int uid;
+
+ /* Linked list of histograms for value-based profiling. This is really a
+ struct histogram_value*. We use void* to avoid having to export that
+ everywhere, and to avoid having to put it in GC memory. */
+
+ void * GTY ((skip (""))) histograms;
};
union tree_ann_d GTY((desc ("ann_type ((tree_ann_t)&%h)")))
@@ -648,16 +654,18 @@ extern void walk_use_def_chains (tree, walk_use_def_chains_fn, void *, bool);
extern bool stmt_references_memory_p (tree);
/* In tree-into-ssa.c */
-extern void update_ssa (bool);
-extern void register_new_name_mapping (tree, tree);
-extern tree create_new_def_for (tree, tree, def_operand_p);
-extern bool need_ssa_update_p (void);
-extern bool name_registered_for_update_p (tree);
-extern void release_ssa_name_after_update_ssa (tree name);
-extern void dump_repl_tbl (FILE *);
-extern void debug_repl_tbl (void);
-extern void dump_names_replaced_by (FILE *, unsigned);
-extern void debug_names_replaced_by (unsigned);
+void update_ssa (bool);
+void register_new_name_mapping (tree, tree);
+tree create_new_def_for (tree, tree, def_operand_p);
+bool need_ssa_update_p (void);
+bool name_registered_for_update_p (tree);
+void delete_update_ssa (void);
+bitmap ssa_names_to_replace (void);
+void release_ssa_name_after_update_ssa (tree name);
+void dump_repl_tbl (FILE *);
+void debug_repl_tbl (void);
+void dump_names_replaced_by (FILE *, tree);
+void debug_names_replaced_by (tree);
void compute_global_livein (bitmap, bitmap);
tree duplicate_ssa_name (tree, tree);
void mark_sym_for_renaming (tree);
@@ -674,6 +682,7 @@ void dump_value_range (FILE *, value_range *);
void debug_value_range (value_range *);
void dump_all_value_ranges (FILE *);
void debug_all_value_ranges (void);
+bool expr_computes_nonzero (tree);
/* FIXME. Move these to tree-ssa-propagate.[ch]. */
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index c20c0744c70..0b38f08724c 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -1164,6 +1164,23 @@ inlinable_function_p (tree fn)
return inlinable;
}
+/* Estimate the cost of a memory move. Use machine dependent
+ word size and take possible memcpy call into account. */
+
+int
+estimate_move_cost (tree type)
+{
+ HOST_WIDE_INT size;
+
+ size = int_size_in_bytes (type);
+
+ if (size < 0 || size > MOVE_MAX_PIECES * MOVE_RATIO)
+ /* Cost of a memcpy call, 3 arguments and the call. */
+ return 4;
+ else
+ return ((size + MOVE_MAX_PIECES - 1) / MOVE_MAX_PIECES);
+}
+
/* Used by estimate_num_insns. Estimate number of instructions seen
by given statement. */
@@ -1242,28 +1259,50 @@ estimate_num_insns_1 (tree *tp, int *walk_subtrees, void *data)
*walk_subtrees = 0;
return NULL;
- /* Recognize assignments of large structures and constructors of
- big arrays. */
+ /* Try to estimate the cost of assignments. We have three cases to
+ deal with:
+ 1) Simple assignments to registers;
+ 2) Stores to things that must live in memory. This includes
+ "normal" stores to scalars, but also assignments of large
+ structures, or constructors of big arrays;
+ 3) TARGET_EXPRs.
+
+ Let us look at the first two cases, assuming we have "a = b + C":
+ <modify_expr <var_decl "a"> <plus_expr <var_decl "b"> <constant C>>
+ If "a" is a GIMPLE register, the assignment to it is free on almost
+ any target, because "a" usually ends up in a real register. Hence
+ the only cost of this expression comes from the PLUS_EXPR, and we
+ can ignore the MODIFY_EXPR.
+ If "a" is not a GIMPLE register, the assignment to "a" will most
+ likely be a real store, so the cost of the MODIFY_EXPR is the cost
+ of moving something into "a", which we compute using the function
+ estimate_move_cost.
+
+ The third case deals with TARGET_EXPRs, for which the semantics are
+ that a temporary is assigned, unless the TARGET_EXPR itself is being
+ assigned to something else. In the latter case we do not need the
+ temporary. E.g. in <modify_expr <var_decl "a"> <target_expr>>, the
+ MODIFY_EXPR is free. */
case INIT_EXPR:
case MODIFY_EXPR:
- x = TREE_OPERAND (x, 0);
- /* FALLTHRU */
+ /* Is the right and side a TARGET_EXPR? */
+ if (TREE_CODE (TREE_OPERAND (x, 1)) == TARGET_EXPR)
+ break;
+ /* ... fall through ... */
+
case TARGET_EXPR:
+ x = TREE_OPERAND (x, 0);
+ /* Is this an assignments to a register? */
+ if (is_gimple_reg (x))
+ break;
+ /* Otherwise it's a store, so fall through to compute the move cost. */
+
case CONSTRUCTOR:
- {
- HOST_WIDE_INT size;
-
- size = int_size_in_bytes (TREE_TYPE (x));
-
- if (size < 0 || size > MOVE_MAX_PIECES * MOVE_RATIO)
- *count += 10;
- else
- *count += ((size + MOVE_MAX_PIECES - 1) / MOVE_MAX_PIECES);
- }
+ *count += estimate_move_cost (TREE_TYPE (x));
break;
- /* Assign cost of 1 to usual operations.
- ??? We may consider mapping RTL costs to this. */
+ /* Assign cost of 1 to usual operations.
+ ??? We may consider mapping RTL costs to this. */
case COND_EXPR:
case PLUS_EXPR:
@@ -1350,6 +1389,7 @@ estimate_num_insns_1 (tree *tp, int *walk_subtrees, void *data)
case CALL_EXPR:
{
tree decl = get_callee_fndecl (x);
+ tree arg;
if (decl && DECL_BUILT_IN_CLASS (decl) == BUILT_IN_NORMAL)
switch (DECL_FUNCTION_CODE (decl))
@@ -1362,7 +1402,21 @@ estimate_num_insns_1 (tree *tp, int *walk_subtrees, void *data)
default:
break;
}
- *count += 10;
+
+ /* Our cost must be kept in sync with cgraph_estimate_size_after_inlining
+ that does use function declaration to figure out the arguments. */
+ if (!decl)
+ {
+ for (arg = TREE_OPERAND (x, 1); arg; arg = TREE_CHAIN (arg))
+ *count += estimate_move_cost (TREE_TYPE (TREE_VALUE (arg)));
+ }
+ else
+ {
+ for (arg = DECL_ARGUMENTS (decl); arg; arg = TREE_CHAIN (arg))
+ *count += estimate_move_cost (TREE_TYPE (arg));
+ }
+
+ *count += PARAM_VALUE (PARAM_INLINE_CALL_COST);
break;
}
default:
diff --git a/gcc/tree-inline.h b/gcc/tree-inline.h
index a8e9de6c4c8..a159758f21c 100644
--- a/gcc/tree-inline.h
+++ b/gcc/tree-inline.h
@@ -1,5 +1,5 @@
/* Tree inlining hooks and declarations.
- Copyright 2001, 2003, 2004 Free Software Foundation, Inc.
+ Copyright 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
Contributed by Alexandre Oliva <aoliva@redhat.com>
This file is part of GCC.
@@ -29,6 +29,7 @@ bool tree_inlinable_function_p (tree);
tree copy_tree_r (tree *, int *, void *);
void clone_body (tree, tree, void *);
tree save_body (tree, tree *, tree *);
+int estimate_move_cost (tree type);
int estimate_num_insns (tree expr);
/* 0 if we should not perform inlining.
diff --git a/gcc/tree-into-ssa.c b/gcc/tree-into-ssa.c
index 152a99278d9..963eea9d1af 100644
--- a/gcc/tree-into-ssa.c
+++ b/gcc/tree-into-ssa.c
@@ -84,30 +84,20 @@ struct def_blocks_d
static htab_t def_blocks;
/* Stack of trees used to restore the global currdefs to its original
- state after completing rewriting of a block and its dominator children.
+ state after completing rewriting of a block and its dominator
+ children. Its elements have the following properties:
- This vector is used in two contexts. The first is rewriting of _DECL
- nodes into SSA_NAMEs. In that context its elements have the
- following properties:
+ - An SSA_NAME indicates that the current definition of the
+ underlying variable should be set to the given SSA_NAME.
- An SSA_NAME indicates that the current definition of the underlying
- variable should be set to the given SSA_NAME.
+ - A _DECL node indicates that the underlying variable has no
+ current definition.
- A _DECL node indicates that the underlying variable has no current
- definition.
+ - A NULL node is used to mark the last node associated with the
+ current block.
- A NULL node is used to mark the last node associated with the
- current block.
-
- This vector is also used when rewriting an SSA_NAME which has multiple
- definition sites into multiple SSA_NAMEs. In that context entries come
- in pairs.
-
- The top entry is an SSA_NAME and the top-1 entry is the
- current value for that SSA_NAME.
-
- A NULL node at the top entry is used to mark the last node associated
- with the current block. */
+ - A NULL node at the top entry is used to mark the last node
+ associated with the current block. */
static VEC(tree_on_heap) *block_defs_stack;
/* Basic block vectors used in this file ought to be allocated in the heap. */
@@ -116,10 +106,20 @@ DEF_VEC_MALLOC_P(int);
/* Set of existing SSA names being replaced by update_ssa. */
static sbitmap old_ssa_names;
-/* Set of new SSA names being added by update_ssa. */
+/* Set of new SSA names being added by update_ssa. Note that both
+ NEW_SSA_NAMES and OLD_SSA_NAMES are dense bitmaps because most of
+ the operations done on them are presence tests. */
static sbitmap new_ssa_names;
-/* Set of symbols that should have their SSA information updated. */
+/* Set of virtual SSA names to be updated. Since virtuals are always
+ in FUD chain form, these names are not used as a mapping mechanism
+ like OLD_SSA_NAMES and NEW_SSA_NAMES. Instead, the names in this
+ set are used by ssa_names_to_replace to inform its caller which
+ names are going to be updated. */
+static bitmap old_virtual_ssa_names;
+
+/* Symbols whose SSA form needs to be updated or created for the first
+ time. */
static bitmap syms_to_rename;
/* Set of SSA names that have been marked to be released after they
@@ -546,15 +546,24 @@ add_new_name_mapping (tree new, tree old)
}
/* We don't need to keep replacement mappings for virtual names.
- Since these names are kept in FUD-chain form, just add NEW to
- NEW_SSA_NAMES and mark its symbol for renaming. */
+ Since these names are kept in FUD-chain form, we need to traverse
+ the CFG from ENTRY to repair FUD chains. */
if (!is_gimple_reg (new))
{
tree sym;
gcc_assert (!is_gimple_reg (old));
- sym = DECL_P (new) ? new : SSA_NAME_VAR (new);
+
+ if (DECL_P (old))
+ sym = new;
+ else
+ {
+ sym = SSA_NAME_VAR (old);
+ bitmap_set_bit (old_virtual_ssa_names, SSA_NAME_VERSION (old));
+ }
+
mark_sym_for_renaming (sym);
+ need_to_update_vops_p = true;
timevar_pop (TV_TREE_SSA_INCREMENTAL);
@@ -1771,11 +1780,11 @@ struct tree_opt_pass pass_build_ssa =
};
-/* Mark the definition of NAME at STMT and BB as interesting for the
+/* Mark the definition of VAR at STMT and BB as interesting for the
renamer. BLOCKS is the set of blocks that need updating. */
static void
-mark_def_interesting (tree name, tree stmt, basic_block bb, bitmap blocks,
+mark_def_interesting (tree var, tree stmt, basic_block bb, bitmap blocks,
bool insert_phi_p)
{
REGISTER_DEFS_IN_THIS_STMT (stmt) = 1;
@@ -1785,15 +1794,24 @@ mark_def_interesting (tree name, tree stmt, basic_block bb, bitmap blocks,
{
bool is_phi_p = TREE_CODE (stmt) == PHI_NODE;
- set_def_block (name, bb, is_phi_p);
+#if defined ENABLE_CHECKING
+ /* If VAR is a virtual, then it had better be a symbol.
+ Virtuals are in FUD-chain form, so we are interested in the
+ definition and use sites of the symbol, not the individual
+ SSA names. */
+ if (!is_gimple_reg (var))
+ gcc_assert (DECL_P (var));
+#endif
+
+ set_def_block (var, bb, is_phi_p);
- /* If NAME is an SSA name in NEW_SSA_NAMES, this is a definition
+ /* If VAR is an SSA name in NEW_SSA_NAMES, this is a definition
site for both itself and all the old names replaced by it. */
- if (TREE_CODE (name) == SSA_NAME && is_new_name (name))
+ if (TREE_CODE (var) == SSA_NAME && is_new_name (var))
{
bitmap_iterator bi;
unsigned i;
- bitmap set = names_replaced_by (name);
+ bitmap set = names_replaced_by (var);
if (set)
EXECUTE_IF_SET_IN_BITMAP (set, 0, i, bi)
set_def_block (ssa_name (i), bb, is_phi_p);
@@ -1802,27 +1820,38 @@ mark_def_interesting (tree name, tree stmt, basic_block bb, bitmap blocks,
}
-/* Mark the use of NAME at STMT and BB as interesting for the
+/* Mark the use of VAR at STMT and BB as interesting for the
renamer. INSERT_PHI_P is true if we are going to insert new PHI
nodes. BLOCKS is the set of blocks that need updating. */
static inline void
-mark_use_interesting (tree name, tree stmt, basic_block bb, bitmap blocks,
+mark_use_interesting (tree var, tree stmt, basic_block bb, bitmap blocks,
bool insert_phi_p)
{
REWRITE_THIS_STMT (stmt) = 1;
bitmap_set_bit (blocks, bb->index);
- /* If NAME has not been defined in BB, then it is live-on-entry
- to BB. Note that we cannot just use the block holding NAME's
- definition because if NAME is one of the names in OLD_SSA_NAMES,
+ /* If VAR has not been defined in BB, then it is live-on-entry
+ to BB. Note that we cannot just use the block holding VAR's
+ definition because if VAR is one of the names in OLD_SSA_NAMES,
it will have several definitions (itself and all the names that
replace it). */
if (insert_phi_p)
{
- struct def_blocks_d *db_p = get_def_blocks_for (name);
+ struct def_blocks_d *db_p;
+
+#if defined ENABLE_CHECKING
+ /* If VAR is a virtual, then it had better be a symbol.
+ Virtuals are in FUD-chain form, so we are interested in the
+ definition and use sites of the symbol, not the individual
+ SSA names. */
+ if (!is_gimple_reg (var))
+ gcc_assert (DECL_P (var));
+#endif
+
+ db_p = get_def_blocks_for (var);
if (!bitmap_bit_p (db_p->def_blocks, bb->index))
- set_livein_block (name, bb);
+ set_livein_block (var, bb);
}
}
@@ -2030,23 +2059,20 @@ prepare_block_for_update (basic_block bb, bool insert_phi_p,
}
-/* Helper for prepare_def_sites. VER is the version number for the
- SSA name to process. BLOCKS and INSERT_PHI_P are as in
- prepare_def_sites. */
+/* Helper for prepare_def_sites. Mark the definition site for NAME as
+ interesting. BLOCKS and INSERT_PHI_P are as in prepare_def_sites. */
static void
-prepare_def_site_for (unsigned ver, bitmap blocks, bool insert_phi_p)
+prepare_def_site_for (tree name, bitmap blocks, bool insert_phi_p)
{
- tree name, stmt;
+ tree stmt;
basic_block bb;
- name = ssa_name (ver);
-
gcc_assert (name && !SSA_NAME_IN_FREE_LIST (name) && is_gimple_reg (name));
stmt = SSA_NAME_DEF_STMT (name);
bb = bb_for_stmt (stmt);
- if (bb)
+ if (bb && bb->index < last_basic_block)
mark_def_interesting (name, stmt, bb, blocks, insert_phi_p);
}
@@ -2071,61 +2097,42 @@ prepare_def_sites (bitmap blocks, bool insert_phi_p)
RESET_BIT (new_ssa_names, i);
EXECUTE_IF_SET_IN_SBITMAP (old_ssa_names, 0, i,
- prepare_def_site_for (i, blocks, insert_phi_p));
+ prepare_def_site_for (ssa_name (i), blocks, insert_phi_p));
EXECUTE_IF_SET_IN_SBITMAP (new_ssa_names, 0, i,
- prepare_def_site_for (i, blocks, insert_phi_p));
-
- /* If any of the symbols in SYMS_TO_RENAME is a virtual variable, we
- will need to update virtual operands as well. */
- EXECUTE_IF_SET_IN_BITMAP (syms_to_rename, 0, i, bi)
- if (!is_gimple_reg (referenced_var (i)))
- {
- need_to_update_vops_p = true;
- break;
- }
+ prepare_def_site_for (ssa_name (i), blocks, insert_phi_p));
}
-/* Dump all names replaced by SSA name version VER to FILE. */
+/* Dump all the names replaced by NAME to FILE. */
void
-dump_names_replaced_by (FILE *file, unsigned ver)
+dump_names_replaced_by (FILE *file, tree name)
{
- tree name = ssa_name (ver);
+ unsigned i;
+ bitmap old_set;
+ bitmap_iterator bi;
print_generic_expr (file, name, 0);
fprintf (file, " -> { ");
- if (!is_gimple_reg (name))
+ old_set = names_replaced_by (name);
+ EXECUTE_IF_SET_IN_BITMAP (old_set, 0, i, bi)
{
- print_generic_expr (file, SSA_NAME_VAR (name), 0);
+ print_generic_expr (file, ssa_name (i), 0);
fprintf (file, " ");
}
- else
- {
- unsigned i;
- bitmap old_set;
- bitmap_iterator bi;
-
- old_set = names_replaced_by (name);
- EXECUTE_IF_SET_IN_BITMAP (old_set, 0, i, bi)
- {
- print_generic_expr (file, ssa_name (i), 0);
- fprintf (file, " ");
- }
- }
fprintf (file, "}\n");
}
-/* Dump all the new replacements for SSA name version VER to stderr. */
+/* Dump all the names replaced by NAME to stderr. */
void
-debug_names_replaced_by (unsigned ver)
+debug_names_replaced_by (tree name)
{
- dump_names_replaced_by (stderr, ver);
+ dump_names_replaced_by (stderr, name);
}
@@ -2147,7 +2154,7 @@ dump_repl_tbl (FILE *file)
"O_1, ..., O_j\n\n");
EXECUTE_IF_SET_IN_SBITMAP (new_ssa_names, 0, i,
- dump_names_replaced_by (file, i));
+ dump_names_replaced_by (file, ssa_name (i)));
}
if (syms_to_rename && !bitmap_empty_p (syms_to_rename))
@@ -2160,6 +2167,16 @@ dump_repl_tbl (FILE *file)
}
}
+ if (old_virtual_ssa_names && !bitmap_empty_p (old_virtual_ssa_names))
+ {
+ fprintf (file, "\n\nVirtual SSA names to be updated\n\n");
+ EXECUTE_IF_SET_IN_BITMAP (old_virtual_ssa_names, 0, i, bi)
+ {
+ print_generic_expr (file, ssa_name (i), 0);
+ fprintf (file, " ");
+ }
+ }
+
if (names_to_release && !bitmap_empty_p (names_to_release))
{
fprintf (file, "\n\nSSA names to release after updating the SSA web\n\n");
@@ -2202,13 +2219,14 @@ init_update_ssa (void)
need_to_update_vops_p = false;
need_to_replace_names_p = false;
syms_to_rename = BITMAP_ALLOC (NULL);
+ old_virtual_ssa_names = BITMAP_ALLOC (NULL);
names_to_release = NULL;
}
/* Deallocate data structures used for incremental SSA updates. */
-static void
+void
delete_update_ssa (void)
{
unsigned i;
@@ -2227,6 +2245,7 @@ delete_update_ssa (void)
need_to_update_vops_p = false;
need_to_replace_names_p = false;
BITMAP_FREE (syms_to_rename);
+ BITMAP_FREE (old_virtual_ssa_names);
if (names_to_release)
{
@@ -2293,6 +2312,9 @@ mark_sym_for_renaming (tree sym)
init_update_ssa ();
bitmap_set_bit (syms_to_rename, var_ann (sym)->uid);
+
+ if (!is_gimple_reg (sym))
+ need_to_update_vops_p = true;
}
@@ -2301,10 +2323,20 @@ mark_sym_for_renaming (tree sym)
void
mark_set_for_renaming (bitmap set)
{
+ bitmap_iterator bi;
+ unsigned i;
+
if (need_to_initialize_update_ssa_p)
init_update_ssa ();
bitmap_ior_into (syms_to_rename, set);
+
+ EXECUTE_IF_SET_IN_BITMAP (set, 0, i, bi)
+ if (!is_gimple_reg (referenced_var (i)))
+ {
+ need_to_update_vops_p = true;
+ break;
+ }
}
@@ -2331,6 +2363,24 @@ name_registered_for_update_p (tree n)
}
+/* Return the set of all the SSA names marked to be replaced. */
+
+bitmap
+ssa_names_to_replace (void)
+{
+ unsigned i;
+ bitmap ret;
+
+ ret = BITMAP_ALLOC (NULL);
+ EXECUTE_IF_SET_IN_SBITMAP (old_ssa_names, 0, i,
+ bitmap_set_bit (ret, i));
+
+ bitmap_ior_into (ret, old_virtual_ssa_names);
+
+ return ret;
+}
+
+
/* Mark NAME to be released after update_ssa has finished. */
void
@@ -2532,7 +2582,7 @@ update_ssa (bool insert_phi_p)
/* Ensure that the dominance information is up-to-date. */
calculate_dominance_info (CDI_DOMINATORS);
- if (insert_phi_p || !bitmap_empty_p (syms_to_rename))
+ if (insert_phi_p)
{
/* If the caller requested PHI nodes to be added, compute
dominance frontiers and initialize live-in information data
@@ -2564,20 +2614,15 @@ update_ssa (bool insert_phi_p)
/* Next, determine the nearest common dominator START_BB for all the
blocks in the region. */
- if (need_to_update_vops_p || bitmap_empty_p (blocks))
+ if (!bitmap_empty_p (syms_to_rename) || bitmap_empty_p (blocks))
{
- /* If the region to update is seemingly empty, it means that all
- we found were virtual uses for which we now need to
- reconstruct their FUD chains. For now just start at the top
- of the CFG.
-
- A similar problem occurs when we need to update virtual
- operands.
-
- FIXME, it would be more efficient to determine the nearest
- dominator that had a definition for the symbols we are
- updating (for that, mark_sym_for_renaming should also
- register where the VUSE was found). */
+ /* If the region to update is seemingly empty, or if we have to
+ rename some symbols from scratch, we need to start the
+ process at the root of the CFG.
+
+ FIXME, it should be possible to determine the nearest block
+ that had a definition for each of the symbols that are marked
+ for updating. For now this seems more work than it's worth. */
start_bb = ENTRY_BLOCK_PTR;
}
else
@@ -2617,10 +2662,8 @@ update_ssa (bool insert_phi_p)
sbitmap_free (tmp);
}
- if (need_to_update_vops_p)
- EXECUTE_IF_SET_IN_BITMAP (syms_to_rename, 0, i, bi)
- insert_updated_phi_nodes_for (referenced_var (i), dfs,
- blocks);
+ EXECUTE_IF_SET_IN_BITMAP (syms_to_rename, 0, i, bi)
+ insert_updated_phi_nodes_for (referenced_var (i), dfs, blocks);
/* Insertion of PHI nodes may have added blocks to the region.
We need to re-compute START_BB to include the newly added
@@ -2634,9 +2677,8 @@ update_ssa (bool insert_phi_p)
EXECUTE_IF_SET_IN_SBITMAP (old_ssa_names, 0, i,
set_current_def (ssa_name (i), ssa_name (i)));
- if (need_to_update_vops_p)
- EXECUTE_IF_SET_IN_BITMAP (syms_to_rename, 0, i, bi)
- set_current_def (referenced_var (i), NULL_TREE);
+ EXECUTE_IF_SET_IN_BITMAP (syms_to_rename, 0, i, bi)
+ set_current_def (referenced_var (i), NULL_TREE);
/* Now start the renaming process at START_BB. */
tmp = sbitmap_alloc (last_basic_block);
diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c
index 145c7213158..b588f2d1272 100644
--- a/gcc/tree-profile.c
+++ b/gcc/tree-profile.c
@@ -1,6 +1,6 @@
/* Calculate branch probabilities, and basic block execution counts.
Copyright (C) 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
Contributed by James E. Wilson, UC Berkeley/Cygnus Support;
based on some ideas from Dain Samples of UC Berkeley.
Further mangling by Bob Manson, Cygnus Support.
@@ -24,30 +24,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
/* Generate basic block profile instrumentation and auxiliary files.
- Profile generation is optimized, so that not all arcs in the basic
- block graph need instrumenting. First, the BB graph is closed with
- one entry (function start), and one exit (function exit). Any
- ABNORMAL_EDGE cannot be instrumented (because there is no control
- path to place the code). We close the graph by inserting fake
- EDGE_FAKE edges to the EXIT_BLOCK, from the sources of abnormal
- edges that do not go to the exit_block. We ignore such abnormal
- edges. Naturally these fake edges are never directly traversed,
- and so *cannot* be directly instrumented. Some other graph
- massaging is done. To optimize the instrumentation we generate the
- BB minimal span tree, only edges that are not on the span tree
- (plus the entry point) need instrumenting. From that information
- all other edge counts can be deduced. By construction all fake
- edges must be on the spanning tree. We also attempt to place
- EDGE_CRITICAL edges on the spanning tree.
-
- The auxiliary file generated is <dumpbase>.bbg. The format is
- described in full in gcov-io.h. */
-
-/* ??? Register allocation should use basic block execution counts to
- give preference to the most commonly executed blocks. */
-
-/* ??? Should calculate branch probabilities before instrumenting code, since
- then we can use arc counts to help decide which arcs to instrument. */
+ Tree-based version. See profile.c for overview. */
#include "config.h"
#include "system.h"
@@ -102,15 +79,163 @@ tree_gen_edge_profiler (int edgeno, edge e)
tag of the section for counters, BASE is offset of the counter position. */
static void
-tree_gen_interval_profiler (histogram_value value ATTRIBUTE_UNUSED,
- unsigned tag ATTRIBUTE_UNUSED,
- unsigned base ATTRIBUTE_UNUSED)
+tree_gen_interval_profiler (histogram_value value, unsigned tag, unsigned base)
{
- /* FIXME implement this. */
-#ifdef ENABLE_CHECKING
- internal_error ("unimplemented functionality");
-#endif
- gcc_unreachable ();
+ tree op, op1, op2, op1copy, op2copy;
+ tree tmp1, tmp2, tmp3, val, index;
+ tree label_decl2, label_decl3, label_decl4, label_decl5, label_decl6;
+ edge e12, e23, e34, e45, e56;
+ tree label2, label3, label4, label5, label6;
+ tree stmt1, stmt2, stmt3, stmt4;
+ /* Initializations are to prevent bogus uninitialized warnings. */
+ tree bb1end = NULL_TREE, bb2end = NULL_TREE, bb3end = NULL_TREE;
+ tree bb4end = NULL_TREE, bb5end = NULL_TREE;
+ tree ref = tree_coverage_counter_ref (tag, base), ref2;
+ basic_block bb2, bb3, bb4, bb5, bb6;
+ tree stmt = value->hvalue.tree.stmt;
+ block_stmt_iterator bsi = bsi_for_stmt (stmt);
+ basic_block bb = bb_for_stmt (stmt);
+ tree optype;
+
+ op = stmt;
+ if (TREE_CODE (stmt) == RETURN_EXPR
+ && TREE_OPERAND (stmt, 0)
+ && TREE_CODE (TREE_OPERAND (stmt, 0)) == MODIFY_EXPR)
+ op = TREE_OPERAND (stmt, 0);
+ /* op == MODIFY_EXPR */
+ op = TREE_OPERAND (op, 1);
+ /* op == TRUNC_DIV or TRUNC_MOD */
+ op1 = TREE_OPERAND (op, 0);
+ op2 = TREE_OPERAND (op, 1);
+ optype = TREE_TYPE (op);
+
+ /* Blocks:
+ Original = 1
+ For 2nd compare = 2
+ Normal case, neither more nor less = 3
+ More = 4
+ Less = 5
+ End = 6 */
+ label_decl2 = create_artificial_label ();
+ label_decl3 = create_artificial_label ();
+ label_decl4 = create_artificial_label ();
+ label_decl5 = create_artificial_label ();
+ label_decl6 = create_artificial_label ();
+
+ /* Do not evaluate op1 or op2 more than once. Probably
+ volatile loads are the only things that could cause
+ a problem, but this is harmless in any case. */
+ op1copy = create_tmp_var (optype, "PROF");
+ op2copy = create_tmp_var (optype, "PROF");
+ stmt1 = build2 (MODIFY_EXPR, optype, op1copy, op1);
+ stmt2 = build2 (MODIFY_EXPR, optype, op2copy, op2);
+ TREE_OPERAND (op, 0) = op1copy;
+ TREE_OPERAND (op, 1) = op2copy;
+
+ val = create_tmp_var (optype, "PROF");
+ stmt3 = build2 (MODIFY_EXPR, optype, val,
+ build2 (TRUNC_DIV_EXPR, optype, op1copy, op2copy));
+ stmt4 = build2 (MODIFY_EXPR, optype, val,
+ build2 (MINUS_EXPR, optype, val,
+ build_int_cst (optype, value->hdata.intvl.int_start)));
+ bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt2, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt3, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt4, BSI_SAME_STMT);
+
+ index = create_tmp_var (GCOV_TYPE_NODE, "PROF");
+
+ /* Check for too big. */
+ stmt1 = build3 (COND_EXPR, void_type_node,
+ build2 (GE_EXPR, boolean_type_node, val,
+ build_int_cst (optype, value->hdata.intvl.steps)),
+ build1 (GOTO_EXPR, void_type_node, label_decl4),
+ build1 (GOTO_EXPR, void_type_node, label_decl2));
+ bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT);
+ bb1end = stmt1;
+
+ /* Check for too small. */
+ label2 = build1 (LABEL_EXPR, void_type_node, label_decl2);
+ bsi_insert_before (&bsi, label2, BSI_SAME_STMT);
+ stmt1 = build3 (COND_EXPR, void_type_node,
+ build2 (LT_EXPR, boolean_type_node, val, integer_zero_node),
+ build1 (GOTO_EXPR, void_type_node, label_decl5),
+ build1 (GOTO_EXPR, void_type_node, label_decl3));
+ bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT);
+ bb2end = stmt1;
+
+ /* Normal case, within range. */
+ label3 = build1 (LABEL_EXPR, void_type_node, label_decl3);
+ bsi_insert_before (&bsi, label3, BSI_SAME_STMT);
+ stmt1 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, index,
+ build1 (NOP_EXPR, GCOV_TYPE_NODE, val));
+ bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT);
+ bb3end = stmt1;
+
+ /* Too big */
+ label4 = build1 (LABEL_EXPR, void_type_node, label_decl4);
+ stmt1 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, index,
+ build_int_cst (GCOV_TYPE_NODE, value->hdata.intvl.steps));
+ bsi_insert_before (&bsi, label4, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT);
+ bb4end = stmt1;
+
+ /* Too small */
+ label5 = build1 (LABEL_EXPR, void_type_node, label_decl5);
+ stmt1 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, index,
+ build_int_cst (GCOV_TYPE_NODE, value->hdata.intvl.steps + 1));
+ bsi_insert_before (&bsi, label5, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT);
+ bb5end = stmt1;
+
+ /* Increment appropriate counter. */
+ label6 = build1 (LABEL_EXPR, void_type_node, label_decl6);
+ bsi_insert_before (&bsi, label6, BSI_SAME_STMT);
+
+ tmp1 = create_tmp_var (GCOV_TYPE_NODE, "PROF");
+ tmp2 = create_tmp_var (GCOV_TYPE_NODE, "PROF");
+ tmp3 = create_tmp_var (GCOV_TYPE_NODE, "PROF");
+ stmt1 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, tmp1,
+ build2 (PLUS_EXPR, GCOV_TYPE_NODE, index,
+ TREE_OPERAND (ref, 1)));
+ TREE_OPERAND (ref, 1) = tmp1;
+ /* Make a copy to avoid sharing complaints. */
+ ref2 = build4 (ARRAY_REF, TREE_TYPE (ref), TREE_OPERAND (ref, 0),
+ TREE_OPERAND (ref, 1), TREE_OPERAND (ref, 2),
+ TREE_OPERAND (ref, 3));
+
+ stmt2 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, tmp2, ref);
+ stmt3 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, tmp3,
+ build2 (PLUS_EXPR, GCOV_TYPE_NODE, tmp2, integer_one_node));
+ stmt4 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, ref2, tmp3);
+ bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt2, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt3, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt4, BSI_SAME_STMT);
+
+ /* Now fix up the CFG. */
+ /* 1->2,4; 2->3,5; 3->6; 4->6; 5->6 */
+ e12 = split_block (bb, bb1end);
+ bb2 = e12->dest;
+ e23 = split_block (bb2, bb2end);
+ bb3 = e23->dest;
+ e34 = split_block (bb3, bb3end);
+ bb4 = e34->dest;
+ e45 = split_block (bb4, bb4end);
+ bb5 = e45->dest;
+ e56 = split_block (bb5, bb5end);
+ bb6 = e56->dest;
+
+ e12->flags &= ~EDGE_FALLTHRU;
+ e12->flags |= EDGE_FALSE_VALUE;
+ make_edge (bb, bb4, EDGE_TRUE_VALUE);
+ e23->flags &= ~EDGE_FALLTHRU;
+ e23->flags |= EDGE_FALSE_VALUE;
+ make_edge (bb2, bb5, EDGE_TRUE_VALUE);
+ remove_edge (e34);
+ make_edge (bb3, bb6, EDGE_FALLTHRU);
+ remove_edge (e45);
+ make_edge (bb4, bb6, EDGE_FALLTHRU);
}
/* Output instructions as GIMPLE trees to increment the power of two histogram
@@ -118,15 +243,162 @@ tree_gen_interval_profiler (histogram_value value ATTRIBUTE_UNUSED,
of the section for counters, BASE is offset of the counter position. */
static void
-tree_gen_pow2_profiler (histogram_value value ATTRIBUTE_UNUSED,
- unsigned tag ATTRIBUTE_UNUSED,
- unsigned base ATTRIBUTE_UNUSED)
+tree_gen_pow2_profiler (histogram_value value, unsigned tag, unsigned base)
{
- /* FIXME implement this. */
-#ifdef ENABLE_CHECKING
- internal_error ("unimplemented functionality");
-#endif
- gcc_unreachable ();
+ tree op;
+ tree tmp1, tmp2, tmp3;
+ tree index, denom;
+ tree label_decl1 = create_artificial_label ();
+ tree label_decl2 = create_artificial_label ();
+ tree label_decl3 = create_artificial_label ();
+ tree label1, label2, label3;
+ tree stmt1, stmt2, stmt3, stmt4;
+ tree bb1end, bb2end, bb3end;
+ tree ref = tree_coverage_counter_ref (tag, base), ref2;
+ basic_block bb2, bb3, bb4;
+ tree stmt = value->hvalue.tree.stmt;
+ block_stmt_iterator bsi = bsi_for_stmt (stmt);
+ basic_block bb = bb_for_stmt (stmt);
+ tree optype, optypesigned, optypeunsigned;
+
+ op = stmt;
+ if (TREE_CODE (stmt) == RETURN_EXPR
+ && TREE_OPERAND (stmt, 0)
+ && TREE_CODE (TREE_OPERAND (stmt, 0)) == MODIFY_EXPR)
+ op = TREE_OPERAND (stmt, 0);
+ /* op == MODIFY_EXPR */
+ op = TREE_OPERAND (op, 1);
+ /* op == TRUNC_DIV or TRUNC_MOD */
+ op = TREE_OPERAND (op, 1);
+ /* op == denominator */
+ optype = TREE_TYPE (op);
+ if (TYPE_UNSIGNED (optype))
+ {
+ /* Right shift must be unsigned. */
+ optypeunsigned = optype;
+ optypesigned = build_distinct_type_copy (optype);
+ TYPE_UNSIGNED (optypesigned) = false;
+ }
+ else
+ {
+ /* Compare to zero must be signed. */
+ optypesigned = optype;
+ optypeunsigned = build_distinct_type_copy (optype);
+ TYPE_UNSIGNED (optypeunsigned) = true;
+ }
+
+ /* Set up variables and check if denominator is negative when considered
+ as signed. */
+ index = create_tmp_var (GCOV_TYPE_NODE, "PROF");
+ denom = create_tmp_var (optype, "PROF");
+ stmt1 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, index, integer_zero_node);
+ stmt2 = build2 (MODIFY_EXPR, optype, denom, op);
+ if (optypesigned == optype)
+ {
+ tmp1 = denom;
+ stmt3 = NULL_TREE;
+ }
+ else
+ {
+ tmp1 = create_tmp_var (optypesigned, "PROF");
+ stmt3 = build2 (MODIFY_EXPR, optypesigned, tmp1,
+ build1 (NOP_EXPR, optypesigned, denom));
+ }
+ stmt4 = build3 (COND_EXPR, void_type_node,
+ build2 (LE_EXPR, boolean_type_node, tmp1, integer_zero_node),
+ build1 (GOTO_EXPR, void_type_node, label_decl3),
+ build1 (GOTO_EXPR, void_type_node, label_decl1));
+ bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt2, BSI_SAME_STMT);
+ if (stmt3)
+ bsi_insert_before (&bsi, stmt3, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt4, BSI_SAME_STMT);
+ bb1end = stmt4;
+
+ /* Nonnegative. Check if denominator is power of 2. */
+ label1 = build1 (LABEL_EXPR, void_type_node, label_decl1);
+ tmp1 = create_tmp_var (optype, "PROF");
+ tmp2 = create_tmp_var (optype, "PROF");
+ stmt1 = build2 (MODIFY_EXPR, optype, tmp1,
+ build2 (PLUS_EXPR, optype, denom, integer_minus_one_node));
+ stmt2 = build2 (MODIFY_EXPR, optype, tmp2,
+ build2 (BIT_AND_EXPR, optype, tmp1, denom));
+ stmt3 = build3 (COND_EXPR, void_type_node,
+ build2 (NE_EXPR, boolean_type_node, tmp2, integer_zero_node),
+ build1 (GOTO_EXPR, void_type_node, label_decl3),
+ build1 (GOTO_EXPR, void_type_node, label_decl2));
+ bsi_insert_before (&bsi, label1, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt2, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt3, BSI_SAME_STMT);
+ bb2end = stmt3;
+
+ /* Loop. Increment index, shift denominator, repeat if denominator nonzero. */
+ label2 = build1 (LABEL_EXPR, void_type_node, label_decl2);
+ stmt1 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, index,
+ build2 (PLUS_EXPR, GCOV_TYPE_NODE, index, integer_one_node));
+ if (optypeunsigned == optype)
+ {
+ tmp1 = denom;
+ stmt2 = NULL_TREE;
+ }
+ else
+ {
+ tmp1 = create_tmp_var (optypeunsigned, "PROF");
+ stmt2 = build2 (MODIFY_EXPR, optypeunsigned, tmp1,
+ build1 (NOP_EXPR, optypeunsigned, denom));
+ }
+ stmt3 = build2 (MODIFY_EXPR, optype, denom,
+ build2 (RSHIFT_EXPR, optype, tmp1, integer_one_node));
+ stmt4 = build3 (COND_EXPR, void_type_node,
+ build2 (NE_EXPR, boolean_type_node, denom, integer_zero_node),
+ build1 (GOTO_EXPR, void_type_node, label_decl2),
+ build1 (GOTO_EXPR, void_type_node, label_decl3));
+ bsi_insert_before (&bsi, label2, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT);
+ if (stmt2)
+ bsi_insert_before (&bsi, stmt2, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt3, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt4, BSI_SAME_STMT);
+ bb3end = stmt4;
+
+ /* Increment the appropriate counter. */
+ label3 = build1 (LABEL_EXPR, void_type_node, label_decl3);
+ tmp1 = create_tmp_var (GCOV_TYPE_NODE, "PROF");
+ tmp2 = create_tmp_var (GCOV_TYPE_NODE, "PROF");
+ tmp3 = create_tmp_var (GCOV_TYPE_NODE, "PROF");
+ stmt1 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, tmp1,
+ build2 (PLUS_EXPR, GCOV_TYPE_NODE, index, TREE_OPERAND (ref, 1)));
+ TREE_OPERAND (ref, 1) = tmp1;
+ /* Make a copy to avoid sharing complaints. */
+ ref2 = build4 (ARRAY_REF, TREE_TYPE (ref), TREE_OPERAND (ref, 0),
+ TREE_OPERAND (ref, 1), TREE_OPERAND (ref, 2), TREE_OPERAND (ref, 3));
+ stmt2 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, tmp2, ref);
+ stmt3 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, tmp3,
+ build2 (PLUS_EXPR, GCOV_TYPE_NODE, tmp2, integer_one_node));
+ stmt4 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, ref2, tmp3);
+ bsi_insert_before (&bsi, label3, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt2, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt3, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt4, BSI_SAME_STMT);
+
+ /* Now fix up the CFG. */
+ bb2 = (split_block (bb, bb1end))->dest;
+ bb3 = (split_block (bb2, bb2end))->dest;
+ bb4 = (split_block (bb3, bb3end))->dest;
+
+ EDGE_SUCC (bb, 0)->flags &= ~EDGE_FALLTHRU;
+ EDGE_SUCC (bb, 0)->flags |= EDGE_FALSE_VALUE;
+ make_edge (bb, bb4, EDGE_TRUE_VALUE);
+
+ EDGE_SUCC (bb2, 0)->flags &= ~EDGE_FALLTHRU;
+ EDGE_SUCC (bb2, 0)->flags |= EDGE_FALSE_VALUE;
+ make_edge (bb2, bb4, EDGE_TRUE_VALUE);
+
+ EDGE_SUCC (bb3, 0)->flags &= ~EDGE_FALLTHRU;
+ EDGE_SUCC (bb3, 0)->flags |= EDGE_FALSE_VALUE;
+ make_edge (bb3, bb3, EDGE_TRUE_VALUE);
}
/* Output instructions as GIMPLE trees for code to find the most common value.
@@ -134,15 +406,150 @@ tree_gen_pow2_profiler (histogram_value value ATTRIBUTE_UNUSED,
section for counters, BASE is offset of the counter position. */
static void
-tree_gen_one_value_profiler (histogram_value value ATTRIBUTE_UNUSED,
- unsigned tag ATTRIBUTE_UNUSED,
- unsigned base ATTRIBUTE_UNUSED)
+tree_gen_one_value_profiler (histogram_value value, unsigned tag, unsigned base)
{
- /* FIXME implement this. */
-#ifdef ENABLE_CHECKING
- internal_error ("unimplemented functionality");
-#endif
- gcc_unreachable ();
+ tree op;
+ tree tmp1, tmp2, tmp3;
+ tree label_decl1 = create_artificial_label ();
+ tree label_decl2 = create_artificial_label ();
+ tree label_decl3 = create_artificial_label ();
+ tree label_decl4 = create_artificial_label ();
+ tree label_decl5 = create_artificial_label ();
+ tree label1, label2, label3, label4, label5;
+ tree stmt1, stmt2, stmt3, stmt4;
+ tree bb1end, bb2end, bb3end, bb4end, bb5end;
+ tree ref1 = tree_coverage_counter_ref (tag, base);
+ tree ref2 = tree_coverage_counter_ref (tag, base + 1);
+ tree ref3 = tree_coverage_counter_ref (tag, base + 2);
+ basic_block bb2, bb3, bb4, bb5, bb6;
+ tree stmt = value->hvalue.tree.stmt;
+ block_stmt_iterator bsi = bsi_for_stmt (stmt);
+ basic_block bb = bb_for_stmt (stmt);
+ tree optype;
+
+ op = stmt;
+ if (TREE_CODE (stmt) == RETURN_EXPR
+ && TREE_OPERAND (stmt, 0)
+ && TREE_CODE (TREE_OPERAND (stmt, 0)) == MODIFY_EXPR)
+ op = TREE_OPERAND (stmt, 0);
+ /* op == MODIFY_EXPR */
+ op = TREE_OPERAND (op, 1);
+ /* op == TRUNC_DIV or TRUNC_MOD */
+ op = TREE_OPERAND (op, 1);
+ /* op == denominator */
+ optype = TREE_TYPE (op);
+
+ /* Check if the stored value matches. */
+ tmp1 = create_tmp_var (GCOV_TYPE_NODE, "PROF");
+ tmp2 = create_tmp_var (optype, "PROF");
+ tmp3 = create_tmp_var (optype, "PROF");
+ stmt1 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, tmp1, ref1);
+ stmt2 = build2 (MODIFY_EXPR, optype, tmp2,
+ build1 (NOP_EXPR, optype, tmp1));
+ stmt3 = build2 (MODIFY_EXPR, optype, tmp3, op);
+ stmt4 = build3 (COND_EXPR, void_type_node,
+ build2 (EQ_EXPR, boolean_type_node, tmp2, tmp3),
+ build1 (GOTO_EXPR, void_type_node, label_decl4),
+ build1 (GOTO_EXPR, void_type_node, label_decl1));
+ bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt2, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt3, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt4, BSI_SAME_STMT);
+ bb1end = stmt4;
+
+ /* Does not match; check whether the counter is zero. */
+ label1 = build1 (LABEL_EXPR, void_type_node, label_decl1);
+ tmp1 = create_tmp_var (GCOV_TYPE_NODE, "PROF");
+ stmt1 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, tmp1, ref2);
+ stmt2 = build3 (COND_EXPR, void_type_node,
+ build2 (EQ_EXPR, boolean_type_node, tmp1, integer_zero_node),
+ build1 (GOTO_EXPR, void_type_node, label_decl3),
+ build1 (GOTO_EXPR, void_type_node, label_decl2));
+ bsi_insert_before (&bsi, label1, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt2, BSI_SAME_STMT);
+ bb2end = stmt2;
+
+ /* Counter is not zero yet, decrement. */
+ label2 = build1 (LABEL_EXPR, void_type_node, label_decl2);
+ tmp1 = create_tmp_var (GCOV_TYPE_NODE, "PROF");
+ tmp2 = create_tmp_var (GCOV_TYPE_NODE, "PROF");
+ stmt1 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, tmp1, ref2);
+ stmt2 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, tmp2,
+ build (MINUS_EXPR, GCOV_TYPE_NODE,
+ tmp1, integer_one_node));
+ stmt3 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, ref2, tmp2);
+ bsi_insert_before (&bsi, label2, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt2, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt3, BSI_SAME_STMT);
+ bb3end = stmt3;
+
+ /* Counter was zero, store new value. */
+ label3 = build1 (LABEL_EXPR, void_type_node, label_decl3);
+ tmp1 = create_tmp_var (optype, "PROF");
+ tmp2 = create_tmp_var (GCOV_TYPE_NODE, "PROF");
+ stmt1 = build2 (MODIFY_EXPR, optype, tmp1, op);
+ stmt2 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, tmp2,
+ build1 (NOP_EXPR, GCOV_TYPE_NODE, tmp1));
+ stmt3 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, ref1, tmp2);
+ bsi_insert_before (&bsi, label3, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt2, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt3, BSI_SAME_STMT);
+ bb4end = stmt3;
+ /* (fall through) */
+
+ /* Increment counter. */
+ label4 = build1 (LABEL_EXPR, void_type_node, label_decl4);
+ tmp1 = create_tmp_var (GCOV_TYPE_NODE, "PROF");
+ tmp2 = create_tmp_var (GCOV_TYPE_NODE, "PROF");
+ stmt1 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, tmp1, ref2);
+ stmt2 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, tmp2,
+ build (PLUS_EXPR, GCOV_TYPE_NODE,
+ tmp1, integer_one_node));
+ stmt3 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, ref2, tmp2);
+ bsi_insert_before (&bsi, label4, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt2, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt3, BSI_SAME_STMT);
+ bb5end = stmt3;
+
+ /* Increment the counter of all executions; this seems redundant given
+ that we have counts for edges in cfg, but it may happen that some
+ optimization will change the counts for the block (either because
+ it is unable to update them correctly, or because it will duplicate
+ the block or its part). */
+ label5 = build1 (LABEL_EXPR, void_type_node, label_decl5);
+ tmp1 = create_tmp_var (GCOV_TYPE_NODE, "PROF");
+ tmp2 = create_tmp_var (GCOV_TYPE_NODE, "PROF");
+ stmt1 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, tmp1, ref3);
+ stmt2 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, tmp2,
+ build (PLUS_EXPR, GCOV_TYPE_NODE,
+ tmp1, integer_one_node));
+ stmt3 = build2 (MODIFY_EXPR, GCOV_TYPE_NODE, ref3, tmp2);
+ bsi_insert_before (&bsi, label5, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt2, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt3, BSI_SAME_STMT);
+
+ /* Now fix up the CFG. */
+ bb2 = (split_block (bb, bb1end))->dest;
+ bb3 = (split_block (bb2, bb2end))->dest;
+ bb4 = (split_block (bb3, bb3end))->dest;
+ bb5 = (split_block (bb4, bb4end))->dest;
+ bb6 = (split_block (bb5, bb5end))->dest;
+
+ EDGE_SUCC (bb, 0)->flags &= ~EDGE_FALLTHRU;
+ EDGE_SUCC (bb, 0)->flags |= EDGE_FALSE_VALUE;
+ make_edge (bb, bb5, EDGE_TRUE_VALUE);
+
+ EDGE_SUCC (bb2, 0)->flags &= ~EDGE_FALLTHRU;
+ EDGE_SUCC (bb2, 0)->flags |= EDGE_FALSE_VALUE;
+ make_edge (bb2, bb4, EDGE_TRUE_VALUE);
+
+ remove_edge (EDGE_SUCC (bb3, 0));
+ make_edge (bb3, bb6, EDGE_FALLTHRU);
}
/* Output instructions as GIMPLE trees for code to find the most common value
@@ -166,7 +573,8 @@ tree_gen_const_delta_profiler (histogram_value value ATTRIBUTE_UNUSED,
If it is, set up hooks for tree-based profiling.
Gate for pass_tree_profile. */
-static bool do_tree_profiling (void)
+static bool
+do_tree_profiling (void)
{
if (flag_tree_based_profiling
&& (profile_arc_flag || flag_test_coverage || flag_branch_probabilities))
@@ -184,11 +592,26 @@ static FILE *tree_profile_dump_file (void) {
return dump_file;
}
+static void
+tree_profiling (void)
+{
+ branch_prob ();
+ if (flag_branch_probabilities
+ && flag_profile_values
+ && flag_value_profile_transformations)
+ value_profile_transformations ();
+ /* The above could hose dominator info. Currently there is
+ none coming in, this is a safety valve. It should be
+ easy to adjust it, if and when there is some. */
+ free_dominance_info (CDI_DOMINATORS);
+ free_dominance_info (CDI_POST_DOMINATORS);
+}
+
struct tree_opt_pass pass_tree_profile =
{
"tree_profile", /* name */
do_tree_profiling, /* gate */
- branch_prob, /* execute */
+ tree_profiling, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index e17295d8236..56d1aa5ba96 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -1659,10 +1659,31 @@ generate_element_init_1 (struct sra_elt *elt, tree init, tree *list_p)
case CONSTRUCTOR:
for (t = CONSTRUCTOR_ELTS (init); t ; t = TREE_CHAIN (t))
{
- sub = lookup_element (elt, TREE_PURPOSE (t), NULL, NO_INSERT);
- if (sub == NULL)
- continue;
- result &= generate_element_init_1 (sub, TREE_VALUE (t), list_p);
+ tree purpose = TREE_PURPOSE (t);
+ tree value = TREE_VALUE (t);
+
+ if (TREE_CODE (purpose) == RANGE_EXPR)
+ {
+ tree lower = TREE_OPERAND (purpose, 0);
+ tree upper = TREE_OPERAND (purpose, 1);
+
+ while (1)
+ {
+ sub = lookup_element (elt, lower, NULL, NO_INSERT);
+ if (sub != NULL)
+ result &= generate_element_init_1 (sub, value, list_p);
+ if (tree_int_cst_equal (lower, upper))
+ break;
+ lower = int_const_binop (PLUS_EXPR, lower,
+ integer_one_node, true);
+ }
+ }
+ else
+ {
+ sub = lookup_element (elt, purpose, NULL, NO_INSERT);
+ if (sub != NULL)
+ result &= generate_element_init_1 (sub, value, list_p);
+ }
}
break;
diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c
index 34a8a35b9f8..325bc351b9b 100644
--- a/gcc/tree-ssa-dom.c
+++ b/gcc/tree-ssa-dom.c
@@ -2791,24 +2791,7 @@ record_equivalences_from_stmt (tree stmt,
|| is_gimple_min_invariant (rhs)))
SSA_NAME_VALUE (lhs) = rhs;
- /* alloca never returns zero and the address of a non-weak symbol
- is never zero. NOP_EXPRs and CONVERT_EXPRs can be completely
- stripped as they do not affect this equivalence. */
- while (TREE_CODE (rhs) == NOP_EXPR
- || TREE_CODE (rhs) == CONVERT_EXPR)
- rhs = TREE_OPERAND (rhs, 0);
-
- if (alloca_call_p (rhs)
- || (TREE_CODE (rhs) == ADDR_EXPR
- && DECL_P (TREE_OPERAND (rhs, 0))
- && ! DECL_WEAK (TREE_OPERAND (rhs, 0))))
- record_var_is_nonzero (lhs);
-
- /* IOR of any value with a nonzero value will result in a nonzero
- value. Even if we do not know the exact result recording that
- the result is nonzero is worth the effort. */
- if (TREE_CODE (rhs) == BIT_IOR_EXPR
- && integer_nonzerop (TREE_OPERAND (rhs, 1)))
+ if (expr_computes_nonzero (rhs))
record_var_is_nonzero (lhs);
}
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c
index 5b2354610da..106004b83c4 100644
--- a/gcc/tree-ssa-loop-ivopts.c
+++ b/gcc/tree-ssa-loop-ivopts.c
@@ -3681,8 +3681,11 @@ determine_iv_cost (struct ivopts_data *data, struct iv_cand *cand)
cand->cost = cost_step + cost_base / AVG_LOOP_NITER (current_loop);
- /* Prefer the original iv unless we may gain something by replacing it. */
- if (cand->pos == IP_ORIGINAL)
+ /* Prefer the original iv unless we may gain something by replacing it;
+ this is not really relevant for artificial ivs created by other
+ passes. */
+ if (cand->pos == IP_ORIGINAL
+ && !DECL_ARTIFICIAL (SSA_NAME_VAR (cand->var_before)))
cand->cost--;
/* Prefer not to insert statements into latch unless there are some
diff --git a/gcc/tree-ssa-operands.c b/gcc/tree-ssa-operands.c
index d39820b5ade..246c3d97991 100644
--- a/gcc/tree-ssa-operands.c
+++ b/gcc/tree-ssa-operands.c
@@ -1884,6 +1884,48 @@ add_call_read_ops (tree stmt)
ssa_ro_call_cache_valid = true;
}
+/* Copies virtual operands from SRC to DST. */
+
+void
+copy_virtual_operands (tree dst, tree src)
+{
+ unsigned i;
+ vuse_optype vuses = STMT_VUSE_OPS (src);
+ v_may_def_optype v_may_defs = STMT_V_MAY_DEF_OPS (src);
+ v_must_def_optype v_must_defs = STMT_V_MUST_DEF_OPS (src);
+ vuse_optype *vuses_new = &stmt_ann (dst)->operands.vuse_ops;
+ v_may_def_optype *v_may_defs_new = &stmt_ann (dst)->operands.v_may_def_ops;
+ v_must_def_optype *v_must_defs_new = &stmt_ann (dst)->operands.v_must_def_ops;
+
+ if (vuses)
+ {
+ *vuses_new = allocate_vuse_optype (NUM_VUSES (vuses));
+ for (i = 0; i < NUM_VUSES (vuses); i++)
+ SET_VUSE_OP (*vuses_new, i, VUSE_OP (vuses, i));
+ }
+
+ if (v_may_defs)
+ {
+ *v_may_defs_new = allocate_v_may_def_optype (NUM_V_MAY_DEFS (v_may_defs));
+ for (i = 0; i < NUM_V_MAY_DEFS (v_may_defs); i++)
+ {
+ SET_V_MAY_DEF_OP (*v_may_defs_new, i, V_MAY_DEF_OP (v_may_defs, i));
+ SET_V_MAY_DEF_RESULT (*v_may_defs_new, i,
+ V_MAY_DEF_RESULT (v_may_defs, i));
+ }
+ }
+
+ if (v_must_defs)
+ {
+ *v_must_defs_new = allocate_v_must_def_optype (NUM_V_MUST_DEFS (v_must_defs));
+ for (i = 0; i < NUM_V_MUST_DEFS (v_must_defs); i++)
+ {
+ SET_V_MUST_DEF_RESULT (*v_must_defs_new, i, V_MUST_DEF_RESULT (v_must_defs, i));
+ SET_V_MUST_DEF_KILL (*v_must_defs_new, i, V_MUST_DEF_KILL (v_must_defs, i));
+ }
+ }
+}
+
/* Specifically for use in DOM's expression analysis. Given a store, we
create an artificial stmt which looks like a load from the store, this can
diff --git a/gcc/tree-ssa-operands.h b/gcc/tree-ssa-operands.h
index 4a5d3568db3..92d10fd8521 100644
--- a/gcc/tree-ssa-operands.h
+++ b/gcc/tree-ssa-operands.h
@@ -183,6 +183,7 @@ typedef stmt_operands_t *stmt_operands_p;
extern void init_ssa_operands (void);
extern void fini_ssa_operands (void);
extern void get_stmt_operands (tree);
+extern void copy_virtual_operands (tree, tree);
extern void create_ssa_artficial_load_stmt (stmt_operands_p, tree);
extern bool ssa_call_clobbered_cache_valid;
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index 489f9cf50e9..a3f6e53cc20 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -1680,7 +1680,7 @@ insert_aux (basic_block block)
/* If all edges produce the same value and that value is
an invariant, then the PHI has the same value on all
edges. Note this. */
- else if (all_same && eprime
+ else if (!cant_insert && all_same && eprime
&& is_gimple_min_invariant (eprime)
&& !is_gimple_min_invariant (val))
{
diff --git a/gcc/tree-ssanames.c b/gcc/tree-ssanames.c
index 656bfac1948..df292d32150 100644
--- a/gcc/tree-ssanames.c
+++ b/gcc/tree-ssanames.c
@@ -228,22 +228,38 @@ duplicate_ssa_name (tree name, tree stmt)
{
tree new_name = make_ssa_name (SSA_NAME_VAR (name), stmt);
struct ptr_info_def *old_ptr_info = SSA_NAME_PTR_INFO (name);
+
+ if (old_ptr_info)
+ duplicate_ssa_name_ptr_info (new_name, old_ptr_info);
+
+ return new_name;
+}
+
+
+/* Creates a duplicate of the ptr_info_def at PTR_INFO for use by
+ the ssa name NAME. */
+
+void
+duplicate_ssa_name_ptr_info (tree name, struct ptr_info_def *ptr_info)
+{
struct ptr_info_def *new_ptr_info;
- if (!old_ptr_info)
- return new_name;
+ gcc_assert (POINTER_TYPE_P (TREE_TYPE (name)));
+ gcc_assert (!SSA_NAME_PTR_INFO (name));
+
+ if (!ptr_info)
+ return;
new_ptr_info = ggc_alloc (sizeof (struct ptr_info_def));
- *new_ptr_info = *old_ptr_info;
+ *new_ptr_info = *ptr_info;
- if (old_ptr_info->pt_vars)
+ if (ptr_info->pt_vars)
{
new_ptr_info->pt_vars = BITMAP_GGC_ALLOC ();
- bitmap_copy (new_ptr_info->pt_vars, old_ptr_info->pt_vars);
+ bitmap_copy (new_ptr_info->pt_vars, ptr_info->pt_vars);
}
- SSA_NAME_PTR_INFO (new_name) = new_ptr_info;
- return new_name;
+ SSA_NAME_PTR_INFO (name) = new_ptr_info;
}
diff --git a/gcc/tree-vect-analyze.c b/gcc/tree-vect-analyze.c
index dd9342a8136..97ad2314b65 100644
--- a/gcc/tree-vect-analyze.c
+++ b/gcc/tree-vect-analyze.c
@@ -71,7 +71,8 @@ static bool vect_base_addr_differ_p (struct data_reference *,
struct data_reference *drb, bool *);
static tree vect_object_analysis (tree, tree, bool, tree,
struct data_reference **, tree *, tree *,
- tree *, bool *, tree *, subvar_t *);
+ tree *, bool *, tree *, struct ptr_info_def **,
+ subvar_t *);
static tree vect_address_analysis (tree, tree, bool, tree,
struct data_reference *, tree *, tree *,
tree *, bool *);
@@ -1183,8 +1184,6 @@ vect_enhance_data_refs_alignment (loop_vec_info loop_vinfo)
}
DR_MISALIGNMENT (dr0) = 0;
- if (vect_print_dump_info (REPORT_ALIGNMENT, LOOP_LOC (loop_vinfo)))
- fprintf (vect_dump, "Alignment of access forced using peeling.");
}
}
@@ -1260,6 +1259,9 @@ vect_analyze_data_refs_alignment (loop_vec_info loop_vinfo)
&& (vect_print_dump_info (REPORT_ALIGNMENT, LOOP_LOC (loop_vinfo))))
fprintf (vect_dump, "Vectorizing an unaligned access.");
}
+ if (LOOP_VINFO_UNALIGNED_DR (loop_vinfo)
+ && vect_print_dump_info (REPORT_ALIGNMENT, LOOP_LOC (loop_vinfo)))
+ fprintf (vect_dump, "Alignment of access forced using peeling.");
return true;
}
@@ -1475,6 +1477,7 @@ vect_address_analysis (tree expr, tree stmt, bool is_read, tree vectype,
tree oprnd0, oprnd1, base_address, offset_expr, base_addr0, base_addr1;
tree address_offset = ssize_int (0), address_misalign = ssize_int (0);
tree dummy;
+ struct ptr_info_def *dummy1;
subvar_t dummy2;
switch (TREE_CODE (expr))
@@ -1528,7 +1531,7 @@ vect_address_analysis (tree expr, tree stmt, bool is_read, tree vectype,
base_address = vect_object_analysis (TREE_OPERAND (expr, 0), stmt,
is_read, vectype, &dr, offset,
misalign, step, base_aligned,
- &dummy, &dummy2);
+ &dummy, &dummy1, &dummy2);
return base_address;
case SSA_NAME:
@@ -1607,6 +1610,7 @@ vect_address_analysis (tree expr, tree stmt, bool is_read, tree vectype,
STEP - evolution of the DR_REF in the loop
BASE_ALIGNED - indicates if BASE is aligned
MEMTAG - memory tag for aliasing purposes
+ PTR_INFO - NULL or points-to aliasing info from a pointer SSA_NAME
SUBVAR - Sub-variables of the variable
If something unexpected is encountered (an unsupported form of data-ref),
@@ -1617,7 +1621,7 @@ vect_object_analysis (tree memref, tree stmt, bool is_read,
tree vectype, struct data_reference **dr,
tree *offset, tree *misalign, tree *step,
bool *base_aligned, tree *memtag,
- subvar_t *subvars)
+ struct ptr_info_def **ptr_info, subvar_t *subvars)
{
tree base = NULL_TREE, base_address = NULL_TREE;
tree object_offset = ssize_int (0), object_misalign = ssize_int (0);
@@ -1634,6 +1638,8 @@ vect_object_analysis (tree memref, tree stmt, bool is_read,
struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
struct data_reference *ptr_dr = NULL;
tree access_fn, evolution_part, address_to_analyze;
+
+ *ptr_info = NULL;
/* Part 1: */
/* Case 1. handled_component_p refs. */
@@ -1721,9 +1727,13 @@ vect_object_analysis (tree memref, tree stmt, bool is_read,
/* Part 1: Case 3. INDIRECT_REFs. */
else if (TREE_CODE (memref) == INDIRECT_REF)
- {
+ {
+ tree ptr_ref = TREE_OPERAND (memref, 0);
+ if (TREE_CODE (ptr_ref) == SSA_NAME)
+ *ptr_info = SSA_NAME_PTR_INFO (ptr_ref);
+
/* 3.1 get the access function. */
- access_fn = analyze_scalar_evolution (loop, TREE_OPERAND (memref, 0));
+ access_fn = analyze_scalar_evolution (loop, ptr_ref);
if (!access_fn)
{
if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS,
@@ -1848,7 +1858,7 @@ vect_object_analysis (tree memref, tree stmt, bool is_read,
Call get_inner_reference for refs handled in this function.
Call vect_addr_analysis(addr) to analyze pointer type expressions.
Set ref_stmt.base, ref_stmt.initial_offset, ref_stmt.alignment,
- ref_stmt.memtag and ref_stmt.step accordingly.
+ ref_stmt.memtag, ref_stmt.ptr_info and ref_stmt.step accordingly.
2- vect_analyze_dependences(): apply dependence testing using ref_stmt.DR
3- vect_analyze_drs_alignment(): check that ref_stmt.alignment is ok.
4- vect_analyze_drs_access(): check that ref_stmt.step is ok.
@@ -1886,6 +1896,7 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo)
tree memref = NULL;
tree scalar_type, vectype;
tree base, offset, misalign, step, tag;
+ struct ptr_info_def *ptr_info;
bool base_aligned;
subvar_t subvars = NULL;
@@ -1951,7 +1962,8 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo)
dr = NULL;
base = vect_object_analysis (memref, stmt, is_read, vectype, &dr,
&offset, &misalign, &step,
- &base_aligned, &tag, &subvars);
+ &base_aligned, &tag, &ptr_info,
+ &subvars);
if (!base)
{
if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS,
@@ -1968,6 +1980,7 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo)
STMT_VINFO_VECT_MISALIGNMENT (stmt_info) = misalign;
STMT_VINFO_VECT_BASE_ALIGNED_P (stmt_info) = base_aligned;
STMT_VINFO_MEMTAG (stmt_info) = tag;
+ STMT_VINFO_PTR_INFO (stmt_info) = ptr_info;
STMT_VINFO_SUBVARS (stmt_info) = subvars;
STMT_VINFO_VECTYPE (stmt_info) = vectype;
VARRAY_PUSH_GENERIC_PTR (*datarefs, dr);
diff --git a/gcc/tree-vect-transform.c b/gcc/tree-vect-transform.c
index 3810a8dbc7a..d023a259471 100644
--- a/gcc/tree-vect-transform.c
+++ b/gcc/tree-vect-transform.c
@@ -57,6 +57,7 @@ static tree vect_get_vec_def_for_operand (tree, tree);
static tree vect_init_vector (tree, tree);
static void vect_finish_stmt_generation
(tree stmt, tree vec_stmt, block_stmt_iterator *bsi);
+static void update_vuses_to_preheader (tree, struct loop*);
/* Utility function dealing with loop peeling (not peeling itself). */
static void vect_generate_tmps_on_preheader
@@ -304,11 +305,6 @@ vect_create_data_ref_ptr (tree stmt, block_stmt_iterator *bsi, tree offset,
tree vect_ptr_type;
tree vect_ptr;
tree tag;
- v_may_def_optype v_may_defs = STMT_V_MAY_DEF_OPS (stmt);
- v_must_def_optype v_must_defs = STMT_V_MUST_DEF_OPS (stmt);
- vuse_optype vuses = STMT_VUSE_OPS (stmt);
- int nvuses, nv_may_defs, nv_must_defs;
- int i;
tree new_temp;
tree vec_stmt;
tree new_stmt_list = NULL_TREE;
@@ -348,7 +344,8 @@ vect_create_data_ref_ptr (tree stmt, block_stmt_iterator *bsi, tree offset,
add_referenced_tmp_var (vect_ptr);
- /** (2) Handle aliasing information of the new vector-pointer: **/
+ /** (2) Add aliasing information to the new vector-pointer:
+ (The points-to info (SSA_NAME_PTR_INFO) may be defined later.) **/
tag = STMT_VINFO_MEMTAG (stmt_info);
gcc_assert (tag);
@@ -365,32 +362,6 @@ vect_create_data_ref_ptr (tree stmt, block_stmt_iterator *bsi, tree offset,
var_ann (vect_ptr)->subvars = STMT_VINFO_SUBVARS (stmt_info);
- /* Mark for renaming all aliased variables
- (i.e, the may-aliases of the type-mem-tag). */
- nvuses = NUM_VUSES (vuses);
- nv_may_defs = NUM_V_MAY_DEFS (v_may_defs);
- nv_must_defs = NUM_V_MUST_DEFS (v_must_defs);
-
- for (i = 0; i < nvuses; i++)
- {
- tree use = VUSE_OP (vuses, i);
- if (TREE_CODE (use) == SSA_NAME)
- mark_sym_for_renaming (SSA_NAME_VAR (use));
- }
- for (i = 0; i < nv_may_defs; i++)
- {
- tree def = V_MAY_DEF_RESULT (v_may_defs, i);
- if (TREE_CODE (def) == SSA_NAME)
- mark_sym_for_renaming (SSA_NAME_VAR (def));
- }
- for (i = 0; i < nv_must_defs; i++)
- {
- tree def = V_MUST_DEF_RESULT (v_must_defs, i);
- if (TREE_CODE (def) == SSA_NAME)
- mark_sym_for_renaming (SSA_NAME_VAR (def));
- }
-
-
/** (3) Calculate the initial address the vector-pointer, and set
the vector-pointer to point to it before the loop: **/
@@ -415,7 +386,13 @@ vect_create_data_ref_ptr (tree stmt, block_stmt_iterator *bsi, tree offset,
/** (4) Handle the updating of the vector-pointer inside the loop: **/
if (only_init) /* No update in loop is required. */
- return vect_ptr_init;
+ {
+ /* Copy the points-to information if it exists. */
+ if (STMT_VINFO_PTR_INFO (stmt_info))
+ duplicate_ssa_name_ptr_info (vect_ptr_init,
+ STMT_VINFO_PTR_INFO (stmt_info));
+ return vect_ptr_init;
+ }
idx = vect_create_index_for_vector_ref (loop_vinfo);
@@ -446,6 +423,9 @@ vect_create_data_ref_ptr (tree stmt, block_stmt_iterator *bsi, tree offset,
bsi_insert_before (bsi, vec_stmt, BSI_SAME_STMT);
data_ref_ptr = TREE_OPERAND (vec_stmt, 0);
+ /* Copy the points-to information if it exists. */
+ if (STMT_VINFO_PTR_INFO (stmt_info))
+ duplicate_ssa_name_ptr_info (data_ref_ptr, STMT_VINFO_PTR_INFO (stmt_info));
return data_ref_ptr;
}
@@ -875,6 +855,8 @@ vectorizable_store (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt)
enum machine_mode vec_mode;
tree dummy;
enum dr_alignment_support alignment_support_cheme;
+ v_may_def_optype v_may_defs;
+ int nv_may_defs, i;
/* Is vectorizable store? */
@@ -932,6 +914,20 @@ vectorizable_store (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt)
*vec_stmt = build2 (MODIFY_EXPR, vectype, data_ref, vec_oprnd1);
vect_finish_stmt_generation (stmt, *vec_stmt, bsi);
+ /* Copy the V_MAY_DEFS representing the aliasing of the original array
+ element's definition to the vector's definition then update the
+ defining statement. The original is being deleted so the same
+ SSA_NAMEs can be used. */
+ copy_virtual_operands (*vec_stmt, stmt);
+ v_may_defs = STMT_V_MAY_DEF_OPS (*vec_stmt);
+ nv_may_defs = NUM_V_MAY_DEFS (v_may_defs);
+
+ for (i = 0; i < nv_may_defs; i++)
+ {
+ tree ssa_name = V_MAY_DEF_RESULT (v_may_defs, i);
+ SSA_NAME_DEF_STMT (ssa_name) = *vec_stmt;
+ }
+
return true;
}
@@ -1033,6 +1029,7 @@ vectorizable_load (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt)
new_temp = make_ssa_name (vec_dest, new_stmt);
TREE_OPERAND (new_stmt, 0) = new_temp;
vect_finish_stmt_generation (stmt, new_stmt, bsi);
+ copy_virtual_operands (new_stmt, stmt);
}
else if (alignment_support_cheme == dr_unaligned_software_pipeline)
{
@@ -1070,6 +1067,8 @@ vectorizable_load (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt)
new_bb = bsi_insert_on_edge_immediate (pe, new_stmt);
gcc_assert (!new_bb);
msq_init = TREE_OPERAND (new_stmt, 0);
+ copy_virtual_operands (new_stmt, stmt);
+ update_vuses_to_preheader (new_stmt, loop);
/* <2> Create lsq = *(floor(p2')) in the loop */
@@ -1084,6 +1083,7 @@ vectorizable_load (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt)
TREE_OPERAND (new_stmt, 0) = new_temp;
vect_finish_stmt_generation (stmt, new_stmt, bsi);
lsq = TREE_OPERAND (new_stmt, 0);
+ copy_virtual_operands (new_stmt, stmt);
/* <3> */
@@ -1102,9 +1102,12 @@ vectorizable_load (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt)
gcc_assert (!new_bb);
magic = TREE_OPERAND (new_stmt, 0);
- /* Since we have just created a CALL_EXPR, we may need to
- rename call-clobbered variables. */
- mark_set_for_renaming (call_clobbered_vars);
+ /* The result of the CALL_EXPR to this builtin is determined from
+ the value of the parameter and no global variables are touched
+ which makes the builtin a "const" function. Requiring the
+ builtin to have the "const" attribute makes it unnecessary
+ to call mark_call_clobbered_vars_to_rename. */
+ gcc_assert (TREE_READONLY (builtin_decl));
}
else
{
@@ -1278,6 +1281,84 @@ vect_generate_tmps_on_preheader (loop_vec_info loop_vinfo,
}
+/* Function update_vuses_to_preheader.
+
+ Input:
+ STMT - a statement with potential VUSEs.
+ LOOP - the loop whose preheader will contain STMT.
+
+ It's possible to vectorize a loop even though an SSA_NAME from a VUSE
+ appears to be defined in a V_MAY_DEF in another statement in a loop.
+ One such case is when the VUSE is at the dereference of a __restricted__
+ pointer in a load and the V_MAY_DEF is at the dereference of a different
+ __restricted__ pointer in a store. Vectorization may result in
+ copy_virtual_uses being called to copy the problematic VUSE to a new
+ statement that is being inserted in the loop preheader. This procedure
+ is called to change the SSA_NAME in the new statement's VUSE from the
+ SSA_NAME updated in the loop to the related SSA_NAME available on the
+ path entering the loop.
+
+ When this function is called, we have the following situation:
+
+ # vuse <name1>
+ S1: vload
+ do {
+ # name1 = phi < name0 , name2>
+
+ # vuse <name1>
+ S2: vload
+
+ # name2 = vdef <name1>
+ S3: vstore
+
+ }while...
+
+ Stmt S1 was created in the loop preheader block as part of misaligned-load
+ handling. This function fixes the name of the vuse of S1 from 'name1' to
+ 'name0'. */
+
+static void
+update_vuses_to_preheader (tree stmt, struct loop *loop)
+{
+ basic_block header_bb = loop->header;
+ edge preheader_e = loop_preheader_edge (loop);
+ vuse_optype vuses = STMT_VUSE_OPS (stmt);
+ int nvuses = NUM_VUSES (vuses);
+ int i;
+
+ for (i = 0; i < nvuses; i++)
+ {
+ tree ssa_name = VUSE_OP (vuses, i);
+ tree def_stmt = SSA_NAME_DEF_STMT (ssa_name);
+ tree name_var = SSA_NAME_VAR (ssa_name);
+ basic_block bb = bb_for_stmt (def_stmt);
+
+ /* For a use before any definitions, def_stmt is a NOP_EXPR. */
+ if (!IS_EMPTY_STMT (def_stmt)
+ && flow_bb_inside_loop_p (loop, bb))
+ {
+ /* If the block containing the statement defining the SSA_NAME
+ is in the loop then it's necessary to find the definition
+ outside the loop using the PHI nodes of the header. */
+ tree phi;
+ bool updated = false;
+
+ for (phi = phi_nodes (header_bb); phi; phi = TREE_CHAIN (phi))
+ {
+ if (SSA_NAME_VAR (PHI_RESULT (phi)) == name_var)
+ {
+ SET_VUSE_OP (vuses, i,
+ PHI_ARG_DEF (phi, preheader_e->dest_idx));
+ updated = true;
+ break;
+ }
+ }
+ gcc_assert (updated);
+ }
+ }
+}
+
+
/* Function vect_update_ivs_after_vectorizer.
"Advance" the induction variables of LOOP to the value they should take
@@ -1381,8 +1462,6 @@ vect_update_ivs_after_vectorizer (loop_vec_info loop_vinfo, tree niters,
bsi_insert_before (&last_bsi, stmt, BSI_SAME_STMT);
/* Fix phi expressions in the successor bb. */
- gcc_assert (PHI_ARG_DEF_FROM_EDGE (phi1, update_e) ==
- PHI_ARG_DEF_FROM_EDGE (phi, single_succ_edge (loop->latch)));
SET_PHI_ARG_DEF (phi1, update_e->dest_idx, ni_name);
}
}
diff --git a/gcc/tree-vectorizer.c b/gcc/tree-vectorizer.c
index b3229911837..ed4d95dd2b3 100644
--- a/gcc/tree-vectorizer.c
+++ b/gcc/tree-vectorizer.c
@@ -153,9 +153,19 @@ static struct loop *slpeel_tree_duplicate_loop_to_edge_cfg
(struct loop *, struct loops *, edge);
static void slpeel_update_phis_for_duplicate_loop
(struct loop *, struct loop *, bool after);
-static void slpeel_update_phi_nodes_for_guard (edge, struct loop *, bool, bool);
+static void slpeel_update_phi_nodes_for_guard1
+ (edge, struct loop *, bool, basic_block *, bitmap *);
+static void slpeel_update_phi_nodes_for_guard2
+ (edge, struct loop *, bool, basic_block *);
static edge slpeel_add_loop_guard (basic_block, tree, basic_block, basic_block);
+static void allocate_new_names (bitmap);
+static void rename_use_op (use_operand_p);
+static void rename_def_op (def_operand_p, tree);
+static void rename_variables_in_bb (basic_block);
+static void free_new_names (bitmap);
+static void rename_variables_in_loop (struct loop *);
+
/*************************************************************************
General Vectorization Utilities
*************************************************************************/
@@ -177,6 +187,179 @@ enum verbosity_levels vect_verbosity_level = MAX_VERBOSITY_LEVEL;
Utilities to support loop peeling for vectorization purposes.
*************************************************************************/
+
+/* For each definition in DEFINITIONS this function allocates
+ new ssa name. */
+
+static void
+allocate_new_names (bitmap definitions)
+{
+ unsigned ver;
+ bitmap_iterator bi;
+
+ EXECUTE_IF_SET_IN_BITMAP (definitions, 0, ver, bi)
+ {
+ tree def = ssa_name (ver);
+ tree *new_name_ptr = xmalloc (sizeof (tree));
+
+ bool abnormal = SSA_NAME_OCCURS_IN_ABNORMAL_PHI (def);
+
+ *new_name_ptr = duplicate_ssa_name (def, SSA_NAME_DEF_STMT (def));
+ SSA_NAME_OCCURS_IN_ABNORMAL_PHI (*new_name_ptr) = abnormal;
+
+ SSA_NAME_AUX (def) = new_name_ptr;
+ }
+}
+
+
+/* Renames the use *OP_P. */
+
+static void
+rename_use_op (use_operand_p op_p)
+{
+ tree *new_name_ptr;
+
+ if (TREE_CODE (USE_FROM_PTR (op_p)) != SSA_NAME)
+ return;
+
+ new_name_ptr = SSA_NAME_AUX (USE_FROM_PTR (op_p));
+
+ /* Something defined outside of the loop. */
+ if (!new_name_ptr)
+ return;
+
+ /* An ordinary ssa name defined in the loop. */
+
+ SET_USE (op_p, *new_name_ptr);
+}
+
+
+/* Renames the def *OP_P in statement STMT. */
+
+static void
+rename_def_op (def_operand_p op_p, tree stmt)
+{
+ tree *new_name_ptr;
+
+ if (TREE_CODE (DEF_FROM_PTR (op_p)) != SSA_NAME)
+ return;
+
+ new_name_ptr = SSA_NAME_AUX (DEF_FROM_PTR (op_p));
+
+ /* Something defined outside of the loop. */
+ if (!new_name_ptr)
+ return;
+
+ /* An ordinary ssa name defined in the loop. */
+
+ SET_DEF (op_p, *new_name_ptr);
+ SSA_NAME_DEF_STMT (DEF_FROM_PTR (op_p)) = stmt;
+}
+
+
+/* Renames the variables in basic block BB. */
+
+static void
+rename_variables_in_bb (basic_block bb)
+{
+ tree phi;
+ block_stmt_iterator bsi;
+ tree stmt;
+ stmt_ann_t ann;
+ use_optype uses;
+ vuse_optype vuses;
+ def_optype defs;
+ v_may_def_optype v_may_defs;
+ v_must_def_optype v_must_defs;
+ unsigned i;
+ edge e;
+ edge_iterator ei;
+ struct loop *loop = bb->loop_father;
+
+ for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi))
+ rename_def_op (PHI_RESULT_PTR (phi), phi);
+
+ for (bsi = bsi_start (bb); !bsi_end_p (bsi); bsi_next (&bsi))
+ {
+ stmt = bsi_stmt (bsi);
+ get_stmt_operands (stmt);
+ ann = stmt_ann (stmt);
+
+ uses = USE_OPS (ann);
+ for (i = 0; i < NUM_USES (uses); i++)
+ rename_use_op (USE_OP_PTR (uses, i));
+
+ defs = DEF_OPS (ann);
+ for (i = 0; i < NUM_DEFS (defs); i++)
+ rename_def_op (DEF_OP_PTR (defs, i), stmt);
+
+ vuses = VUSE_OPS (ann);
+ for (i = 0; i < NUM_VUSES (vuses); i++)
+ rename_use_op (VUSE_OP_PTR (vuses, i));
+
+ v_may_defs = V_MAY_DEF_OPS (ann);
+ for (i = 0; i < NUM_V_MAY_DEFS (v_may_defs); i++)
+ {
+ rename_use_op (V_MAY_DEF_OP_PTR (v_may_defs, i));
+ rename_def_op (V_MAY_DEF_RESULT_PTR (v_may_defs, i), stmt);
+ }
+
+ v_must_defs = V_MUST_DEF_OPS (ann);
+ for (i = 0; i < NUM_V_MUST_DEFS (v_must_defs); i++)
+ {
+ rename_use_op (V_MUST_DEF_KILL_PTR (v_must_defs, i));
+ rename_def_op (V_MUST_DEF_RESULT_PTR (v_must_defs, i), stmt);
+ }
+ }
+
+ FOR_EACH_EDGE (e, ei, bb->succs)
+ {
+ if (!flow_bb_inside_loop_p (loop, e->dest))
+ continue;
+ for (phi = phi_nodes (e->dest); phi; phi = PHI_CHAIN (phi))
+ rename_use_op (PHI_ARG_DEF_PTR_FROM_EDGE (phi, e));
+ }
+}
+
+
+/* Releases the structures holding the new ssa names. */
+
+static void
+free_new_names (bitmap definitions)
+{
+ unsigned ver;
+ bitmap_iterator bi;
+
+ EXECUTE_IF_SET_IN_BITMAP (definitions, 0, ver, bi)
+ {
+ tree def = ssa_name (ver);
+
+ if (SSA_NAME_AUX (def))
+ {
+ free (SSA_NAME_AUX (def));
+ SSA_NAME_AUX (def) = NULL;
+ }
+ }
+}
+
+
+/* Renames variables in new generated LOOP. */
+
+static void
+rename_variables_in_loop (struct loop *loop)
+{
+ unsigned i;
+ basic_block *bbs;
+
+ bbs = get_loop_body (loop);
+
+ for (i = 0; i < loop->num_nodes; i++)
+ rename_variables_in_bb (bbs[i]);
+
+ free (bbs);
+}
+
+
/* Update the PHI nodes of NEW_LOOP.
NEW_LOOP is a duplicate of ORIG_LOOP.
@@ -188,10 +371,12 @@ static void
slpeel_update_phis_for_duplicate_loop (struct loop *orig_loop,
struct loop *new_loop, bool after)
{
+ tree *new_name_ptr, new_ssa_name;
tree phi_new, phi_orig;
tree def;
edge orig_loop_latch = loop_latch_edge (orig_loop);
edge orig_entry_e = loop_preheader_edge (orig_loop);
+ edge new_loop_exit_e = new_loop->single_exit;
edge new_loop_entry_e = loop_preheader_edge (new_loop);
edge entry_arg_e = (after ? orig_loop_latch : orig_entry_e);
@@ -202,7 +387,24 @@ slpeel_update_phis_for_duplicate_loop (struct loop *orig_loop,
step 2. For each loop-header-phi:
Add the second phi argument for the phi in NEW_LOOP
- (the one associated with the latch of NEW_LOOP) */
+ (the one associated with the latch of NEW_LOOP)
+
+ step 3. Update the phis in the successor block of NEW_LOOP.
+
+ case 1: NEW_LOOP was placed before ORIG_LOOP:
+ The successor block of NEW_LOOP is the header of ORIG_LOOP.
+ Updating the phis in the successor block can therefore be done
+ along with the scanning of the loop header phis, because the
+ header blocks of ORIG_LOOP and NEW_LOOP have exactly the same
+ phi nodes, organized in the same order.
+
+ case 2: NEW_LOOP was placed after ORIG_LOOP:
+ The successor block of NEW_LOOP is the original exit block of
+ ORIG_LOOP - the phis to be updated are the loop-closed-ssa phis.
+ We postpone updating these phis to a later stage (when
+ loop guards are added).
+ */
+
/* Scan the phis in the headers of the old and new loops
(they are organized in exactly the same order). */
@@ -218,7 +420,26 @@ slpeel_update_phis_for_duplicate_loop (struct loop *orig_loop,
/* step 2. */
def = PHI_ARG_DEF_FROM_EDGE (phi_orig, orig_loop_latch);
- add_phi_arg (phi_new, def, loop_latch_edge (new_loop));
+ if (TREE_CODE (def) != SSA_NAME)
+ continue;
+
+ new_name_ptr = SSA_NAME_AUX (def);
+ if (!new_name_ptr)
+ /* Something defined outside of the loop. */
+ continue;
+
+ /* An ordinary ssa name defined in the loop. */
+ new_ssa_name = *new_name_ptr;
+ add_phi_arg (phi_new, new_ssa_name, loop_latch_edge (new_loop));
+
+ /* step 3 (case 1). */
+ if (!after)
+ {
+ gcc_assert (new_loop_exit_e == orig_entry_e);
+ SET_PHI_ARG_DEF (phi_orig,
+ new_loop_exit_e->dest_idx,
+ new_ssa_name);
+ }
}
}
@@ -230,113 +451,390 @@ slpeel_update_phis_for_duplicate_loop (struct loop *orig_loop,
controls whether LOOP is to be executed. GUARD_EDGE is the edge that
originates from the guard-bb, skips LOOP and reaches the (unique) exit
bb of LOOP. This loop-exit-bb is an empty bb with one successor.
- We denote this bb NEW_MERGE_BB because it had a single predecessor (the
- LOOP header) before the guard code was added, and now it became a merge
+ We denote this bb NEW_MERGE_BB because before the guard code was added
+ it had a single predecessor (the LOOP header), and now it became a merge
point of two paths - the path that ends with the LOOP exit-edge, and
the path that ends with GUARD_EDGE.
+ - NEW_EXIT_BB: New basic block that is added by this function between LOOP
+ and NEW_MERGE_BB. It is used to place loop-closed-ssa-form exit-phis.
- This function creates and updates the relevant phi nodes to account for
- the new incoming edge (GUARD_EDGE) into NEW_MERGE_BB:
- 1. Create phi nodes at NEW_MERGE_BB.
- 2. Update the phi nodes at the successor of NEW_MERGE_BB (denoted
- UPDATE_BB). UPDATE_BB was the exit-bb of LOOP before NEW_MERGE_BB
- was added:
+ ===> The CFG before the guard-code was added:
+ LOOP_header_bb:
+ loop_body
+ if (exit_loop) goto update_bb
+ else goto LOOP_header_bb
+ update_bb:
- ===> The CFG before the guard-code was added:
+ ==> The CFG after the guard-code was added:
+ guard_bb:
+ if (LOOP_guard_condition) goto new_merge_bb
+ else goto LOOP_header_bb
LOOP_header_bb:
- if (exit_loop) goto update_bb : LOOP_header_bb
+ loop_body
+ if (exit_loop_condition) goto new_merge_bb
+ else goto LOOP_header_bb
+ new_merge_bb:
+ goto update_bb
update_bb:
- ==> The CFG after the guard-code was added:
- guard_bb:
- if (LOOP_guard_condition) goto new_merge_bb : LOOP_header_bb
+ ==> The CFG after this function:
+ guard_bb:
+ if (LOOP_guard_condition) goto new_merge_bb
+ else goto LOOP_header_bb
LOOP_header_bb:
- if (exit_loop_condition) goto new_merge_bb : LOOP_header_bb
+ loop_body
+ if (exit_loop_condition) goto new_exit_bb
+ else goto LOOP_header_bb
+ new_exit_bb:
new_merge_bb:
goto update_bb
update_bb:
- - ENTRY_PHIS: If ENTRY_PHIS is TRUE, this indicates that the phis in
- UPDATE_BB are loop entry phis, like the phis in the LOOP header,
- organized in the same order.
- If ENTRY_PHIs is FALSE, this indicates that the phis in UPDATE_BB are
- loop exit phis.
-
- - IS_NEW_LOOP: TRUE if LOOP is a new loop (a duplicated copy of another
- "original" loop). FALSE if LOOP is an original loop (not a newly
- created copy). The SSA_NAME_AUX fields of the defs in the original
- loop are the corresponding new ssa-names used in the new duplicated
- loop copy. IS_NEW_LOOP indicates which of the two args of the phi
- nodes in UPDATE_BB takes the original ssa-name, and which takes the
- new name: If IS_NEW_LOOP is TRUE, the phi-arg that is associated with
- the LOOP-exit-edge takes the new-name, and the phi-arg that is
- associated with GUARD_EDGE takes the original name. If IS_NEW_LOOP is
- FALSE, it's the other way around.
+ This function:
+ 1. creates and updates the relevant phi nodes to account for the new
+ incoming edge (GUARD_EDGE) into NEW_MERGE_BB. This involves:
+ 1.1. Create phi nodes at NEW_MERGE_BB.
+ 1.2. Update the phi nodes at the successor of NEW_MERGE_BB (denoted
+ UPDATE_BB). UPDATE_BB was the exit-bb of LOOP before NEW_MERGE_BB
+ 2. preserves loop-closed-ssa-form by creating the required phi nodes
+ at the exit of LOOP (i.e, in NEW_EXIT_BB).
+
+ There are two flavors to this function:
+
+ slpeel_update_phi_nodes_for_guard1:
+ Here the guard controls whether we enter or skip LOOP, where LOOP is a
+ prolog_loop (loop1 below), and the new phis created in NEW_MERGE_BB are
+ for variables that have phis in the loop header.
+
+ slpeel_update_phi_nodes_for_guard2:
+ Here the guard controls whether we enter or skip LOOP, where LOOP is an
+ epilog_loop (loop2 below), and the new phis created in NEW_MERGE_BB are
+ for variables that have phis in the loop exit.
+
+ I.E., the overall structure is:
+
+ loop1_preheader_bb:
+ guard1 (goto loop1/merg1_bb)
+ loop1
+ loop1_exit_bb:
+ guard2 (goto merge1_bb/merge2_bb)
+ merge1_bb
+ loop2
+ loop2_exit_bb
+ merge2_bb
+ next_bb
+
+ slpeel_update_phi_nodes_for_guard1 takes care of creating phis in
+ loop1_exit_bb and merge1_bb. These are entry phis (phis for the vars
+ that have phis in loop1->header).
+
+ slpeel_update_phi_nodes_for_guard2 takes care of creating phis in
+ loop2_exit_bb and merge2_bb. These are exit phis (phis for the vars
+ that have phis in next_bb). It also adds some of these phis to
+ loop1_exit_bb.
+
+ slpeel_update_phi_nodes_for_guard1 is always called before
+ slpeel_update_phi_nodes_for_guard2. They are both needed in order
+ to create correct data-flow and loop-closed-ssa-form.
+
+ Generally slpeel_update_phi_nodes_for_guard1 creates phis for variables
+ that change between iterations of a loop (and therefore have a phi-node
+ at the loop entry), whereas slpeel_update_phi_nodes_for_guard2 creates
+ phis for variables that are used out of the loop (and therefore have
+ loop-closed exit phis). Some variables may be both updated between
+ iterations and used after the loop. This is why in loop1_exit_bb we
+ may need both entry_phis (created by slpeel_update_phi_nodes_for_guard1)
+ and exit phis (created by slpeel_update_phi_nodes_for_guard2).
+
+ - IS_NEW_LOOP: if IS_NEW_LOOP is true, then LOOP is a newly created copy of
+ an original loop. i.e., we have:
+
+ orig_loop
+ guard_bb (goto LOOP/new_merge)
+ new_loop <-- LOOP
+ new_exit
+ new_merge
+ next_bb
+
+ If IS_NEW_LOOP is false, then LOOP is an original loop, in which case we
+ have:
+
+ new_loop
+ guard_bb (goto LOOP/new_merge)
+ orig_loop <-- LOOP
+ new_exit
+ new_merge
+ next_bb
+
+ The ssa-names defined in the original loop have an SSA_NAME_AUX pointer
+ that records the corresponding new ssa-name used in the new duplicated
+ loop copy.
*/
+/* Function slpeel_update_phi_nodes_for_guard1
+
+ Input:
+ - GUARD_EDGE, LOOP, IS_NEW_LOOP, NEW_EXIT_BB - as explained above.
+ - DEFS - a bitmap of ssa names to mark new names for which we recorded
+ information.
+
+ In the context of the overall structure, we have:
+
+ loop1_preheader_bb:
+ guard1 (goto loop1/merg1_bb)
+LOOP-> loop1
+ loop1_exit_bb:
+ guard2 (goto merge1_bb/merge2_bb)
+ merge1_bb
+ loop2
+ loop2_exit_bb
+ merge2_bb
+ next_bb
+
+ For each name updated between loop iterations (i.e - for each name that has
+ an entry (loop-header) phi in LOOP) we create a new phi in:
+ 1. merge1_bb (to account for the edge from guard1)
+ 2. loop1_exit_bb (an exit-phi to keep LOOP in loop-closed form)
+*/
+
static void
-slpeel_update_phi_nodes_for_guard (edge guard_edge,
- struct loop *loop,
- bool entry_phis,
- bool is_new_loop)
+slpeel_update_phi_nodes_for_guard1 (edge guard_edge, struct loop *loop,
+ bool is_new_loop, basic_block *new_exit_bb,
+ bitmap *defs)
{
- tree orig_phi, new_phi, update_phi;
+ tree orig_phi, new_phi;
+ tree update_phi, update_phi2;
+ tree *new_name_ptr, *new_name_ptr2;
tree guard_arg, loop_arg;
basic_block new_merge_bb = guard_edge->dest;
- edge e = single_succ_edge (new_merge_bb);
+ edge e = EDGE_SUCC (new_merge_bb, 0);
basic_block update_bb = e->dest;
- basic_block orig_bb = (entry_phis ? loop->header : update_bb);
+ basic_block orig_bb = loop->header;
+ edge new_exit_e;
+ tree current_new_name;
- if (update_bb == orig_bb)
- return;
+ /* Create new bb between loop and new_merge_bb. */
+ *new_exit_bb = split_edge (loop->single_exit);
+ add_bb_to_loop (*new_exit_bb, loop->outer);
+
+ new_exit_e = EDGE_SUCC (*new_exit_bb, 0);
for (orig_phi = phi_nodes (orig_bb), update_phi = phi_nodes (update_bb);
orig_phi && update_phi;
orig_phi = PHI_CHAIN (orig_phi), update_phi = PHI_CHAIN (update_phi))
{
- /* 1. Generate new phi node in NEW_MERGE_BB: */
+ /** 1. Handle new-merge-point phis **/
+
+ /* 1.1. Generate new phi node in NEW_MERGE_BB: */
+ new_phi = create_phi_node (SSA_NAME_VAR (PHI_RESULT (orig_phi)),
+ new_merge_bb);
+
+ /* 1.2. NEW_MERGE_BB has two incoming edges: GUARD_EDGE and the exit-edge
+ of LOOP. Set the two phi args in NEW_PHI for these edges: */
+ loop_arg = PHI_ARG_DEF_FROM_EDGE (orig_phi, EDGE_SUCC (loop->latch, 0));
+ guard_arg = PHI_ARG_DEF_FROM_EDGE (orig_phi, loop_preheader_edge (loop));
+
+ add_phi_arg (new_phi, loop_arg, new_exit_e);
+ add_phi_arg (new_phi, guard_arg, guard_edge);
+
+ /* 1.3. Update phi in successor block. */
+ gcc_assert (PHI_ARG_DEF_FROM_EDGE (update_phi, e) == loop_arg
+ || PHI_ARG_DEF_FROM_EDGE (update_phi, e) == guard_arg);
+ SET_PHI_ARG_DEF (update_phi, e->dest_idx, PHI_RESULT (new_phi));
+ update_phi2 = new_phi;
+
+
+ /** 2. Handle loop-closed-ssa-form phis **/
+
+ /* 2.1. Generate new phi node in NEW_EXIT_BB: */
+ new_phi = create_phi_node (SSA_NAME_VAR (PHI_RESULT (orig_phi)),
+ *new_exit_bb);
+
+ /* 2.2. NEW_EXIT_BB has one incoming edge: the exit-edge of the loop. */
+ add_phi_arg (new_phi, loop_arg, loop->single_exit);
+
+ /* 2.3. Update phi in successor of NEW_EXIT_BB: */
+ gcc_assert (PHI_ARG_DEF_FROM_EDGE (update_phi2, new_exit_e) == loop_arg);
+ SET_PHI_ARG_DEF (update_phi2, new_exit_e->dest_idx, PHI_RESULT (new_phi));
+
+ /* 2.4. Record the newly created name in SSA_NAME_AUX.
+ We want to find a name such that
+ name = *(SSA_NAME_AUX (orig_loop_name))
+ and to set its SSA_NAME_AUX as follows:
+ *(SSA_NAME_AUX (name)) = new_phi_name
+
+ If LOOP is a new loop then loop_arg is already the name we're
+ looking for. If LOOP is the original loop, then loop_arg is
+ the orig_loop_name and the relevant name is recorded in its
+ SSA_NAME_AUX */
+ if (is_new_loop)
+ current_new_name = loop_arg;
+ else
+ {
+ new_name_ptr = SSA_NAME_AUX (loop_arg);
+ gcc_assert (new_name_ptr);
+ current_new_name = *new_name_ptr;
+ }
+#ifdef ENABLE_CHECKING
+ gcc_assert (! SSA_NAME_AUX (current_new_name));
+#endif
+
+ new_name_ptr2 = xmalloc (sizeof (tree));
+ *new_name_ptr2 = PHI_RESULT (new_phi);
+ SSA_NAME_AUX (current_new_name) = new_name_ptr2;
+ bitmap_set_bit (*defs, SSA_NAME_VERSION (current_new_name));
+ }
+
+ set_phi_nodes (new_merge_bb, phi_reverse (phi_nodes (new_merge_bb)));
+}
+
+
+/* Function slpeel_update_phi_nodes_for_guard2
+
+ Input:
+ - GUARD_EDGE, LOOP, IS_NEW_LOOP, NEW_EXIT_BB - as explained above.
+
+ In the context of the overall structure, we have:
+
+ loop1_preheader_bb:
+ guard1 (goto loop1/merg1_bb)
+ loop1
+ loop1_exit_bb:
+ guard2 (goto merge1_bb/merge2_bb)
+ merge1_bb
+LOOP-> loop2
+ loop2_exit_bb
+ merge2_bb
+ next_bb
+
+ For each name used out side the loop (i.e - for each name that has an exit
+ phi in next_bb) we create a new phi in:
+ 1. merge2_bb (to account for the edge from guard_bb)
+ 2. loop2_exit_bb (an exit-phi to keep LOOP in loop-closed form)
+ 3. guard2 bb (an exit phi to keep the preceding loop in loop-closed form),
+ if needed (if it wasn't handled by slpeel_update_phis_nodes_for_phi1).
+*/
+
+static void
+slpeel_update_phi_nodes_for_guard2 (edge guard_edge, struct loop *loop,
+ bool is_new_loop, basic_block *new_exit_bb)
+{
+ tree orig_phi, new_phi;
+ tree update_phi, update_phi2;
+ tree *new_name_ptr, *new_name_ptr2;
+ tree guard_arg, loop_arg;
+ basic_block new_merge_bb = guard_edge->dest;
+ edge e = EDGE_SUCC (new_merge_bb, 0);
+ basic_block update_bb = e->dest;
+ edge new_exit_e;
+ tree orig_def;
+ tree new_name, new_name2;
+ tree arg;
+
+ /* Create new bb between loop and new_merge_bb. */
+ *new_exit_bb = split_edge (loop->single_exit);
+ add_bb_to_loop (*new_exit_bb, loop->outer);
+
+ new_exit_e = EDGE_SUCC (*new_exit_bb, 0);
+
+ for (update_phi = phi_nodes (update_bb); update_phi;
+ update_phi = PHI_CHAIN (update_phi))
+ {
+ orig_phi = update_phi;
+ orig_def = PHI_ARG_DEF_FROM_EDGE (orig_phi, e);
+ new_name_ptr = SSA_NAME_AUX (orig_def);
+ arg = NULL_TREE;
+
+ /** 1. Handle new-merge-point phis **/
+
+ /* 1.1. Generate new phi node in NEW_MERGE_BB: */
new_phi = create_phi_node (SSA_NAME_VAR (PHI_RESULT (orig_phi)),
new_merge_bb);
- /* 2. NEW_MERGE_BB has two incoming edges: GUARD_EDGE and the exit-edge
+ /* 1.2. NEW_MERGE_BB has two incoming edges: GUARD_EDGE and the exit-edge
of LOOP. Set the two phi args in NEW_PHI for these edges: */
- if (entry_phis)
+ new_name = orig_def;
+ new_name2 = NULL_TREE;
+ if (new_name_ptr)
{
- loop_arg = PHI_ARG_DEF_FROM_EDGE (orig_phi,
- loop_latch_edge (loop));
- guard_arg = PHI_ARG_DEF_FROM_EDGE (orig_phi,
- loop_preheader_edge (loop));
+ new_name = *new_name_ptr;
+ new_name_ptr2 = SSA_NAME_AUX (new_name);
+ if (new_name_ptr2)
+ /* Some variables have both loop-entry-phis and loop-exit-phis.
+ Such variables were given yet newer names by phis placed in
+ guard_bb by slpeel_update_phi_nodes_for_guard1. I.e:
+ new_name2 = SSA_NAME_AUX (SSA_NAME_AUX (orig_name)). */
+ new_name2 = *new_name_ptr2;
}
- else /* exit phis */
+
+ if (is_new_loop)
{
- tree orig_def = PHI_ARG_DEF_FROM_EDGE (orig_phi, e);
- tree *new_name_ptr = SSA_NAME_AUX (orig_def);
- tree new_name;
-
- if (new_name_ptr)
- new_name = *new_name_ptr;
- else
- /* Something defined outside of the loop */
- new_name = orig_def;
-
- if (is_new_loop)
- {
- guard_arg = orig_def;
- loop_arg = new_name;
- }
- else
- {
- guard_arg = new_name;
- loop_arg = orig_def;
- }
+ guard_arg = orig_def;
+ loop_arg = new_name;
}
- add_phi_arg (new_phi, loop_arg, loop->single_exit);
+ else
+ {
+ guard_arg = new_name;
+ loop_arg = orig_def;
+ }
+ if (new_name2)
+ guard_arg = new_name2;
+
+ add_phi_arg (new_phi, loop_arg, new_exit_e);
add_phi_arg (new_phi, guard_arg, guard_edge);
- /* 3. Update phi in successor block. */
- gcc_assert (PHI_ARG_DEF_FROM_EDGE (update_phi, e) == loop_arg
- || PHI_ARG_DEF_FROM_EDGE (update_phi, e) == guard_arg);
+ /* 1.3. Update phi in successor block. */
+ gcc_assert (PHI_ARG_DEF_FROM_EDGE (update_phi, e) == orig_def);
SET_PHI_ARG_DEF (update_phi, e->dest_idx, PHI_RESULT (new_phi));
+ update_phi2 = new_phi;
+
+
+ /** 2. Handle loop-closed-ssa-form phis **/
+
+ /* 2.1. Generate new phi node in NEW_EXIT_BB: */
+ new_phi = create_phi_node (SSA_NAME_VAR (PHI_RESULT (orig_phi)),
+ *new_exit_bb);
+
+ /* 2.2. NEW_EXIT_BB has one incoming edge: the exit-edge of the loop. */
+ add_phi_arg (new_phi, loop_arg, loop->single_exit);
+
+ /* 2.3. Update phi in successor of NEW_EXIT_BB: */
+ gcc_assert (PHI_ARG_DEF_FROM_EDGE (update_phi2, new_exit_e) == loop_arg);
+ SET_PHI_ARG_DEF (update_phi2, new_exit_e->dest_idx, PHI_RESULT (new_phi));
+
+
+ /** 3. Handle loop-closed-ssa-form phis for first loop **/
+
+ /* 3.1. Find the relevant names that need an exit-phi in GUARD_BB, i.e.
+ names for which slpeel_update_phi_nodes_for_guard1 had not already
+ created a phi node. This is the case for names that are used outside
+ the loop (and therefore need an exit phi) but are not updated
+ across loop iterations (and therefore don't have a loop-header-phi).
+
+ slpeel_update_phi_nodes_for_guard1 is responsible for creating
+ loop-exit phis in GUARD_BB for names that have a loop-header-phi. When
+ such a phi is created we also record the new name in SSA_NAME_AUX. If
+ this new name exists, then guard_arg was set to this new name
+ (see 1.2 above). Therefore, if guard_arg is not this new name, this is
+ an indication that an exit-phi in GUARD_BB was not yet created, so we
+ take care of it here.
+ */
+ if (guard_arg == new_name2)
+ continue;
+ arg = guard_arg;
+
+ /* 3.2. Generate new phi node in GUARD_BB: */
+ new_phi = create_phi_node (SSA_NAME_VAR (PHI_RESULT (orig_phi)),
+ guard_edge->src);
+
+ /* 3.3. GUARD_BB has one incoming edge: */
+ gcc_assert (EDGE_COUNT (guard_edge->src->preds) == 1);
+ add_phi_arg (new_phi, arg, EDGE_PRED (guard_edge->src, 0));
+
+ /* 3.4. Update phi in successor of GUARD_BB: */
+ gcc_assert (PHI_ARG_DEF_FROM_EDGE (update_phi2, guard_edge)
+ == guard_arg);
+ SET_PHI_ARG_DEF (update_phi2, guard_edge->dest_idx, PHI_RESULT (new_phi));
}
set_phi_nodes (new_merge_bb, phi_reverse (phi_nodes (new_merge_bb)));
@@ -527,7 +1025,7 @@ slpeel_add_loop_guard (basic_block guard_bb, tree cond, basic_block exit_bb,
edge new_e, enter_e;
tree cond_stmt, then_label, else_label;
- enter_e = single_succ_edge (guard_bb);
+ enter_e = EDGE_SUCC (guard_bb, 0);
enter_e->flags &= ~EDGE_FALLTHRU;
enter_e->flags |= EDGE_FALSE_VALUE;
bsi = bsi_last (guard_bb);
@@ -539,7 +1037,7 @@ slpeel_add_loop_guard (basic_block guard_bb, tree cond, basic_block exit_bb,
cond_stmt = build3 (COND_EXPR, void_type_node, cond,
then_label, else_label);
bsi_insert_after (&bsi, cond_stmt, BSI_NEW_STMT);
- /* Add new edge to connect entry block to the second loop. */
+ /* Add new edge to connect guard block to the merge/loop-exit block. */
new_e = make_edge (guard_bb, exit_bb, EDGE_TRUE_VALUE);
set_immediate_dominator (CDI_DOMINATORS, exit_bb, dom_bb);
return new_e;
@@ -659,9 +1157,11 @@ slpeel_tree_peel_loop_to_edge (struct loop *loop, struct loops *loops,
struct loop *new_loop = NULL, *first_loop, *second_loop;
edge skip_e;
tree pre_condition;
+ bitmap definitions;
basic_block bb_before_second_loop, bb_after_second_loop;
basic_block bb_before_first_loop;
basic_block bb_between_loops;
+ basic_block new_exit_bb;
edge exit_e = loop->single_exit;
LOC loop_loc;
@@ -715,7 +1215,10 @@ slpeel_tree_peel_loop_to_edge (struct loop *loop, struct loops *loops,
second_loop = loop;
}
+ definitions = ssa_names_to_replace ();
+ allocate_new_names (definitions);
slpeel_update_phis_for_duplicate_loop (loop, new_loop, e == exit_e);
+ rename_variables_in_loop (new_loop);
/* 2. Add the guard that controls whether the first loop is executed.
@@ -747,8 +1250,9 @@ slpeel_tree_peel_loop_to_edge (struct loop *loop, struct loops *loops,
fold (build2 (LE_EXPR, boolean_type_node, first_niters, integer_zero_node));
skip_e = slpeel_add_loop_guard (bb_before_first_loop, pre_condition,
bb_before_second_loop, bb_before_first_loop);
- slpeel_update_phi_nodes_for_guard (skip_e, first_loop, true /* entry-phis */,
- first_loop == new_loop);
+ slpeel_update_phi_nodes_for_guard1 (skip_e, first_loop,
+ first_loop == new_loop,
+ &new_exit_bb, &definitions);
/* 3. Add the guard that controls whether the second loop is executed.
@@ -777,8 +1281,7 @@ slpeel_tree_peel_loop_to_edge (struct loop *loop, struct loops *loops,
orig_exit_bb:
*/
- bb_between_loops = split_edge (first_loop->single_exit);
- add_bb_to_loop (bb_between_loops, first_loop->outer);
+ bb_between_loops = new_exit_bb;
bb_after_second_loop = split_edge (second_loop->single_exit);
add_bb_to_loop (bb_after_second_loop, second_loop->outer);
@@ -786,19 +1289,17 @@ slpeel_tree_peel_loop_to_edge (struct loop *loop, struct loops *loops,
fold (build2 (EQ_EXPR, boolean_type_node, first_niters, niters));
skip_e = slpeel_add_loop_guard (bb_between_loops, pre_condition,
bb_after_second_loop, bb_before_first_loop);
- slpeel_update_phi_nodes_for_guard (skip_e, second_loop, false /* exit-phis */,
- second_loop == new_loop);
-
- /* Flow loop scan does not update loop->single_exit field. */
- first_loop->single_exit = first_loop->single_exit;
- second_loop->single_exit = second_loop->single_exit;
+ slpeel_update_phi_nodes_for_guard2 (skip_e, second_loop,
+ second_loop == new_loop, &new_exit_bb);
/* 4. Make first-loop iterate FIRST_NITERS times, if requested.
*/
if (update_first_loop_count)
slpeel_make_loop_iterate_ntimes (first_loop, first_niters);
- update_ssa (true);
+ free_new_names (definitions);
+ BITMAP_FREE (definitions);
+ delete_update_ssa ();
return new_loop;
}
@@ -946,6 +1447,7 @@ new_stmt_vec_info (tree stmt, loop_vec_info loop_vinfo)
STMT_VINFO_VEC_STMT (res) = NULL;
STMT_VINFO_DATA_REF (res) = NULL;
STMT_VINFO_MEMTAG (res) = NULL;
+ STMT_VINFO_PTR_INFO (res) = NULL;
STMT_VINFO_SUBVARS (res) = NULL;
STMT_VINFO_VECT_DR_BASE_ADDRESS (res) = NULL;
STMT_VINFO_VECT_INIT_OFFSET (res) = NULL_TREE;
@@ -1396,7 +1898,4 @@ vectorize_loops (struct loops *loops)
destroy_loop_vec_info (loop_vinfo);
loop->aux = NULL;
}
-
- update_ssa (true);
- rewrite_into_loop_closed_ssa (NULL); /* FORNOW */
}
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index 8c01583dac6..a38edd0785f 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -182,6 +182,7 @@ typedef struct _stmt_vec_info {
dereference, then this field contains the memory tag that should
be used by the new vector-pointer. */
tree memtag;
+ struct ptr_info_def *ptr_info;
subvar_t subvars;
/** The following fields are used to store the information about
@@ -224,7 +225,8 @@ typedef struct _stmt_vec_info {
#define STMT_VINFO_VEC_STMT(S) (S)->vectorized_stmt
#define STMT_VINFO_DATA_REF(S) (S)->data_ref_info
#define STMT_VINFO_MEMTAG(S) (S)->memtag
-#define STMT_VINFO_SUBVARS(S) (S)->subvars
+#define STMT_VINFO_PTR_INFO(S) (S)->ptr_info
+#define STMT_VINFO_SUBVARS(S) (S)->subvars
#define STMT_VINFO_VECT_DR_BASE_ADDRESS(S)(S)->base_address
#define STMT_VINFO_VECT_INIT_OFFSET(S) (S)->initial_offset
#define STMT_VINFO_VECT_STEP(S) (S)->step
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index e517cdb345b..b8e4bfcc5e2 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -1,4 +1,5 @@
/* Support routines for Value Range Propagation (VRP).
+ Copyright (C) 2005 Free Software Foundation, Inc.
Contributed by Diego Novillo <dnovillo@redhat.com>.
This file is part of GCC.
@@ -196,22 +197,33 @@ symbolic_range_p (value_range *vr)
}
-/* Return true if EXPR computes a non-NULL pointer value. */
+/* Return true if EXPR computes a non-zero value. */
-static inline bool
-expr_computes_nonnull (tree expr)
+bool
+expr_computes_nonzero (tree expr)
{
/* Type casts won't change anything, so just strip it. */
STRIP_NOPS (expr);
- /* Taking the address of a non-weak symbol or calling alloca,
- guarantees that the value is non-NULL. */
- return (alloca_call_p (expr)
- || (TREE_CODE (expr) == ADDR_EXPR
- && DECL_P (TREE_OPERAND (expr, 0))
- && !DECL_WEAK (TREE_OPERAND (expr, 0)))
- || (TREE_CODE (expr) == ADDR_EXPR
- && REFERENCE_CLASS_P (TREE_OPERAND (expr, 0))));
+ /* Calling alloca, guarantees that the value is non-NULL. */
+ if (alloca_call_p (expr))
+ return true;
+
+ /* The address of a non-weak symbol is never NULL, unless the user
+ has requested not to remove NULL pointer checks. */
+ if (flag_delete_null_pointer_checks
+ && TREE_CODE (expr) == ADDR_EXPR
+ && DECL_P (TREE_OPERAND (expr, 0))
+ && !DECL_WEAK (TREE_OPERAND (expr, 0)))
+ return true;
+
+ /* IOR of any value with a nonzero value will result in a nonzero
+ value. */
+ if (TREE_CODE (expr) == BIT_IOR_EXPR
+ && integer_nonzerop (TREE_OPERAND (expr, 1)))
+ return true;
+
+ return false;
}
@@ -758,7 +770,7 @@ extract_range_from_unary_expr (value_range *vr, tree expr)
determining if it evaluates to NULL [0, 0] or non-NULL (~[0, 0]). */
if (POINTER_TYPE_P (TREE_TYPE (expr)) || POINTER_TYPE_P (TREE_TYPE (op0)))
{
- if (range_is_nonnull (&vr0) || expr_computes_nonnull (expr))
+ if (range_is_nonnull (&vr0) || expr_computes_nonzero (expr))
set_value_range_to_nonnull (vr, TREE_TYPE (expr));
else if (range_is_null (&vr0))
set_value_range_to_null (vr, TREE_TYPE (expr));
@@ -816,7 +828,7 @@ extract_range_from_expr (value_range *vr, tree expr)
extract_range_from_binary_expr (vr, expr);
else if (TREE_CODE_CLASS (code) == tcc_unary)
extract_range_from_unary_expr (vr, expr);
- else if (expr_computes_nonnull (expr))
+ else if (expr_computes_nonzero (expr))
set_value_range_to_nonnull (vr, TREE_TYPE (expr));
else
set_value_range (vr, VR_VARYING, NULL_TREE, NULL_TREE);
@@ -1274,8 +1286,10 @@ infer_value_range (tree stmt, tree op)
unsigned num_uses, num_derefs;
count_uses_and_derefs (op, stmt, &num_uses, &num_derefs, &is_store);
- if (num_derefs > 0)
+ if (num_derefs > 0 && flag_delete_null_pointer_checks)
{
+ /* We can only assume that a pointer dereference will yield
+ non-NULL if -fdelete-null-pointer-checks is enabled. */
tree null = build_int_cst (TREE_TYPE (op), 0);
tree t = build (NE_EXPR, boolean_type_node, op, null);
return t;
@@ -2221,7 +2235,6 @@ execute_vrp (void)
if (cfg_loops)
scev_initialize (cfg_loops);
-
if (vrp_initialize ())
{
ssa_propagate (vrp_visit_stmt, vrp_visit_phi_node);
diff --git a/gcc/tree.c b/gcc/tree.c
index 1500349ded1..de1ffb21d66 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -5357,99 +5357,6 @@ get_file_function_name (int kind)
return get_file_function_name_long (p);
}
-/* Expand (the constant part of) a SET_TYPE CONSTRUCTOR node.
- The result is placed in BUFFER (which has length BIT_SIZE),
- with one bit in each char ('\000' or '\001').
-
- If the constructor is constant, NULL_TREE is returned.
- Otherwise, a TREE_LIST of the non-constant elements is emitted. */
-
-tree
-get_set_constructor_bits (tree init, char *buffer, int bit_size)
-{
- int i;
- tree vals;
- HOST_WIDE_INT domain_min
- = tree_low_cst (TYPE_MIN_VALUE (TYPE_DOMAIN (TREE_TYPE (init))), 0);
- tree non_const_bits = NULL_TREE;
-
- for (i = 0; i < bit_size; i++)
- buffer[i] = 0;
-
- for (vals = TREE_OPERAND (init, 1);
- vals != NULL_TREE; vals = TREE_CHAIN (vals))
- {
- if (!host_integerp (TREE_VALUE (vals), 0)
- || (TREE_PURPOSE (vals) != NULL_TREE
- && !host_integerp (TREE_PURPOSE (vals), 0)))
- non_const_bits
- = tree_cons (TREE_PURPOSE (vals), TREE_VALUE (vals), non_const_bits);
- else if (TREE_PURPOSE (vals) != NULL_TREE)
- {
- /* Set a range of bits to ones. */
- HOST_WIDE_INT lo_index
- = tree_low_cst (TREE_PURPOSE (vals), 0) - domain_min;
- HOST_WIDE_INT hi_index
- = tree_low_cst (TREE_VALUE (vals), 0) - domain_min;
-
- gcc_assert (lo_index >= 0);
- gcc_assert (lo_index < bit_size);
- gcc_assert (hi_index >= 0);
- gcc_assert (hi_index < bit_size);
- for (; lo_index <= hi_index; lo_index++)
- buffer[lo_index] = 1;
- }
- else
- {
- /* Set a single bit to one. */
- HOST_WIDE_INT index
- = tree_low_cst (TREE_VALUE (vals), 0) - domain_min;
- if (index < 0 || index >= bit_size)
- {
- error ("invalid initializer for bit string");
- return NULL_TREE;
- }
- buffer[index] = 1;
- }
- }
- return non_const_bits;
-}
-
-/* Expand (the constant part of) a SET_TYPE CONSTRUCTOR node.
- The result is placed in BUFFER (which is an array of bytes).
- If the constructor is constant, NULL_TREE is returned.
- Otherwise, a TREE_LIST of the non-constant elements is emitted. */
-
-tree
-get_set_constructor_bytes (tree init, unsigned char *buffer, int wd_size)
-{
- int i;
- int set_word_size = BITS_PER_UNIT;
- int bit_size = wd_size * set_word_size;
- int bit_pos = 0;
- unsigned char *bytep = buffer;
- char *bit_buffer = alloca (bit_size);
- tree non_const_bits = get_set_constructor_bits (init, bit_buffer, bit_size);
-
- for (i = 0; i < wd_size; i++)
- buffer[i] = 0;
-
- for (i = 0; i < bit_size; i++)
- {
- if (bit_buffer[i])
- {
- if (BYTES_BIG_ENDIAN)
- *bytep |= (1 << (set_word_size - 1 - bit_pos));
- else
- *bytep |= 1 << bit_pos;
- }
- bit_pos++;
- if (bit_pos >= set_word_size)
- bit_pos = 0, bytep++;
- }
- return non_const_bits;
-}
-
#if defined ENABLE_TREE_CHECKING && (GCC_VERSION >= 2007)
/* Complain that the tree code of NODE does not match the expected 0
diff --git a/gcc/tree.h b/gcc/tree.h
index ccd85e6b45a..8779146db2a 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -2064,8 +2064,8 @@ struct tree_binfo GTY (())
#define DECL_FROM_INLINE(NODE) (DECL_ABSTRACT_ORIGIN (NODE) != NULL_TREE \
&& DECL_ABSTRACT_ORIGIN (NODE) != (NODE))
-/* Nonzero if a _DECL means that the name of this decl should be ignored
- for symbolic debug purposes. */
+/* Nonzero for a given ..._DECL node means that the name of this node should
+ be ignored for symbolic debug purposes. */
#define DECL_IGNORED_P(NODE) (DECL_CHECK (NODE)->decl.ignored_flag)
/* Nonzero for a given ..._DECL node means that this node represents an
@@ -2076,8 +2076,8 @@ struct tree_binfo GTY (())
any code or allocate any data space for such instances. */
#define DECL_ABSTRACT(NODE) (DECL_CHECK (NODE)->decl.abstract_flag)
-/* Nonzero if a _DECL means that no warnings should be generated just
- because this decl is unused. */
+/* Nonzero for a given ..._DECL node means that no warnings should be
+ generated just because this node is unused. */
#define DECL_IN_SYSTEM_HEADER(NODE) \
(DECL_CHECK (NODE)->decl.in_system_header_flag)
@@ -2806,6 +2806,7 @@ extern void init_ssanames (void);
extern void fini_ssanames (void);
extern tree make_ssa_name (tree, tree);
extern tree duplicate_ssa_name (tree, tree);
+extern void duplicate_ssa_name_ptr_info (tree, struct ptr_info_def *);
extern void release_ssa_name (tree);
extern void release_defs (tree);
extern void replace_ssa_name_symbol (tree, tree);
@@ -3458,8 +3459,6 @@ extern GTY(()) const char * current_function_func_begin_label;
extern unsigned crc32_string (unsigned, const char *);
extern void clean_symbol_name (char *);
extern tree get_file_function_name_long (const char *);
-extern tree get_set_constructor_bits (tree, char *, int);
-extern tree get_set_constructor_bytes (tree, unsigned char *, int);
extern tree get_callee_fndecl (tree);
extern void change_decl_assembler_name (tree, tree);
extern int type_num_arguments (tree);
@@ -3493,6 +3492,9 @@ extern void using_eh_for_cleanups (void);
subexpressions are not changed. */
extern tree fold (tree);
+extern tree fold_build1 (enum tree_code, tree, tree);
+extern tree fold_build2 (enum tree_code, tree, tree, tree);
+extern tree fold_build3 (enum tree_code, tree, tree, tree, tree);
extern tree fold_initializer (tree);
extern tree fold_convert (tree, tree);
extern tree fold_single_bit_test (enum tree_code, tree, tree, tree);
@@ -3751,6 +3753,10 @@ extern tree resolve_asm_operand_names (tree, tree, tree);
extern void expand_case (tree);
extern void expand_decl (tree);
extern void expand_anon_union_decl (tree, tree, tree);
+#ifdef HARD_CONST
+/* Silly ifdef to avoid having all includers depend on hard-reg-set.h. */
+extern bool decl_overlaps_hard_reg_set_p (tree, const HARD_REG_SET);
+#endif
/* In gimplify.c. */
extern tree create_artificial_label (void);
diff --git a/gcc/treelang/ChangeLog b/gcc/treelang/ChangeLog
index 3a780f58b24..dbf1bdc3e90 100644
--- a/gcc/treelang/ChangeLog
+++ b/gcc/treelang/ChangeLog
@@ -1,3 +1,22 @@
+2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
+
+ * treetree.c (LANG_HOOKS_TRUTHVALUE_CONVERSION,
+ tree_lang_truthvalue_conversion): Remove.
+ * tree-convert.c: Don't call truthvalue_conversion.
+
+2005-03-22 James A. Morrison <phython@gcc.gnu.org>
+
+ * treetree.c (tree_code_if_start): Use fold_buildN.
+ (tree_code_create_variable): Likewise.
+ (tree_code_generate_return): Likewise.
+ (tree_code_get_expression): Likewise.
+ (tree_code_add_parameter): Likewise.
+
+2005-03-22 James A. Morrison <phython@gcc.gnu.org>
+
+ * treelang.h (struct parameter_part): Skip WHERE_TO_PUT_VAR_TREE
+ during GC.
+
2005-03-15 Zack Weinberg <zack@codesourcery.com>
* Make-lang.in (TEXI_TREELANG_FILES): Add gcc-vers.texi.
diff --git a/gcc/treelang/tree-convert.c b/gcc/treelang/tree-convert.c
index 77741453f40..929fbd5506c 100644
--- a/gcc/treelang/tree-convert.c
+++ b/gcc/treelang/tree-convert.c
@@ -85,7 +85,7 @@ convert (tree type, tree expr)
return fold (convert_to_integer (type, e));
if (code == BOOLEAN_TYPE)
{
- tree t = (*lang_hooks.truthvalue_conversion) (expr);
+ tree t = expr;
/* If it returns a NOP_EXPR, we must fold it here to avoid
infinite recursion between fold () and convert (). */
if (TREE_CODE (t) == NOP_EXPR)
diff --git a/gcc/treelang/treelang.h b/gcc/treelang/treelang.h
index c0d85de1090..5b3b76617dd 100644
--- a/gcc/treelang/treelang.h
+++ b/gcc/treelang/treelang.h
@@ -125,7 +125,7 @@ struct parameter_part GTY(())
{
struct prod_token_parm_item *next; /* Next entry. */
unsigned char* variable_name; /* Name. */
- tree * GTY ((length ("1"))) where_to_put_var_tree; /* Where to save decl. */
+ tree * GTY ((skip)) where_to_put_var_tree; /* Where to save decl. */
};
/* A production or a token. */
diff --git a/gcc/treelang/treetree.c b/gcc/treelang/treetree.c
index aea6e0ba5cb..6d98e235022 100644
--- a/gcc/treelang/treetree.c
+++ b/gcc/treelang/treetree.c
@@ -124,7 +124,6 @@ struct language_function GTY(())
char junk; /* dummy field to ensure struct is not empty */
};
-static tree tree_lang_truthvalue_conversion (tree expr);
static bool tree_mark_addressable (tree exp);
static tree tree_lang_type_for_size (unsigned precision, int unsignedp);
static tree tree_lang_type_for_mode (enum machine_mode mode, int unsignedp);
@@ -153,8 +152,6 @@ static void treelang_expand_function (tree fndecl);
end). These are not really very language-dependent, i.e.
treelang, C, Mercury, etc. can all use almost the same definitions. */
-#undef LANG_HOOKS_TRUTHVALUE_CONVERSION
-#define LANG_HOOKS_TRUTHVALUE_CONVERSION tree_lang_truthvalue_conversion
#undef LANG_HOOKS_MARK_ADDRESSABLE
#define LANG_HOOKS_MARK_ADDRESSABLE tree_mark_addressable
#undef LANG_HOOKS_SIGNED_TYPE
@@ -257,9 +254,9 @@ void
tree_code_if_start (tree exp, location_t loc)
{
tree cond_exp, cond;
- cond_exp = fold (build2 (NE_EXPR, boolean_type_node, exp,
- fold (build1 (CONVERT_EXPR, TREE_TYPE (exp),
- integer_zero_node))));
+ cond_exp = fold_build2 (NE_EXPR, boolean_type_node, exp,
+ fold_build1 (CONVERT_EXPR, TREE_TYPE (exp),
+ integer_zero_node));
SET_EXPR_LOCATION (cond_exp, loc);
cond = build3 (COND_EXPR, void_type_node, cond_exp, NULL_TREE,
NULL_TREE);
@@ -525,7 +522,7 @@ tree_code_create_variable (unsigned int storage_class,
/* 3a. Initialization. */
if (init)
- DECL_INITIAL (var_decl) = fold (build1 (CONVERT_EXPR, var_type, init));
+ DECL_INITIAL (var_decl) = fold_build1 (CONVERT_EXPR, var_type, init);
else
DECL_INITIAL (var_decl) = NULL_TREE;
@@ -583,9 +580,9 @@ tree_code_generate_return (tree type, tree exp)
if (exp && TREE_TYPE (TREE_TYPE (current_function_decl)) != void_type_node)
{
- setret = fold (build2 (MODIFY_EXPR, type,
- DECL_RESULT (current_function_decl),
- fold (build1 (CONVERT_EXPR, type, exp))));
+ setret = fold_build2 (MODIFY_EXPR, type,
+ DECL_RESULT (current_function_decl),
+ fold_build1 (CONVERT_EXPR, type, exp));
TREE_SIDE_EFFECTS (setret) = 1;
TREE_USED (setret) = 1;
setret = build1 (RETURN_EXPR, type, setret);
@@ -661,9 +658,8 @@ tree_code_get_expression (unsigned int exp_type,
case EXP_ASSIGN:
gcc_assert (op1 && op2);
operator = MODIFY_EXPR;
- ret1 = fold (build2 (operator, void_type_node, op1,
- fold (build1 (CONVERT_EXPR, TREE_TYPE (op1),
- op2))));
+ ret1 = fold_build2 (operator, void_type_node, op1,
+ fold_build1 (CONVERT_EXPR, TREE_TYPE (op1), op2));
break;
@@ -682,9 +678,9 @@ tree_code_get_expression (unsigned int exp_type,
/* Expand a binary expression. Ensure the operands are the right type. */
binary_expression:
gcc_assert (op1 && op2);
- ret1 = fold (build2 (operator, type,
- fold (build1 (CONVERT_EXPR, type, op1)),
- fold (build1 (CONVERT_EXPR, type, op2))));
+ ret1 = fold_build2 (operator, type,
+ fold_build1 (CONVERT_EXPR, type, op1),
+ fold_build1 (CONVERT_EXPR, type, op2));
break;
/* Reference to a variable. This is dead easy, just return the
@@ -697,7 +693,7 @@ tree_code_get_expression (unsigned int exp_type,
if (type == TREE_TYPE (op1))
ret1 = build1 (NOP_EXPR, type, op1);
else
- ret1 = fold (build1 (CONVERT_EXPR, type, op1));
+ ret1 = fold_build1 (CONVERT_EXPR, type, op1);
break;
case EXP_FUNCTION_INVOCATION:
@@ -705,9 +701,10 @@ tree_code_get_expression (unsigned int exp_type,
{
tree fun_ptr;
TREE_USED (op1) = 1;
- fun_ptr = fold (build1 (ADDR_EXPR,
- build_pointer_type (TREE_TYPE (op1)), op1));
- ret1 = build3 (CALL_EXPR, type, fun_ptr, nreverse (op2), NULL_TREE);
+ fun_ptr = fold_build1 (ADDR_EXPR,
+ build_pointer_type (TREE_TYPE (op1)), op1);
+ ret1 = fold_build3 (CALL_EXPR, type, fun_ptr, nreverse (op2),
+ NULL_TREE);
}
break;
@@ -738,8 +735,8 @@ tree_code_add_parameter (tree list, tree proto_exp, tree exp)
{
tree new_exp;
new_exp = tree_cons (NULL_TREE,
- fold (build1 (CONVERT_EXPR, TREE_TYPE (proto_exp),
- exp)), NULL_TREE);
+ fold_build1 (CONVERT_EXPR, TREE_TYPE (proto_exp),
+ exp), NULL_TREE);
if (!list)
return new_exp;
return chainon (new_exp, list);
@@ -781,13 +778,6 @@ dt (tree t)
allocate each of them once. Signed and unsigned types are kept separate. */
static GTY(()) tree signed_and_unsigned_types[MAX_BITS_PER_WORD + 1][2];
-/* XXX is this definition OK? */
-static tree
-tree_lang_truthvalue_conversion (tree expr)
-{
- return expr;
-}
-
/* Mark EXP saying that we need to be able to take the
address of it; it should not be allocated in a register.
Value is 1 if successful.
diff --git a/gcc/tsystem.h b/gcc/tsystem.h
index b2b95446c6f..1ed0cde6841 100644
--- a/gcc/tsystem.h
+++ b/gcc/tsystem.h
@@ -1,6 +1,6 @@
/* Get common system includes and various definitions and declarations
based on target macros.
- Copyright (C) 2000, 2001, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001, 2004, 2005 Free Software Foundation, Inc.
This file is part of GCC.
@@ -121,4 +121,14 @@ extern int errno;
#undef alloca
#define alloca(x) __builtin_alloca(x)
+#ifdef ENABLE_RUNTIME_CHECKING
+#define gcc_assert(EXPR) ((void)(!(EXPR) ? abort (), 0 : 0))
+#else
+/* Include EXPR, so that unused variable warnings do not occur. */
+#define gcc_assert(EXPR) ((void)(0 && (EXPR)))
+#endif
+/* Use gcc_unreachable() to mark unreachable locations (like an
+ unreachable default case of a switch. Do not use gcc_assert(0). */
+#define gcc_unreachable() (abort ())
+
#endif /* ! GCC_TSYSTEM_H */
diff --git a/gcc/value-prof.c b/gcc/value-prof.c
index c3a70f9e391..4712b523824 100644
--- a/gcc/value-prof.c
+++ b/gcc/value-prof.c
@@ -34,9 +34,20 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "optabs.h"
#include "regs.h"
#include "ggc.h"
+#include "tree-flow.h"
+#include "tree-flow-inline.h"
+#include "diagnostic.h"
+#include "tree.h"
+#include "gcov-io.h"
static struct value_prof_hooks *value_prof_hooks;
+/* This is the vector of histograms. Created in find_values_to_profile.
+ During profile generation, freed by instrument_values.
+ During profile use, freed by value_profile_transformations. */
+
+static histogram_values static_values = NULL;
+
/* In this file value profile based optimizations are placed. Currently the
following optimizations are implemented (for more detailed descriptions
see comments at value_profile_transformations):
@@ -53,19 +64,38 @@ static struct value_prof_hooks *value_prof_hooks;
in profile.c and the requested values are instrumented by it in the first
compilation with -fprofile-arcs. The optimization may then read the
gathered data in the second compilation with -fbranch-probabilities.
- The measured data is appended as REG_VALUE_PROFILE note to the instrumented
- insn. The argument to the note consists of an EXPR_LIST where its
- members have the following meaning (from the first to the last):
+
+ There are currently two versions, RTL-based and tree-based. Over time
+ the RTL-based version may go away.
+
+ In the RTL-based version, the measured data is appended as REG_VALUE_PROFILE
+ note to the instrumented insn. The argument to the note consists of an
+ EXPR_LIST where its members have the following meaning (from the first to
+ the last):
-- type of information gathered (HIST_TYPE*)
-- the expression that is profiled
- -- list of counters starting from the first one. */
+ -- list of counters starting from the first one.
+
+ In the tree-based version, the measured data is pointed to from the histograms
+ field of the statement annotation of the instrumented insns. It is
+ kept as a linked list of struct histogram_value_t's, which contain the
+ same information as above. */
/* For speculative prefetching, the range in that we do not prefetch (because
we assume that it will be in cache anyway). The asymmetry between min and
max range is trying to reflect the fact that the sequential prefetching
of the data is commonly done directly by hardware. Nevertheless, these
- values are just a guess and should of course be target-specific. */
+ values are just a guess and should of course be target-specific.
+
+ FIXME: There is no tree form of speculative prefetching as yet.
+
+ FIXME: A better approach to instrumentation in the profile-generation
+ pass is to generate calls to magic library functions (to be added to
+ libgcc) rather than inline code. This approach will probably be
+ necessary to get tree-based speculative prefetching working in a useful
+ fashion, as inline code bloats things so much the rest of the compiler has
+ serious problems dealing with it (judging from the rtl behavior). */
#ifndef NOPREFETCH_RANGE_MIN
#define NOPREFETCH_RANGE_MIN (-16)
@@ -74,7 +104,7 @@ static struct value_prof_hooks *value_prof_hooks;
#define NOPREFETCH_RANGE_MAX 32
#endif
-static void insn_divmod_values_to_profile (rtx, histogram_values *);
+static void rtl_divmod_values_to_profile (rtx, histogram_values *);
#ifdef HAVE_prefetch
static bool insn_prefetch_values_to_profile (rtx, histogram_values *);
static int find_mem_reference_1 (rtx *, void *);
@@ -82,26 +112,37 @@ static void find_mem_reference_2 (rtx, rtx, void *);
static bool find_mem_reference (rtx, rtx *, int *);
#endif
-static void insn_values_to_profile (rtx, histogram_values *);
-static rtx gen_divmod_fixed_value (enum machine_mode, enum rtx_code, rtx, rtx,
+static void rtl_values_to_profile (rtx, histogram_values *);
+static rtx rtl_divmod_fixed_value (enum machine_mode, enum rtx_code, rtx, rtx,
rtx, gcov_type, int);
-static rtx gen_mod_pow2 (enum machine_mode, enum rtx_code, rtx, rtx, rtx, int);
-static rtx gen_mod_subtract (enum machine_mode, enum rtx_code, rtx, rtx, rtx,
+static rtx rtl_mod_pow2 (enum machine_mode, enum rtx_code, rtx, rtx, rtx, int);
+static rtx rtl_mod_subtract (enum machine_mode, enum rtx_code, rtx, rtx, rtx,
int, int, int);
#ifdef HAVE_prefetch
static rtx gen_speculative_prefetch (rtx, gcov_type, int);
#endif
-static bool divmod_fixed_value_transform (rtx insn);
-static bool mod_pow2_value_transform (rtx);
-static bool mod_subtract_transform (rtx);
+static bool rtl_divmod_fixed_value_transform (rtx);
+static bool rtl_mod_pow2_value_transform (rtx);
+static bool rtl_mod_subtract_transform (rtx);
#ifdef HAVE_prefetch
static bool speculative_prefetching_transform (rtx);
#endif
+static void tree_divmod_values_to_profile (tree, histogram_values *);
+static void tree_values_to_profile (tree, histogram_values *);
+static tree tree_divmod_fixed_value (tree, tree, tree, tree,
+ tree, int, gcov_type, gcov_type);
+static tree tree_mod_pow2 (tree, tree, tree, tree, int, gcov_type, gcov_type);
+static tree tree_mod_subtract (tree, tree, tree, tree, int, int, int,
+ gcov_type, gcov_type, gcov_type);
+static bool tree_divmod_fixed_value_transform (tree);
+static bool tree_mod_pow2_value_transform (tree);
+static bool tree_mod_subtract_transform (tree);
+
/* Find values inside INSN for that we want to measure histograms for
division/modulo optimization and stores them to VALUES. */
static void
-insn_divmod_values_to_profile (rtx insn, histogram_values *values)
+rtl_divmod_values_to_profile (rtx insn, histogram_values *values)
{
rtx set, set_src, op1, op2;
enum machine_mode mode;
@@ -134,10 +175,10 @@ insn_divmod_values_to_profile (rtx insn, histogram_values *values)
if ((GET_CODE (set_src) == UMOD) && !CONSTANT_P (op2))
{
hist = ggc_alloc (sizeof (*hist));
- hist->value = op2;
- hist->seq = NULL_RTX;
- hist->mode = mode;
- hist->insn = insn;
+ hist->hvalue.rtl.value = op2;
+ hist->hvalue.rtl.seq = NULL_RTX;
+ hist->hvalue.rtl.mode = mode;
+ hist->hvalue.rtl.insn = insn;
hist->type = HIST_TYPE_POW2;
hist->hdata.pow2.may_be_other = 1;
VEC_safe_push (histogram_value, *values, hist);
@@ -147,10 +188,10 @@ insn_divmod_values_to_profile (rtx insn, histogram_values *values)
if (!CONSTANT_P (op2))
{
hist = ggc_alloc (sizeof (*hist));
- hist->value = op2;
- hist->mode = mode;
- hist->seq = NULL_RTX;
- hist->insn = insn;
+ hist->hvalue.rtl.value = op2;
+ hist->hvalue.rtl.mode = mode;
+ hist->hvalue.rtl.seq = NULL_RTX;
+ hist->hvalue.rtl.insn = insn;
hist->type = HIST_TYPE_SINGLE_VALUE;
VEC_safe_push (histogram_value, *values, hist);
}
@@ -164,16 +205,14 @@ insn_divmod_values_to_profile (rtx insn, histogram_values *values)
hist = ggc_alloc (sizeof (*hist));
start_sequence ();
tmp = simplify_gen_binary (DIV, mode, copy_rtx (op1), copy_rtx (op2));
- hist->value = force_operand (tmp, NULL_RTX);
- hist->seq = get_insns ();
+ hist->hvalue.rtl.value = force_operand (tmp, NULL_RTX);
+ hist->hvalue.rtl.seq = get_insns ();
end_sequence ();
- hist->mode = mode;
- hist->insn = insn;
+ hist->hvalue.rtl.mode = mode;
+ hist->hvalue.rtl.insn = insn;
hist->type = HIST_TYPE_INTERVAL;
hist->hdata.intvl.int_start = 0;
hist->hdata.intvl.steps = 2;
- hist->hdata.intvl.may_be_less = 1;
- hist->hdata.intvl.may_be_more = 1;
VEC_safe_push (histogram_value, *values, hist);
}
return;
@@ -239,7 +278,7 @@ find_mem_reference (rtx insn, rtx *mem, int *write)
Returns true if such we found any such value, false otherwise. */
static bool
-insn_prefetch_values_to_profile (rtx insn, histogram_values *values)
+insn_prefetch_values_to_profile (rtx insn, histogram_values* values)
{
rtx mem, address;
int write;
@@ -260,10 +299,10 @@ insn_prefetch_values_to_profile (rtx insn, histogram_values *values)
return false;
hist = ggc_alloc (sizeof (*hist));
- hist->value = address;
- hist->mode = GET_MODE (address);
- hist->seq = NULL_RTX;
- hist->insn = insn;
+ hist->hvalue.rtl.value = address;
+ hist->hvalue.rtl.mode = GET_MODE (address);
+ hist->hvalue.rtl.seq = NULL_RTX;
+ hist->hvalue.rtl.insn = insn;
hist->type = HIST_TYPE_CONST_DELTA;
VEC_safe_push (histogram_value, *values, hist);
@@ -273,10 +312,10 @@ insn_prefetch_values_to_profile (rtx insn, histogram_values *values)
/* Find values inside INSN for that we want to measure histograms and adds
them to list VALUES (increasing the record of its length in N_VALUES). */
static void
-insn_values_to_profile (rtx insn, histogram_values *values)
+rtl_values_to_profile (rtx insn, histogram_values *values)
{
if (flag_value_profile_transformations)
- insn_divmod_values_to_profile (insn, values);
+ rtl_divmod_values_to_profile (insn, values);
#ifdef HAVE_prefetch
if (flag_speculative_prefetching)
@@ -296,23 +335,8 @@ rtl_find_values_to_profile (histogram_values *values)
*values = VEC_alloc (histogram_value, 0);
libcall_level = 0;
for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
- {
- if (find_reg_note (insn, REG_LIBCALL, NULL_RTX))
- libcall_level++;
-
- /* Do not instrument values inside libcalls (we are going to split block
- due to instrumentation, and libcall blocks should be local to a single
- basic block). */
- if (!libcall_level)
- insn_values_to_profile (insn, values);
-
- if (find_reg_note (insn, REG_RETVAL, NULL_RTX))
- {
- gcc_assert (libcall_level > 0);
- libcall_level--;
- }
- }
- gcc_assert (libcall_level == 0);
+ rtl_values_to_profile (insn, values);
+ static_values = *values;
for (i = 0; i < VEC_length (histogram_value, *values); i++)
{
@@ -324,22 +348,20 @@ rtl_find_values_to_profile (histogram_values *values)
if (dump_file)
fprintf (dump_file,
"Interval counter for insn %d, range %d -- %d.\n",
- INSN_UID ((rtx)hist->insn),
+ INSN_UID ((rtx)hist->hvalue.rtl.insn),
hist->hdata.intvl.int_start,
(hist->hdata.intvl.int_start
+ hist->hdata.intvl.steps - 1));
- hist->n_counters = hist->hdata.intvl.steps +
- (hist->hdata.intvl.may_be_less ? 1 : 0) +
- (hist->hdata.intvl.may_be_more ? 1 : 0);
+ hist->n_counters = hist->hdata.intvl.steps + 2;
break;
case HIST_TYPE_POW2:
if (dump_file)
fprintf (dump_file,
"Pow2 counter for insn %d.\n",
- INSN_UID ((rtx)hist->insn));
+ INSN_UID ((rtx)hist->hvalue.rtl.insn));
hist->n_counters
- = GET_MODE_BITSIZE (hist->mode)
+ = GET_MODE_BITSIZE (hist->hvalue.rtl.mode)
+ (hist->hdata.pow2.may_be_other ? 1 : 0);
break;
@@ -347,7 +369,7 @@ rtl_find_values_to_profile (histogram_values *values)
if (dump_file)
fprintf (dump_file,
"Single value counter for insn %d.\n",
- INSN_UID ((rtx)hist->insn));
+ INSN_UID ((rtx)hist->hvalue.rtl.insn));
hist->n_counters = 3;
break;
@@ -355,7 +377,7 @@ rtl_find_values_to_profile (histogram_values *values)
if (dump_file)
fprintf (dump_file,
"Constant delta counter for insn %d.\n",
- INSN_UID ((rtx)hist->insn));
+ INSN_UID ((rtx)hist->hvalue.rtl.insn));
hist->n_counters = 4;
break;
@@ -493,9 +515,9 @@ rtl_value_profile_transformations (void)
/* Transformations: */
if (flag_value_profile_transformations
- && (mod_subtract_transform (insn)
- || divmod_fixed_value_transform (insn)
- || mod_pow2_value_transform (insn)))
+ && (rtl_mod_subtract_transform (insn)
+ || rtl_divmod_fixed_value_transform (insn)
+ || rtl_mod_pow2_value_transform (insn)))
changed = true;
#ifdef HAVE_prefetch
if (flag_speculative_prefetching
@@ -517,7 +539,7 @@ rtl_value_profile_transformations (void)
and OP2, whose value is expected to be VALUE, result TARGET and
probability of taking the optimal path PROB). */
static rtx
-gen_divmod_fixed_value (enum machine_mode mode, enum rtx_code operation,
+rtl_divmod_fixed_value (enum machine_mode mode, enum rtx_code operation,
rtx target, rtx op1, rtx op2, gcov_type value,
int prob)
{
@@ -571,7 +593,7 @@ gen_divmod_fixed_value (enum machine_mode mode, enum rtx_code operation,
/* Do transform 1) on INSN if applicable. */
static bool
-divmod_fixed_value_transform (rtx insn)
+rtl_divmod_fixed_value_transform (rtx insn)
{
rtx set, set_src, set_dest, op1, op2, value, histogram;
enum rtx_code code;
@@ -630,7 +652,7 @@ divmod_fixed_value_transform (rtx insn)
delete_insn (insn);
insert_insn_on_edge (
- gen_divmod_fixed_value (mode, code, set_dest,
+ rtl_divmod_fixed_value (mode, code, set_dest,
op1, op2, val, prob), e);
return true;
@@ -639,7 +661,7 @@ divmod_fixed_value_transform (rtx insn)
/* Generate code for transformation 2 (with MODE and OPERATION, operands OP1
and OP2, result TARGET and probability of taking the optimal path PROB). */
static rtx
-gen_mod_pow2 (enum machine_mode mode, enum rtx_code operation, rtx target,
+rtl_mod_pow2 (enum machine_mode mode, enum rtx_code operation, rtx target,
rtx op1, rtx op2, int prob)
{
rtx tmp, tmp1, tmp2, tmp3, jump;
@@ -693,7 +715,7 @@ gen_mod_pow2 (enum machine_mode mode, enum rtx_code operation, rtx target,
/* Do transform 2) on INSN if applicable. */
static bool
-mod_pow2_value_transform (rtx insn)
+rtl_mod_pow2_value_transform (rtx insn)
{
rtx set, set_src, set_dest, op1, op2, value, histogram;
enum rtx_code code;
@@ -758,7 +780,7 @@ mod_pow2_value_transform (rtx insn)
delete_insn (insn);
insert_insn_on_edge (
- gen_mod_pow2 (mode, code, set_dest, op1, op2, prob), e);
+ rtl_mod_pow2 (mode, code, set_dest, op1, op2, prob), e);
return true;
}
@@ -767,7 +789,7 @@ mod_pow2_value_transform (rtx insn)
operands OP1 and OP2, result TARGET, at most SUB subtractions, and
probability of taking the optimal path(s) PROB1 and PROB2). */
static rtx
-gen_mod_subtract (enum machine_mode mode, enum rtx_code operation,
+rtl_mod_subtract (enum machine_mode mode, enum rtx_code operation,
rtx target, rtx op1, rtx op2, int sub, int prob1, int prob2)
{
rtx tmp, tmp1, jump;
@@ -824,7 +846,7 @@ gen_mod_subtract (enum machine_mode mode, enum rtx_code operation,
/* Do transforms 3) and 4) on INSN if applicable. */
static bool
-mod_subtract_transform (rtx insn)
+rtl_mod_subtract_transform (rtx insn)
{
rtx set, set_src, set_dest, op1, op2, histogram;
enum rtx_code code;
@@ -897,7 +919,7 @@ mod_subtract_transform (rtx insn)
delete_insn (insn);
insert_insn_on_edge (
- gen_mod_subtract (mode, code, set_dest,
+ rtl_mod_subtract (mode, code, set_dest,
op1, op2, i, prob1, prob2), e);
return true;
@@ -1008,6 +1030,586 @@ speculative_prefetching_transform (rtx insn)
return true;
}
#endif /* HAVE_prefetch */
+
+/* Tree based transformations. */
+static bool
+tree_value_profile_transformations (void)
+{
+ basic_block bb;
+ block_stmt_iterator bsi;
+ bool changed = false;
+
+ FOR_EACH_BB (bb)
+ {
+ /* Ignore cold areas -- we are enlarging the code. */
+ if (!maybe_hot_bb_p (bb))
+ continue;
+
+ for (bsi = bsi_start (bb); !bsi_end_p (bsi); bsi_next (&bsi))
+ {
+ tree stmt = bsi_stmt (bsi);
+ stmt_ann_t ann = get_stmt_ann (stmt);
+ histogram_value th = ann->histograms;
+ if (!th)
+ continue;
+
+ if (dump_file)
+ {
+ fprintf (dump_file, "Trying transformations on insn ");
+ print_generic_stmt (dump_file, stmt, TDF_SLIM);
+ }
+
+ /* Transformations: */
+ /* The order of things in this conditional controls which
+ transformation is used when more than one is applicable. */
+ /* It is expected that any code added by the transformations
+ will be added before the current statement, and that the
+ current statement remain valid (although possibly
+ modified) upon return. */
+ if (flag_value_profile_transformations
+ && (tree_mod_subtract_transform (stmt)
+ || tree_divmod_fixed_value_transform (stmt)
+ || tree_mod_pow2_value_transform (stmt)))
+ {
+ changed = true;
+ /* Original statement may no longer be in the same block. */
+ bb = bb_for_stmt (stmt);
+ }
+
+ /* Free extra storage from compute_value_histograms. */
+ while (th)
+ {
+ free (th->hvalue.tree.counters);
+ th = th->hvalue.tree.next;
+ }
+ ann->histograms = 0;
+ }
+ }
+
+ if (changed)
+ {
+ counts_to_freqs ();
+ }
+
+ return changed;
+}
+
+/* Generate code for transformation 1 (with OPERATION, operands OP1
+ and OP2, whose value is expected to be VALUE, parent modify-expr STMT and
+ probability of taking the optimal path PROB, which is equivalent to COUNT/ALL
+ within roundoff error). This generates the result into a temp and returns
+ the temp; it does not replace or alter the original STMT. */
+static tree
+tree_divmod_fixed_value (tree stmt, tree operation,
+ tree op1, tree op2, tree value, int prob, gcov_type count,
+ gcov_type all)
+{
+ tree stmt1, stmt2, stmt3;
+ tree tmp1, tmp2, tmpv;
+ tree label_decl1 = create_artificial_label ();
+ tree label_decl2 = create_artificial_label ();
+ tree label_decl3 = create_artificial_label ();
+ tree label1, label2, label3;
+ tree bb1end, bb2end, bb3end;
+ basic_block bb, bb2, bb3, bb4;
+ tree optype = TREE_TYPE (operation);
+ edge e12, e13, e23, e24, e34;
+ block_stmt_iterator bsi;
+
+ bb = bb_for_stmt (stmt);
+ bsi = bsi_for_stmt (stmt);
+
+ tmpv = create_tmp_var (optype, "PROF");
+ tmp1 = create_tmp_var (optype, "PROF");
+ stmt1 = build2 (MODIFY_EXPR, optype, tmpv, fold_convert (optype, value));
+ stmt2 = build2 (MODIFY_EXPR, optype, tmp1, op2);
+ stmt3 = build3 (COND_EXPR, void_type_node,
+ build2 (NE_EXPR, boolean_type_node, tmp1, tmpv),
+ build1 (GOTO_EXPR, void_type_node, label_decl2),
+ build1 (GOTO_EXPR, void_type_node, label_decl1));
+ bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt2, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt3, BSI_SAME_STMT);
+ bb1end = stmt3;
+
+ tmp2 = create_tmp_var (optype, "PROF");
+ label1 = build1 (LABEL_EXPR, void_type_node, label_decl1);
+ stmt1 = build2 (MODIFY_EXPR, optype, tmp2,
+ build2 (TREE_CODE (operation), optype, op1, tmpv));
+ bsi_insert_before (&bsi, label1, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT);
+ bb2end = stmt1;
+
+ label2 = build1 (LABEL_EXPR, void_type_node, label_decl2);
+ stmt1 = build2 (MODIFY_EXPR, optype, tmp2,
+ build2 (TREE_CODE (operation), optype, op1, op2));
+ bsi_insert_before (&bsi, label2, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT);
+ bb3end = stmt1;
+
+ label3 = build1 (LABEL_EXPR, void_type_node, label_decl3);
+ bsi_insert_before (&bsi, label3, BSI_SAME_STMT);
+
+ /* Fix CFG. */
+ /* Edge e23 connects bb2 to bb3, etc. */
+ e12 = split_block (bb, bb1end);
+ bb2 = e12->dest;
+ bb2->count = count;
+ e23 = split_block (bb2, bb2end);
+ bb3 = e23->dest;
+ bb3->count = all - count;
+ e34 = split_block (bb3, bb3end);
+ bb4 = e34->dest;
+ bb4->count = all;
+
+ e12->flags &= ~EDGE_FALLTHRU;
+ e12->flags |= EDGE_FALSE_VALUE;
+ e12->probability = prob;
+ e12->count = count;
+
+ e13 = make_edge (bb, bb3, EDGE_TRUE_VALUE);
+ e13->probability = REG_BR_PROB_BASE - prob;
+ e13->count = all - count;
+
+ remove_edge (e23);
+
+ e24 = make_edge (bb2, bb4, EDGE_FALLTHRU);
+ e24->probability = REG_BR_PROB_BASE;
+ e24->count = count;
+
+ e34->probability = REG_BR_PROB_BASE;
+ e34->count = all - count;
+
+ return tmp2;
+}
+
+/* Do transform 1) on INSN if applicable. */
+static bool
+tree_divmod_fixed_value_transform (tree stmt)
+{
+ stmt_ann_t ann = get_stmt_ann (stmt);
+ histogram_value histogram;
+ enum tree_code code;
+ gcov_type val, count, all;
+ tree modify, op, op1, op2, result, value, tree_val;
+ int prob;
+
+ modify = stmt;
+ if (TREE_CODE (stmt) == RETURN_EXPR
+ && TREE_OPERAND (stmt, 0)
+ && TREE_CODE (TREE_OPERAND (stmt, 0)) == MODIFY_EXPR)
+ modify = TREE_OPERAND (stmt, 0);
+ if (TREE_CODE (modify) != MODIFY_EXPR)
+ return false;
+ op = TREE_OPERAND (modify, 1);
+ if (!INTEGRAL_TYPE_P (TREE_TYPE (op)))
+ return false;
+ code = TREE_CODE (op);
+
+ if (code != TRUNC_DIV_EXPR && code != TRUNC_MOD_EXPR)
+ return false;
+
+ op1 = TREE_OPERAND (op, 0);
+ op2 = TREE_OPERAND (op, 1);
+ if (!ann->histograms)
+ return false;
+
+ for (histogram = ann->histograms; histogram; histogram = histogram->hvalue.tree.next)
+ if (histogram->type == HIST_TYPE_SINGLE_VALUE)
+ break;
+
+ if (!histogram)
+ return false;
+
+ value = histogram->hvalue.tree.value;
+ val = histogram->hvalue.tree.counters[0];
+ count = histogram->hvalue.tree.counters[1];
+ all = histogram->hvalue.tree.counters[2];
+
+ /* We require that count is at least half of all; this means
+ that for the transformation to fire the value must be constant
+ at least 50% of time (and 75% gives the guarantee of usage). */
+ if (simple_cst_equal (op2, value) != 1 || 2 * count < all)
+ return false;
+
+ if (dump_file)
+ {
+ fprintf (dump_file, "Div/mod by constant transformation on insn ");
+ print_generic_stmt (dump_file, stmt, TDF_SLIM);
+ }
+
+ /* Compute probability of taking the optimal path. */
+ prob = (count * REG_BR_PROB_BASE + all / 2) / all;
+
+ tree_val = build_int_cst_wide (GCOV_TYPE_NODE, val & 0xffffffffull, val >> 32);
+ result = tree_divmod_fixed_value (stmt, op, op1, op2, tree_val, prob, count, all);
+
+ TREE_OPERAND (modify, 1) = result;
+
+ return true;
+}
+
+/* Generate code for transformation 2 (with OPERATION, operands OP1
+ and OP2, parent modify-expr STMT and probability of taking the optimal
+ path PROB, which is equivalent to COUNT/ALL within roundoff error).
+ This generates the result into a temp and returns
+ the temp; it does not replace or alter the original STMT. */
+static tree
+tree_mod_pow2 (tree stmt, tree operation, tree op1, tree op2, int prob,
+ gcov_type count, gcov_type all)
+{
+ tree stmt1, stmt2, stmt3, stmt4;
+ tree tmp1, tmp2, tmp3;
+ tree label_decl1 = create_artificial_label ();
+ tree label_decl2 = create_artificial_label ();
+ tree label_decl3 = create_artificial_label ();
+ tree label1, label2, label3;
+ tree bb1end, bb2end, bb3end;
+ basic_block bb, bb2, bb3, bb4;
+ tree optype = TREE_TYPE (operation);
+ edge e12, e13, e23, e24, e34;
+ block_stmt_iterator bsi;
+ tree result = create_tmp_var (optype, "PROF");
+
+ bb = bb_for_stmt (stmt);
+ bsi = bsi_for_stmt (stmt);
+
+ tmp1 = create_tmp_var (optype, "PROF");
+ tmp2 = create_tmp_var (optype, "PROF");
+ tmp3 = create_tmp_var (optype, "PROF");
+ stmt1 = build2 (MODIFY_EXPR, optype, tmp1, fold_convert (optype, op2));
+ stmt2 = build2 (MODIFY_EXPR, optype, tmp2,
+ build2 (PLUS_EXPR, optype, op2, integer_minus_one_node));
+ stmt3 = build2 (MODIFY_EXPR, optype, tmp3,
+ build2 (BIT_AND_EXPR, optype, tmp2, tmp1));
+ stmt4 = build3 (COND_EXPR, void_type_node,
+ build2 (NE_EXPR, boolean_type_node, tmp3, integer_zero_node),
+ build1 (GOTO_EXPR, void_type_node, label_decl2),
+ build1 (GOTO_EXPR, void_type_node, label_decl1));
+ bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt2, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt3, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt4, BSI_SAME_STMT);
+ bb1end = stmt4;
+
+ /* tmp2 == op2-1 inherited from previous block */
+ label1 = build1 (LABEL_EXPR, void_type_node, label_decl1);
+ stmt1 = build2 (MODIFY_EXPR, optype, result,
+ build2 (BIT_AND_EXPR, optype, op1, tmp2));
+ bsi_insert_before (&bsi, label1, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT);
+ bb2end = stmt1;
+
+ label2 = build1 (LABEL_EXPR, void_type_node, label_decl2);
+ stmt1 = build2 (MODIFY_EXPR, optype, result,
+ build2 (TREE_CODE (operation), optype, op1, op2));
+ bsi_insert_before (&bsi, label2, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT);
+ bb3end = stmt1;
+
+ label3 = build1 (LABEL_EXPR, void_type_node, label_decl3);
+ bsi_insert_before (&bsi, label3, BSI_SAME_STMT);
+
+ /* Fix CFG. */
+ /* Edge e23 connects bb2 to bb3, etc. */
+ e12 = split_block (bb, bb1end);
+ bb2 = e12->dest;
+ bb2->count = count;
+ e23 = split_block (bb2, bb2end);
+ bb3 = e23->dest;
+ bb3->count = all - count;
+ e34 = split_block (bb3, bb3end);
+ bb4 = e34->dest;
+ bb4->count = all;
+
+ e12->flags &= ~EDGE_FALLTHRU;
+ e12->flags |= EDGE_FALSE_VALUE;
+ e12->probability = prob;
+ e12->count = count;
+
+ e13 = make_edge (bb, bb3, EDGE_TRUE_VALUE);
+ e13->probability = REG_BR_PROB_BASE - prob;
+ e13->count = all - count;
+
+ remove_edge (e23);
+
+ e24 = make_edge (bb2, bb4, EDGE_FALLTHRU);
+ e24->probability = REG_BR_PROB_BASE;
+ e24->count = count;
+
+ e34->probability = REG_BR_PROB_BASE;
+ e34->count = all - count;
+
+ return result;
+}
+
+/* Do transform 2) on INSN if applicable. */
+static bool
+tree_mod_pow2_value_transform (tree stmt)
+{
+ stmt_ann_t ann = get_stmt_ann (stmt);
+ histogram_value histogram;
+ enum tree_code code;
+ gcov_type count, wrong_values, all;
+ tree modify, op, op1, op2, result, value;
+ int prob;
+ unsigned int i;
+
+ modify = stmt;
+ if (TREE_CODE (stmt) == RETURN_EXPR
+ && TREE_OPERAND (stmt, 0)
+ && TREE_CODE (TREE_OPERAND (stmt, 0)) == MODIFY_EXPR)
+ modify = TREE_OPERAND (stmt, 0);
+ if (TREE_CODE (modify) != MODIFY_EXPR)
+ return false;
+ op = TREE_OPERAND (modify, 1);
+ if (!INTEGRAL_TYPE_P (TREE_TYPE (op)))
+ return false;
+ code = TREE_CODE (op);
+
+ if (code != TRUNC_MOD_EXPR || !TYPE_UNSIGNED (TREE_TYPE (op)))
+ return false;
+
+ op1 = TREE_OPERAND (op, 0);
+ op2 = TREE_OPERAND (op, 1);
+ if (!ann->histograms)
+ return false;
+
+ for (histogram = ann->histograms; histogram; histogram = histogram->hvalue.tree.next)
+ if (histogram->type == HIST_TYPE_POW2)
+ break;
+
+ if (!histogram)
+ return false;
+
+ value = histogram->hvalue.tree.value;
+ wrong_values = histogram->hvalue.tree.counters[0];
+ count = 0;
+ for (i = 1; i <= TREE_INT_CST_LOW (TYPE_SIZE (TREE_TYPE (stmt))); i++)
+ count += histogram->hvalue.tree.counters[i];
+
+ /* We require that we hit a power of 2 at least half of all evaluations. */
+ if (simple_cst_equal (op2, value) != 1 || count < wrong_values)
+ return false;
+
+ if (dump_file)
+ {
+ fprintf (dump_file, "Mod power of 2 transformation on insn ");
+ print_generic_stmt (dump_file, stmt, TDF_SLIM);
+ }
+
+ /* Compute probability of taking the optimal path. */
+ all = count + wrong_values;
+ prob = (count * REG_BR_PROB_BASE + all / 2) / all;
+
+ result = tree_mod_pow2 (stmt, op, op1, op2, prob, count, all);
+
+ TREE_OPERAND (modify, 1) = result;
+
+ return true;
+}
+
+/* Generate code for transformations 3 and 4 (with OPERATION, operands OP1
+ and OP2, parent modify-expr STMT, and NCOUNTS the number of cases to
+ support. Currently only NCOUNTS==0 or 1 is supported and this is
+ built into this interface. The probabilities of taking the optimal
+ paths are PROB1 and PROB2, which are equivalent to COUNT1/ALL and
+ COUNT2/ALL respectively within roundoff error). This generates the
+ result into a temp and returns the temp; it does not replace or alter
+ the original STMT. */
+/* FIXME: Generalize the interface to handle NCOUNTS > 1. */
+
+static tree
+tree_mod_subtract (tree stmt, tree operation, tree op1, tree op2,
+ int prob1, int prob2, int ncounts,
+ gcov_type count1, gcov_type count2, gcov_type all)
+{
+ tree stmt1, stmt2, stmt3;
+ tree tmp1;
+ tree label_decl1 = create_artificial_label ();
+ tree label_decl2 = create_artificial_label ();
+ tree label_decl3 = create_artificial_label ();
+ tree label1, label2, label3;
+ tree bb1end, bb2end = NULL_TREE, bb3end;
+ basic_block bb, bb2, bb3, bb4;
+ tree optype = TREE_TYPE (operation);
+ edge e12, e23 = 0, e24, e34, e14;
+ block_stmt_iterator bsi;
+ tree result = create_tmp_var (optype, "PROF");
+
+ bb = bb_for_stmt (stmt);
+ bsi = bsi_for_stmt (stmt);
+
+ tmp1 = create_tmp_var (optype, "PROF");
+ stmt1 = build2 (MODIFY_EXPR, optype, result, op1);
+ stmt2 = build2 (MODIFY_EXPR, optype, tmp1, op2);
+ stmt3 = build3 (COND_EXPR, void_type_node,
+ build2 (LT_EXPR, boolean_type_node, result, tmp1),
+ build1 (GOTO_EXPR, void_type_node, label_decl3),
+ build1 (GOTO_EXPR, void_type_node,
+ ncounts ? label_decl1 : label_decl2));
+ bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt2, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt3, BSI_SAME_STMT);
+ bb1end = stmt3;
+
+ if (ncounts) /* Assumed to be 0 or 1 */
+ {
+ label1 = build1 (LABEL_EXPR, void_type_node, label_decl1);
+ stmt1 = build2 (MODIFY_EXPR, optype, result,
+ build2 (MINUS_EXPR, optype, result, tmp1));
+ stmt2 = build3 (COND_EXPR, void_type_node,
+ build2 (LT_EXPR, boolean_type_node, result, tmp1),
+ build1 (GOTO_EXPR, void_type_node, label_decl3),
+ build1 (GOTO_EXPR, void_type_node, label_decl2));
+ bsi_insert_before (&bsi, label1, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt2, BSI_SAME_STMT);
+ bb2end = stmt2;
+ }
+
+ /* Fallback case. */
+ label2 = build1 (LABEL_EXPR, void_type_node, label_decl2);
+ stmt1 = build2 (MODIFY_EXPR, optype, result,
+ build2 (TREE_CODE (operation), optype, result, tmp1));
+ bsi_insert_before (&bsi, label2, BSI_SAME_STMT);
+ bsi_insert_before (&bsi, stmt1, BSI_SAME_STMT);
+ bb3end = stmt1;
+
+ label3 = build1 (LABEL_EXPR, void_type_node, label_decl3);
+ bsi_insert_before (&bsi, label3, BSI_SAME_STMT);
+
+ /* Fix CFG. */
+ /* Edge e23 connects bb2 to bb3, etc. */
+ /* However block 3 is optional; if it is not there, references
+ to 3 really refer to block 2. */
+ e12 = split_block (bb, bb1end);
+ bb2 = e12->dest;
+ bb2->count = all - count1;
+
+ if (ncounts) /* Assumed to be 0 or 1. */
+ {
+ e23 = split_block (bb2, bb2end);
+ bb3 = e23->dest;
+ bb3->count = all - count1 - count2;
+ }
+
+ e34 = split_block (ncounts ? bb3 : bb2, bb3end);
+ bb4 = e34->dest;
+ bb4->count = all;
+
+ e12->flags &= ~EDGE_FALLTHRU;
+ e12->flags |= EDGE_FALSE_VALUE;
+ e12->probability = REG_BR_PROB_BASE - prob1;
+ e12->count = count1;
+
+ e14 = make_edge (bb, bb4, EDGE_TRUE_VALUE);
+ e14->probability = prob1;
+ e14->count = all - count1;
+
+ if (ncounts) /* Assumed to be 0 or 1. */
+ {
+ e23->flags &= ~EDGE_FALLTHRU;
+ e23->flags |= EDGE_FALSE_VALUE;
+ e23->count = all - count1 - count2;
+ e23->probability = REG_BR_PROB_BASE - prob2;
+
+ e24 = make_edge (bb2, bb4, EDGE_TRUE_VALUE);
+ e24->probability = prob2;
+ e24->count = count2;
+ }
+
+ e34->probability = REG_BR_PROB_BASE;
+ e34->count = all - count1 - count2;
+
+ return result;
+}
+
+/* Do transforms 3) and 4) on INSN if applicable. */
+static bool
+tree_mod_subtract_transform (tree stmt)
+{
+ stmt_ann_t ann = get_stmt_ann (stmt);
+ histogram_value histogram;
+ enum tree_code code;
+ gcov_type count, wrong_values, all;
+ tree modify, op, op1, op2, result, value;
+ int prob1, prob2;
+ unsigned int i;
+
+ modify = stmt;
+ if (TREE_CODE (stmt) == RETURN_EXPR
+ && TREE_OPERAND (stmt, 0)
+ && TREE_CODE (TREE_OPERAND (stmt, 0)) == MODIFY_EXPR)
+ modify = TREE_OPERAND (stmt, 0);
+ if (TREE_CODE (modify) != MODIFY_EXPR)
+ return false;
+ op = TREE_OPERAND (modify, 1);
+ if (!INTEGRAL_TYPE_P (TREE_TYPE (op)))
+ return false;
+ code = TREE_CODE (op);
+
+ if (code != TRUNC_MOD_EXPR || !TYPE_UNSIGNED (TREE_TYPE (op)))
+ return false;
+
+ op1 = TREE_OPERAND (op, 0);
+ op2 = TREE_OPERAND (op, 1);
+ if (!ann->histograms)
+ return false;
+
+ for (histogram = ann->histograms; histogram; histogram = histogram->hvalue.tree.next)
+ if (histogram->type == HIST_TYPE_INTERVAL)
+ break;
+
+ if (!histogram)
+ return false;
+
+ value = histogram->hvalue.tree.value;
+ all = 0;
+ wrong_values = 0;
+ for (i = 0; i < histogram->hdata.intvl.steps; i++)
+ all += histogram->hvalue.tree.counters[i];
+
+ wrong_values += histogram->hvalue.tree.counters[i];
+ wrong_values += histogram->hvalue.tree.counters[i+1];
+ all += wrong_values;
+
+ /* Sanity check. */
+ if (simple_cst_equal (op2, value) != 1)
+ return false;
+
+ /* We require that we use just subtractions in at least 50% of all
+ evaluations. */
+ count = 0;
+ for (i = 0; i < histogram->hdata.intvl.steps; i++)
+ {
+ count += histogram->hvalue.tree.counters[i];
+ if (count * 2 >= all)
+ break;
+ }
+ if (i == histogram->hdata.intvl.steps)
+ return false;
+
+ if (dump_file)
+ {
+ fprintf (dump_file, "Mod subtract transformation on insn ");
+ print_generic_stmt (dump_file, stmt, TDF_SLIM);
+ }
+
+ /* Compute probability of taking the optimal path(s). */
+ prob1 = (histogram->hvalue.tree.counters[0] * REG_BR_PROB_BASE + all / 2) / all;
+ prob2 = (histogram->hvalue.tree.counters[1] * REG_BR_PROB_BASE + all / 2) / all;
+
+ /* In practice, "steps" is always 2. This interface reflects this,
+ and will need to be changed if "steps" can change. */
+ result = tree_mod_subtract (stmt, op, op1, op2, prob1, prob2, i,
+ histogram->hvalue.tree.counters[0],
+ histogram->hvalue.tree.counters[1], all);
+
+ TREE_OPERAND (modify, 1) = result;
+
+ return true;
+}
/* Connection to the outside world. */
/* Struct for IR-dependent hooks. */
@@ -1034,17 +1636,159 @@ rtl_register_value_prof_hooks (void)
gcc_assert (!ir_type ());
}
-/* Tree-based versions are stubs for now. */
+/* Find values inside INSN for that we want to measure histograms for
+ division/modulo optimization. */
+static void
+tree_divmod_values_to_profile (tree stmt, histogram_values *values)
+{
+ tree op, op1, op2;
+ histogram_value hist;
+
+ op = stmt;
+ if (TREE_CODE (stmt) == RETURN_EXPR
+ && TREE_OPERAND (stmt, 0)
+ && TREE_CODE (TREE_OPERAND (stmt, 0)) == MODIFY_EXPR)
+ op = TREE_OPERAND (stmt, 0);
+
+ if (TREE_CODE (op) != MODIFY_EXPR)
+ return;
+ if (!INTEGRAL_TYPE_P (TREE_TYPE (op)))
+ return;
+ op = TREE_OPERAND (op, 1);
+ switch (TREE_CODE (op))
+ {
+ case TRUNC_DIV_EXPR:
+ case TRUNC_MOD_EXPR:
+ op1 = TREE_OPERAND (op, 0);
+ op2 = TREE_OPERAND (op, 1);
+
+ /* Check for a special case where the divisor is power(s) of 2.
+ This is more aggressive than the RTL version, under the
+ assumption that later phases will reduce / or % by power of 2
+ to something clever most of the time. Signed or unsigned. */
+ if (TREE_CODE (op2) != INTEGER_CST)
+ {
+ hist = ggc_alloc (sizeof (*hist));
+ hist->hvalue.tree.value = op2;
+ hist->hvalue.tree.stmt = stmt;
+ hist->type = HIST_TYPE_POW2;
+ hist->hdata.pow2.may_be_other = 1;
+ VEC_safe_push (histogram_value, *values, hist);
+ }
+
+ /* Check for the case where the divisor is the same value most
+ of the time. */
+ if (TREE_CODE (op2) != INTEGER_CST)
+ {
+ hist = ggc_alloc (sizeof (*hist));
+ hist->hvalue.tree.value = op2;
+ hist->hvalue.tree.stmt = stmt;
+ hist->type = HIST_TYPE_SINGLE_VALUE;
+ VEC_safe_push (histogram_value, *values, hist);
+ }
+
+ /* For mod, check whether it is not often a noop (or replaceable by
+ a few subtractions). */
+ if (TREE_CODE (op) == TRUNC_MOD_EXPR && TYPE_UNSIGNED (TREE_TYPE (op)))
+ {
+ hist = ggc_alloc (sizeof (*hist));
+ hist->hvalue.tree.stmt = stmt;
+ hist->hvalue.tree.value = op2;
+ hist->type = HIST_TYPE_INTERVAL;
+ hist->hdata.intvl.int_start = 0;
+ hist->hdata.intvl.steps = 2;
+ VEC_safe_push (histogram_value, *values, hist);
+ }
+ return;
+
+ default:
+ return;
+ }
+}
+
+/* Find values inside INSN for that we want to measure histograms and adds
+ them to list VALUES (increasing the record of its length in N_VALUES). */
static void
-tree_find_values_to_profile (histogram_values *values ATTRIBUTE_UNUSED)
+tree_values_to_profile (tree stmt, histogram_values *values)
{
- gcc_unreachable ();
+ if (flag_value_profile_transformations)
+ tree_divmod_values_to_profile (stmt, values);
}
-static bool
-tree_value_profile_transformations (void)
+static void
+tree_find_values_to_profile (histogram_values *values)
{
- gcc_unreachable ();
+ basic_block bb;
+ block_stmt_iterator bsi;
+ tree stmt;
+ unsigned int i;
+
+ *values = VEC_alloc (histogram_value, 0);
+ FOR_EACH_BB (bb)
+ for (bsi = bsi_start (bb); !bsi_end_p (bsi); bsi_next (&bsi))
+ {
+ tree stmt = bsi_stmt (bsi);
+ tree_values_to_profile (stmt, values);
+ }
+ static_values = *values;
+
+ for (i = 0; i < VEC_length (histogram_value, *values); i++)
+ {
+ histogram_value hist = VEC_index (histogram_value, *values, i);
+
+ switch (hist->type)
+ {
+ case HIST_TYPE_INTERVAL:
+ if (dump_file)
+ {
+ fprintf (dump_file, "Interval counter for tree ");
+ print_generic_expr (dump_file, hist->hvalue.tree.stmt,
+ TDF_SLIM);
+ fprintf (dump_file, ", range %d -- %d.\n",
+ hist->hdata.intvl.int_start,
+ (hist->hdata.intvl.int_start
+ + hist->hdata.intvl.steps - 1));
+ }
+ hist->n_counters = hist->hdata.intvl.steps + 2;
+ break;
+
+ case HIST_TYPE_POW2:
+ if (dump_file)
+ {
+ fprintf (dump_file, "Pow2 counter for insn ");
+ print_generic_expr (dump_file, hist->hvalue.tree.stmt, TDF_SLIM);
+ fprintf (dump_file, ".\n");
+ }
+ stmt = hist->hvalue.tree.stmt;
+ hist->n_counters
+ = TREE_INT_CST_LOW (TYPE_SIZE (TREE_TYPE (stmt)))
+ + (hist->hdata.pow2.may_be_other ? 1 : 0);
+ break;
+
+ case HIST_TYPE_SINGLE_VALUE:
+ if (dump_file)
+ {
+ fprintf (dump_file, "Single value counter for insn ");
+ print_generic_expr (dump_file, hist->hvalue.tree.stmt, TDF_SLIM);
+ fprintf (dump_file, ".\n");
+ }
+ hist->n_counters = 3;
+ break;
+
+ case HIST_TYPE_CONST_DELTA:
+ if (dump_file)
+ {
+ fprintf (dump_file, "Constant delta counter for insn ");
+ print_generic_expr (dump_file, hist->hvalue.tree.stmt, TDF_SLIM);
+ fprintf (dump_file, ".\n");
+ }
+ hist->n_counters = 4;
+ break;
+
+ default:
+ abort ();
+ }
+ }
}
static struct value_prof_hooks tree_value_prof_hooks = {
@@ -1069,6 +1813,7 @@ find_values_to_profile (histogram_values *values)
bool
value_profile_transformations (void)
{
- return (value_prof_hooks->value_profile_transformations) ();
+ bool retval = (value_prof_hooks->value_profile_transformations) ();
+ VEC_free (histogram_value, static_values);
+ return retval;
}
-
diff --git a/gcc/value-prof.h b/gcc/value-prof.h
index b9d0d0663b2..08f4d0043e3 100644
--- a/gcc/value-prof.h
+++ b/gcc/value-prof.h
@@ -1,5 +1,5 @@
/* Definitions for transformations based on profile information for values.
- Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GCC.
@@ -38,14 +38,25 @@ enum hist_type
((enum hist_type) ((COUNTER) - GCOV_FIRST_VALUE_COUNTER))
/* The value to measure. */
-/* The void *'s are either rtx or tree, depending on which IR is in use. */
-struct histogram_value_t GTY(())
+struct histogram_value_t
{
- PTR GTY ((skip (""))) value; /* The value to profile. */
- enum machine_mode mode; /* And its mode. */
- PTR GTY ((skip (""))) seq; /* Insns required to count the
- profiled value. */
- PTR GTY ((skip (""))) insn; /* Insn before that to measure. */
+ union
+ {
+ struct
+ {
+ rtx value; /* The value to profile. */
+ rtx seq; /* Insns required to count the profiled value. */
+ rtx insn; /* Insn before that to measure. */
+ enum machine_mode mode; /* Mode of value to profile. */
+ } rtl;
+ struct
+ {
+ tree value; /* The value to profile. */
+ tree stmt; /* Insn containing the value. */
+ gcov_type *counters; /* Pointer to first counter. */
+ struct histogram_value_t *next; /* Linked list pointer. */
+ } tree;
+ } hvalue;
enum hist_type type; /* Type of information to measure. */
unsigned n_counters; /* Number of required counters. */
union
@@ -53,9 +64,7 @@ struct histogram_value_t GTY(())
struct
{
int int_start; /* First value in interval. */
- int steps; /* Number of values in it. */
- int may_be_less; /* May the value be below? */
- int may_be_more; /* Or above. */
+ unsigned int steps; /* Number of values in it. */
} intvl; /* Interval histogram data. */
struct
{
@@ -66,7 +75,7 @@ struct histogram_value_t GTY(())
typedef struct histogram_value_t *histogram_value;
-DEF_VEC_GC_P(histogram_value);
+DEF_VEC_MALLOC_P(histogram_value);
typedef VEC(histogram_value) *histogram_values;
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 9a04cd51ab3..c51f6c045d6 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -897,7 +897,6 @@ make_decl_rtl (tree decl)
name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
-
if (TREE_CODE (decl) != FUNCTION_DECL && DECL_REGISTER (decl))
{
reg_number = decode_reg_name (name);
@@ -940,6 +939,7 @@ make_decl_rtl (tree decl)
/* Make this register global, so not usable for anything
else. */
#ifdef ASM_DECLARE_REGISTER_GLOBAL
+ name = IDENTIFIER_POINTER (DECL_NAME (decl));
ASM_DECLARE_REGISTER_GLOBAL (asm_out_file, decl, reg_number, name);
#endif
nregs = hard_regno_nregs[reg_number][DECL_MODE (decl)];
@@ -1877,7 +1877,11 @@ void
mark_decl_referenced (tree decl)
{
if (TREE_CODE (decl) == FUNCTION_DECL)
- cgraph_mark_needed_node (cgraph_node (decl));
+ {
+ /* Extern inline functions don't become needed when referenced. */
+ if (!DECL_EXTERNAL (decl))
+ cgraph_mark_needed_node (cgraph_node (decl));
+ }
else if (TREE_CODE (decl) == VAR_DECL)
cgraph_varpool_mark_needed_node (cgraph_varpool_node (decl));
/* else do nothing - we can get various sorts of CST nodes here,
@@ -4514,7 +4518,7 @@ assemble_alias (tree decl, tree target)
if (TREE_CODE (decl) == FUNCTION_DECL)
cgraph_node (decl);
else
- cgraph_varpool_node (decl);
+ cgraph_varpool_node (decl)->alias = true;
/* If the target has already been emitted, we don't have to queue the
alias. This saves a tad o memory. */
diff --git a/gcc/version.c b/gcc/version.c
index c60c330be86..d3038295205 100644
--- a/gcc/version.c
+++ b/gcc/version.c
@@ -8,7 +8,7 @@
in parentheses. You may also wish to include a number indicating
the revision of your modified compiler. */
-#define VERSUFFIX " (merged 20050322)"
+#define VERSUFFIX " (merged 20050330)"
/* This is the location of the online document giving instructions for
reporting bugs. If you distribute a modified version of GCC,
diff --git a/gcc/vmsdbgout.c b/gcc/vmsdbgout.c
index 158661daf6f..d0f4abe6e0a 100644
--- a/gcc/vmsdbgout.c
+++ b/gcc/vmsdbgout.c
@@ -209,7 +209,8 @@ const struct gcc_debug_hooks vmsdbg_debug_hooks
vmsdbgout_abstract_function,
debug_nothing_rtx, /* label */
debug_nothing_int, /* handle_pch */
- debug_nothing_rtx /* var_location */
+ debug_nothing_rtx, /* var_location */
+ 0 /* start_end_main_source_file */
};
/* Definitions of defaults for assembler-dependent names of various
diff --git a/include/ChangeLog b/include/ChangeLog
index 758b923a300..a4ebee08f75 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,60 @@
+2005-03-29 Ian Lance Taylor <ian@airs.com>
+
+ * libiberty.h: Fix indentation.
+
+2005-03-28 Ian Lance Taylor <ian@airs.com>
+
+ * libiberty.h: Include <stdio.h>.
+ (PEX_RECORD_TIMES, PEX_USE_PIPES, PEX_SAVE_TEMPS): Define.
+ (PEX_LAST, PEX_SEARCH, PEX_SUFFIX, PEX_STDERR_TO_STDOUT): Define.
+ (PEX_BINARY_INPUT, PEX_BINARY_OUTPUT): Define.
+ (pex_init, pex_run, pex_read_output): Declare.
+ (pex_get_status, pex_get_times, pex_free, pex_one): Declare.
+ (struct pex_time): Define.
+
+2005-03-28 Mark Mitchell <mark@codesourcery.com>
+
+ * libiberty.h (ffs): Declare, if necessary.
+
+2005-03-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ * xregex2.h (_RE_ARGS): Remove definition and uses.
+
+2005-03-27 Gabriel Dos Reis <gdr@integreable-solutions.net>
+
+ * ternary.h: Don't use PARAMS anymore.
+
+2005-03-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ * partition.h: Remove use of PARAMS.
+ * obstack.h: Remove conditional prototypes __STDC__.
+ * objalloc.h: Remove use of PARAMS.
+ * splay-tree.h: Likewise.
+
+2005-03-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ * md5.h: Remove definition and uses of __P.
+ * dyn-string.h: Remove uses of PARAMS.
+ * fibheap.h: Likewise.
+ * floatformat.h: Likewise.
+ * hashtab.h: Likewise.
+
+2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ * demangle.h: Remove uses of PARAMS.
+
+ * libiberty.h (ANSI_PROTOTYPES): Remove guard since
+ ANSI_PROTOTYPES is always assumed.
+ Remove uses of PARAMS throughout.
+
+2005-03-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * libiberty.h (xstrndup): Declare.
+
+2005-03-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * libiberty.h (make_relative_prefix): Add ATTRIBUTE_MALLOC.
+
2005-03-09 Mark Mitchell <mark@codesourcery.com>
* libiberty.h (gettimeofday): Declare.
diff --git a/include/demangle.h b/include/demangle.h
index b3b8c58c517..b88b43d8bae 100644
--- a/include/demangle.h
+++ b/include/demangle.h
@@ -110,31 +110,31 @@ extern const struct demangler_engine
} libiberty_demanglers[];
extern char *
-cplus_demangle PARAMS ((const char *mangled, int options));
+cplus_demangle (const char *mangled, int options);
extern int
-cplus_demangle_opname PARAMS ((const char *opname, char *result, int options));
+cplus_demangle_opname (const char *opname, char *result, int options);
extern const char *
-cplus_mangle_opname PARAMS ((const char *opname, int options));
+cplus_mangle_opname (const char *opname, int options);
/* Note: This sets global state. FIXME if you care about multi-threading. */
extern void
-set_cplus_marker_for_demangling PARAMS ((int ch));
+set_cplus_marker_for_demangling (int ch);
extern enum demangling_styles
-cplus_demangle_set_style PARAMS ((enum demangling_styles style));
+cplus_demangle_set_style (enum demangling_styles style);
extern enum demangling_styles
-cplus_demangle_name_to_style PARAMS ((const char *name));
+cplus_demangle_name_to_style (const char *name);
/* V3 ABI demangling entry points, defined in cp-demangle.c. */
extern char*
-cplus_demangle_v3 PARAMS ((const char* mangled, int options));
+cplus_demangle_v3 (const char* mangled, int options);
extern char*
-java_demangle_v3 PARAMS ((const char* mangled));
+java_demangle_v3 (const char* mangled);
enum gnu_v3_ctor_kinds {
@@ -148,7 +148,7 @@ enum gnu_v3_ctor_kinds {
gnu_v3_ctor_kinds' value indicating what kind of constructor
it is. */
extern enum gnu_v3_ctor_kinds
- is_gnu_v3_mangled_ctor PARAMS ((const char *name));
+ is_gnu_v3_mangled_ctor (const char *name);
enum gnu_v3_dtor_kinds {
@@ -162,7 +162,7 @@ enum gnu_v3_dtor_kinds {
gnu_v3_dtor_kinds' value, indicating what kind of destructor
it is. */
extern enum gnu_v3_dtor_kinds
- is_gnu_v3_mangled_dtor PARAMS ((const char *name));
+ is_gnu_v3_mangled_dtor (const char *name);
/* The V3 demangler works in two passes. The first pass builds a tree
representation of the mangled name, and the second pass turns the
@@ -440,25 +440,25 @@ struct demangle_component
unrecognized or inappropriate component type. */
extern int
-cplus_demangle_fill_component PARAMS ((struct demangle_component *fill,
- enum demangle_component_type,
- struct demangle_component *left,
- struct demangle_component *right));
+cplus_demangle_fill_component (struct demangle_component *fill,
+ enum demangle_component_type,
+ struct demangle_component *left,
+ struct demangle_component *right);
/* Fill in a DEMANGLE_COMPONENT_NAME. Returns non-zero on success,
zero for bad arguments. */
extern int
-cplus_demangle_fill_name PARAMS ((struct demangle_component *fill,
- const char *, int));
+cplus_demangle_fill_name (struct demangle_component *fill,
+ const char *, int);
/* Fill in a DEMANGLE_COMPONENT_BUILTIN_TYPE, using the name of the
builtin type (e.g., "int", etc.). Returns non-zero on success,
zero if the type is not recognized. */
extern int
-cplus_demangle_fill_builtin_type PARAMS ((struct demangle_component *fill,
- const char *type_name));
+cplus_demangle_fill_builtin_type (struct demangle_component *fill,
+ const char *type_name);
/* Fill in a DEMANGLE_COMPONENT_OPERATOR, using the name of the
operator and the number of arguments which it takes (the latter is
@@ -467,33 +467,33 @@ cplus_demangle_fill_builtin_type PARAMS ((struct demangle_component *fill,
not recognized. */
extern int
-cplus_demangle_fill_operator PARAMS ((struct demangle_component *fill,
- const char *opname, int args));
+cplus_demangle_fill_operator (struct demangle_component *fill,
+ const char *opname, int args);
/* Fill in a DEMANGLE_COMPONENT_EXTENDED_OPERATOR, providing the
number of arguments and the name. Returns non-zero on success,
zero for bad arguments. */
extern int
-cplus_demangle_fill_extended_operator PARAMS ((struct demangle_component *fill,
- int numargs,
- struct demangle_component *nm));
+cplus_demangle_fill_extended_operator (struct demangle_component *fill,
+ int numargs,
+ struct demangle_component *nm);
/* Fill in a DEMANGLE_COMPONENT_CTOR. Returns non-zero on success,
zero for bad arguments. */
extern int
-cplus_demangle_fill_ctor PARAMS ((struct demangle_component *fill,
- enum gnu_v3_ctor_kinds kind,
- struct demangle_component *name));
+cplus_demangle_fill_ctor (struct demangle_component *fill,
+ enum gnu_v3_ctor_kinds kind,
+ struct demangle_component *name);
/* Fill in a DEMANGLE_COMPONENT_DTOR. Returns non-zero on success,
zero for bad arguments. */
extern int
-cplus_demangle_fill_dtor PARAMS ((struct demangle_component *fill,
- enum gnu_v3_dtor_kinds kind,
- struct demangle_component *name));
+cplus_demangle_fill_dtor (struct demangle_component *fill,
+ enum gnu_v3_dtor_kinds kind,
+ struct demangle_component *name);
/* This function translates a mangled name into a struct
demangle_component tree. The first argument is the mangled name.
@@ -504,9 +504,7 @@ cplus_demangle_fill_dtor PARAMS ((struct demangle_component *fill,
needed. */
extern struct demangle_component *
-cplus_demangle_v3_components PARAMS ((const char *mangled,
- int options,
- void **mem));
+cplus_demangle_v3_components (const char *mangled, int options, void **mem);
/* This function takes a struct demangle_component tree and returns
the corresponding demangled string. The first argument is DMGL_*
@@ -521,10 +519,10 @@ cplus_demangle_v3_components PARAMS ((const char *mangled,
memory allocation error. */
extern char *
-cplus_demangle_print PARAMS ((int options,
- const struct demangle_component *tree,
- int estimated_length,
- size_t *p_allocated_size));
+cplus_demangle_print (int options,
+ const struct demangle_component *tree,
+ int estimated_length,
+ size_t *p_allocated_size);
#ifdef __cplusplus
}
diff --git a/include/dyn-string.h b/include/dyn-string.h
index 85f88b12cf6..a351ec3bdcc 100644
--- a/include/dyn-string.h
+++ b/include/dyn-string.h
@@ -40,24 +40,21 @@ typedef struct dyn_string
(strcmp ((DS1)->s, (DS2)->s))
-extern int dyn_string_init PARAMS ((struct dyn_string *, int));
-extern dyn_string_t dyn_string_new PARAMS ((int));
-extern void dyn_string_delete PARAMS ((dyn_string_t));
-extern char *dyn_string_release PARAMS ((dyn_string_t));
-extern dyn_string_t dyn_string_resize PARAMS ((dyn_string_t, int));
-extern void dyn_string_clear PARAMS ((dyn_string_t));
-extern int dyn_string_copy PARAMS ((dyn_string_t, dyn_string_t));
-extern int dyn_string_copy_cstr PARAMS ((dyn_string_t, const char *));
-extern int dyn_string_prepend PARAMS ((dyn_string_t, dyn_string_t));
-extern int dyn_string_prepend_cstr PARAMS ((dyn_string_t, const char *));
-extern int dyn_string_insert PARAMS ((dyn_string_t, int,
- dyn_string_t));
-extern int dyn_string_insert_cstr PARAMS ((dyn_string_t, int,
- const char *));
-extern int dyn_string_insert_char PARAMS ((dyn_string_t, int, int));
-extern int dyn_string_append PARAMS ((dyn_string_t, dyn_string_t));
-extern int dyn_string_append_cstr PARAMS ((dyn_string_t, const char *));
-extern int dyn_string_append_char PARAMS ((dyn_string_t, int));
-extern int dyn_string_substring PARAMS ((dyn_string_t,
- dyn_string_t, int, int));
-extern int dyn_string_eq PARAMS ((dyn_string_t, dyn_string_t));
+extern int dyn_string_init (struct dyn_string *, int);
+extern dyn_string_t dyn_string_new (int);
+extern void dyn_string_delete (dyn_string_t);
+extern char *dyn_string_release (dyn_string_t);
+extern dyn_string_t dyn_string_resize (dyn_string_t, int);
+extern void dyn_string_clear (dyn_string_t);
+extern int dyn_string_copy (dyn_string_t, dyn_string_t);
+extern int dyn_string_copy_cstr (dyn_string_t, const char *);
+extern int dyn_string_prepend (dyn_string_t, dyn_string_t);
+extern int dyn_string_prepend_cstr (dyn_string_t, const char *);
+extern int dyn_string_insert (dyn_string_t, int, dyn_string_t);
+extern int dyn_string_insert_cstr (dyn_string_t, int, const char *);
+extern int dyn_string_insert_char (dyn_string_t, int, int);
+extern int dyn_string_append (dyn_string_t, dyn_string_t);
+extern int dyn_string_append_cstr (dyn_string_t, const char *);
+extern int dyn_string_append_char (dyn_string_t, int);
+extern int dyn_string_substring (dyn_string_t, dyn_string_t, int, int);
+extern int dyn_string_eq (dyn_string_t, dyn_string_t);
diff --git a/include/fibheap.h b/include/fibheap.h
index e1e843ddbb1..bfd82da2cb0 100644
--- a/include/fibheap.h
+++ b/include/fibheap.h
@@ -68,19 +68,19 @@ typedef struct fibnode
#endif
} *fibnode_t;
-extern fibheap_t fibheap_new PARAMS ((void));
-extern fibnode_t fibheap_insert PARAMS ((fibheap_t, fibheapkey_t, void *));
-extern int fibheap_empty PARAMS ((fibheap_t));
-extern fibheapkey_t fibheap_min_key PARAMS ((fibheap_t));
-extern fibheapkey_t fibheap_replace_key PARAMS ((fibheap_t, fibnode_t,
- fibheapkey_t));
-extern void *fibheap_replace_key_data PARAMS ((fibheap_t, fibnode_t,
- fibheapkey_t, void *));
-extern void *fibheap_extract_min PARAMS ((fibheap_t));
-extern void *fibheap_min PARAMS ((fibheap_t));
-extern void *fibheap_replace_data PARAMS ((fibheap_t, fibnode_t, void *));
-extern void *fibheap_delete_node PARAMS ((fibheap_t, fibnode_t));
-extern void fibheap_delete PARAMS ((fibheap_t));
-extern fibheap_t fibheap_union PARAMS ((fibheap_t, fibheap_t));
+extern fibheap_t fibheap_new (void);
+extern fibnode_t fibheap_insert (fibheap_t, fibheapkey_t, void *);
+extern int fibheap_empty (fibheap_t);
+extern fibheapkey_t fibheap_min_key (fibheap_t);
+extern fibheapkey_t fibheap_replace_key (fibheap_t, fibnode_t,
+ fibheapkey_t);
+extern void *fibheap_replace_key_data (fibheap_t, fibnode_t,
+ fibheapkey_t, void *);
+extern void *fibheap_extract_min (fibheap_t);
+extern void *fibheap_min (fibheap_t);
+extern void *fibheap_replace_data (fibheap_t, fibnode_t, void *);
+extern void *fibheap_delete_node (fibheap_t, fibnode_t);
+extern void fibheap_delete (fibheap_t);
+extern fibheap_t fibheap_union (fibheap_t, fibheap_t);
#endif /* _FIBHEAP_H_ */
diff --git a/include/floatformat.h b/include/floatformat.h
index a8244ada5c7..40911b33694 100644
--- a/include/floatformat.h
+++ b/include/floatformat.h
@@ -82,7 +82,7 @@ struct floatformat
const char *name;
/* Validator method. */
- int (*is_valid) PARAMS ((const struct floatformat *fmt, const char *from));
+ int (*is_valid) (const struct floatformat *fmt, const char *from);
};
/* floatformats for IEEE single and double, big and little endian. */
@@ -116,18 +116,17 @@ extern const struct floatformat floatformat_ia64_quad_little;
Store the double in *TO. */
extern void
-floatformat_to_double PARAMS ((const struct floatformat *, const char *, double *));
+floatformat_to_double (const struct floatformat *, const char *, double *);
/* The converse: convert the double *FROM to FMT
and store where TO points. */
extern void
-floatformat_from_double PARAMS ((const struct floatformat *,
- const double *, char *));
+floatformat_from_double (const struct floatformat *, const double *, char *);
/* Return non-zero iff the data at FROM is a valid number in format FMT. */
extern int
-floatformat_is_valid PARAMS ((const struct floatformat *fmt, const char *from));
+floatformat_is_valid (const struct floatformat *fmt, const char *from);
#endif /* defined (FLOATFORMAT_H) */
diff --git a/include/hashtab.h b/include/hashtab.h
index de24dedb91b..c75b23c8f05 100644
--- a/include/hashtab.h
+++ b/include/hashtab.h
@@ -48,38 +48,38 @@ typedef unsigned int hashval_t;
/* Callback function pointer types. */
/* Calculate hash of a table entry. */
-typedef hashval_t (*htab_hash) PARAMS ((const void *));
+typedef hashval_t (*htab_hash) (const void *);
/* Compare a table entry with a possible entry. The entry already in
the table always comes first, so the second element can be of a
different type (but in this case htab_find and htab_find_slot
cannot be used; instead the variants that accept a hash value
must be used). */
-typedef int (*htab_eq) PARAMS ((const void *, const void *));
+typedef int (*htab_eq) (const void *, const void *);
/* Cleanup function called whenever a live element is removed from
the hash table. */
-typedef void (*htab_del) PARAMS ((void *));
+typedef void (*htab_del) (void *);
/* Function called by htab_traverse for each live element. The first
arg is the slot of the element (which can be passed to htab_clear_slot
if desired), the second arg is the auxiliary pointer handed to
htab_traverse. Return 1 to continue scan, 0 to stop. */
-typedef int (*htab_trav) PARAMS ((void **, void *));
+typedef int (*htab_trav) (void **, void *);
/* Memory-allocation function, with the same functionality as calloc().
Iff it returns NULL, the hash table implementation will pass an error
code back to the user, so if your code doesn't handle errors,
best if you use xcalloc instead. */
-typedef PTR (*htab_alloc) PARAMS ((size_t, size_t));
+typedef PTR (*htab_alloc) (size_t, size_t);
/* We also need a free() routine. */
-typedef void (*htab_free) PARAMS ((PTR));
+typedef void (*htab_free) (PTR);
/* Memory allocation and deallocation; variants which take an extra
argument. */
-typedef PTR (*htab_alloc_with_arg) PARAMS ((void *, size_t, size_t));
-typedef void (*htab_free_with_arg) PARAMS ((void *, void *));
+typedef PTR (*htab_alloc_with_arg) (void *, size_t, size_t);
+typedef void (*htab_free_with_arg) (void *, void *);
/* Hash tables are of the following type. The structure
(implementation) of this type is not needed for using the hash
@@ -139,45 +139,43 @@ enum insert_option {NO_INSERT, INSERT};
/* The prototypes of the package functions. */
-extern htab_t htab_create_alloc PARAMS ((size_t, htab_hash,
- htab_eq, htab_del,
- htab_alloc, htab_free));
+extern htab_t htab_create_alloc (size_t, htab_hash,
+ htab_eq, htab_del,
+ htab_alloc, htab_free);
-extern htab_t htab_create_alloc_ex PARAMS ((size_t, htab_hash,
- htab_eq, htab_del,
- PTR, htab_alloc_with_arg,
- htab_free_with_arg));
+extern htab_t htab_create_alloc_ex (size_t, htab_hash,
+ htab_eq, htab_del,
+ PTR, htab_alloc_with_arg,
+ htab_free_with_arg);
/* Backward-compatibility functions. */
-extern htab_t htab_create PARAMS ((size_t, htab_hash, htab_eq, htab_del));
-extern htab_t htab_try_create PARAMS ((size_t, htab_hash, htab_eq, htab_del));
-
-extern void htab_set_functions_ex PARAMS ((htab_t, htab_hash,
- htab_eq, htab_del,
- PTR, htab_alloc_with_arg,
- htab_free_with_arg));
-
-extern void htab_delete PARAMS ((htab_t));
-extern void htab_empty PARAMS ((htab_t));
-
-extern PTR htab_find PARAMS ((htab_t, const void *));
-extern PTR *htab_find_slot PARAMS ((htab_t, const void *,
- enum insert_option));
-extern PTR htab_find_with_hash PARAMS ((htab_t, const void *,
- hashval_t));
-extern PTR *htab_find_slot_with_hash PARAMS ((htab_t, const void *,
- hashval_t,
- enum insert_option));
-extern void htab_clear_slot PARAMS ((htab_t, void **));
-extern void htab_remove_elt PARAMS ((htab_t, void *));
-extern void htab_remove_elt_with_hash PARAMS ((htab_t, void *, hashval_t));
-
-extern void htab_traverse PARAMS ((htab_t, htab_trav, void *));
-extern void htab_traverse_noresize PARAMS ((htab_t, htab_trav, void *));
-
-extern size_t htab_size PARAMS ((htab_t));
-extern size_t htab_elements PARAMS ((htab_t));
-extern double htab_collisions PARAMS ((htab_t));
+extern htab_t htab_create (size_t, htab_hash, htab_eq, htab_del);
+extern htab_t htab_try_create (size_t, htab_hash, htab_eq, htab_del);
+
+extern void htab_set_functions_ex (htab_t, htab_hash,
+ htab_eq, htab_del,
+ PTR, htab_alloc_with_arg,
+ htab_free_with_arg);
+
+extern void htab_delete (htab_t);
+extern void htab_empty (htab_t);
+
+extern PTR htab_find (htab_t, const void *);
+extern PTR *htab_find_slot (htab_t, const void *, enum insert_option);
+extern PTR htab_find_with_hash (htab_t, const void *, hashval_t);
+extern PTR *htab_find_slot_with_hash (htab_t, const void *,
+ hashval_t,
+ enum insert_option);
+extern void htab_clear_slot (htab_t, void **);
+extern void htab_remove_elt (htab_t, void *);
+extern void htab_remove_elt_with_hash (htab_t, void *, hashval_t);
+
+extern void htab_traverse (htab_t, htab_trav, void *);
+extern void htab_traverse_noresize (htab_t, htab_trav, void *);
+
+extern size_t htab_size (htab_t);
+extern size_t htab_elements (htab_t);
+extern double htab_collisions (htab_t);
/* A hash function for pointers. */
extern htab_hash htab_hash_pointer;
@@ -186,10 +184,10 @@ extern htab_hash htab_hash_pointer;
extern htab_eq htab_eq_pointer;
/* A hash function for null-terminated strings. */
-extern hashval_t htab_hash_string PARAMS ((const PTR));
+extern hashval_t htab_hash_string (const PTR);
/* An iterative hash function for arbitrary data. */
-extern hashval_t iterative_hash PARAMS ((const PTR, size_t, hashval_t));
+extern hashval_t iterative_hash (const PTR, size_t, hashval_t);
/* Shorthand for hashing something with an intrinsic size. */
#define iterative_hash_object(OB,INIT) iterative_hash (&OB, sizeof (OB), INIT)
diff --git a/include/libiberty.h b/include/libiberty.h
index 0814695a04a..eb5633b26ec 100644
--- a/include/libiberty.h
+++ b/include/libiberty.h
@@ -1,6 +1,6 @@
/* Function declarations for libiberty.
- Copyright 2001, 2002 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2005 Free Software Foundation, Inc.
Note - certain prototypes declared in this header file are for
functions whoes implementation copyright does not belong to the
@@ -41,26 +41,26 @@ extern "C" {
#include "ansidecl.h"
-#ifdef ANSI_PROTOTYPES
/* Get a definition for size_t. */
#include <stddef.h>
/* Get a definition for va_list. */
#include <stdarg.h>
-#endif
+
+#include <stdio.h>
/* Build an argument vector from a string. Allocates memory using
malloc. Use freeargv to free the vector. */
-extern char **buildargv PARAMS ((const char *)) ATTRIBUTE_MALLOC;
+extern char **buildargv (const char *) ATTRIBUTE_MALLOC;
/* Free a vector returned by buildargv. */
-extern void freeargv PARAMS ((char **));
+extern void freeargv (char **);
/* Duplicate an argument vector. Allocates memory using malloc. Use
freeargv to free the vector. */
-extern char **dupargv PARAMS ((char **)) ATTRIBUTE_MALLOC;
+extern char **dupargv (char **) ATTRIBUTE_MALLOC;
/* Return the last component of a path name. Note that we can't use a
@@ -75,7 +75,7 @@ extern char **dupargv PARAMS ((char **)) ATTRIBUTE_MALLOC;
is 1, we found it so don't provide any declaration at all. */
#if !HAVE_DECL_BASENAME
#if defined (__GNU_LIBRARY__ ) || defined (__linux__) || defined (__FreeBSD__) || defined (__OpenBSD__) || defined(__NetBSD__) || defined (__CYGWIN__) || defined (__CYGWIN32__) || defined (__MINGW32__) || defined (HAVE_DECL_BASENAME)
-extern char *basename PARAMS ((const char *));
+extern char *basename (const char *);
#else
extern char *basename ();
#endif
@@ -83,17 +83,17 @@ extern char *basename ();
/* A well-defined basename () that is always compiled in. */
-extern const char *lbasename PARAMS ((const char *));
+extern const char *lbasename (const char *);
/* A well-defined realpath () that is always compiled in. */
-extern char *lrealpath PARAMS ((const char *));
+extern char *lrealpath (const char *);
/* Concatenate an arbitrary number of strings. You must pass NULL as
the last argument of this function, to terminate the list of
strings. Allocates memory using xmalloc. */
-extern char *concat PARAMS ((const char *, ...)) ATTRIBUTE_MALLOC ATTRIBUTE_SENTINEL;
+extern char *concat (const char *, ...) ATTRIBUTE_MALLOC ATTRIBUTE_SENTINEL;
/* Concatenate an arbitrary number of strings. You must pass NULL as
the last argument of this function, to terminate the list of
@@ -102,27 +102,27 @@ extern char *concat PARAMS ((const char *, ...)) ATTRIBUTE_MALLOC ATTRIBUTE_SENT
pointer to be freed after the new string is created, similar to the
way xrealloc works. */
-extern char *reconcat PARAMS ((char *, const char *, ...)) ATTRIBUTE_MALLOC ATTRIBUTE_SENTINEL;
+extern char *reconcat (char *, const char *, ...) ATTRIBUTE_MALLOC ATTRIBUTE_SENTINEL;
/* Determine the length of concatenating an arbitrary number of
strings. You must pass NULL as the last argument of this function,
to terminate the list of strings. */
-extern unsigned long concat_length PARAMS ((const char *, ...)) ATTRIBUTE_SENTINEL;
+extern unsigned long concat_length (const char *, ...) ATTRIBUTE_SENTINEL;
/* Concatenate an arbitrary number of strings into a SUPPLIED area of
memory. You must pass NULL as the last argument of this function,
to terminate the list of strings. The supplied memory is assumed
to be large enough. */
-extern char *concat_copy PARAMS ((char *, const char *, ...)) ATTRIBUTE_SENTINEL;
+extern char *concat_copy (char *, const char *, ...) ATTRIBUTE_SENTINEL;
/* Concatenate an arbitrary number of strings into a GLOBAL area of
memory. You must pass NULL as the last argument of this function,
to terminate the list of strings. The supplied memory is assumed
to be large enough. */
-extern char *concat_copy2 PARAMS ((const char *, ...)) ATTRIBUTE_SENTINEL;
+extern char *concat_copy2 (const char *, ...) ATTRIBUTE_SENTINEL;
/* This is the global area used by concat_copy2. */
@@ -138,12 +138,19 @@ extern char *libiberty_concat_ptr;
/* Check whether two file descriptors refer to the same file. */
-extern int fdmatch PARAMS ((int fd1, int fd2));
+extern int fdmatch (int fd1, int fd2);
+
+/* Return the position of the first bit set in the argument. */
+/* Prototypes vary from system to system, so we only provide a
+ prototype on systems where we know that we need it. */
+#if defined (HAVE_DECL_FFS) && !HAVE_DECL_FFS
+extern int ffs(int);
+#endif
/* Get the working directory. The result is cached, so don't call
chdir() between calls to getpwd(). */
-extern char * getpwd PARAMS ((void));
+extern char * getpwd (void);
/* Get the current time. */
/* Prototypes vary from system to system, so we only provide a
@@ -151,117 +158,121 @@ extern char * getpwd PARAMS ((void));
#ifdef __MINGW32__
/* Forward declaration to avoid #include <sys/time.h>. */
struct timeval;
-extern int gettimeofday PARAMS ((struct timeval *, void *));
+extern int gettimeofday (struct timeval *, void *);
#endif
/* Get the amount of time the process has run, in microseconds. */
-extern long get_run_time PARAMS ((void));
+extern long get_run_time (void);
/* Generate a relocated path to some installation directory. Allocates
return value using malloc. */
-extern char *make_relative_prefix PARAMS ((const char *, const char *,
- const char *));
+extern char *make_relative_prefix (const char *, const char *,
+ const char *) ATTRIBUTE_MALLOC;
/* Choose a temporary directory to use for scratch files. */
-extern char *choose_temp_base PARAMS ((void)) ATTRIBUTE_MALLOC;
+extern char *choose_temp_base (void) ATTRIBUTE_MALLOC;
/* Return a temporary file name or NULL if unable to create one. */
-extern char *make_temp_file PARAMS ((const char *)) ATTRIBUTE_MALLOC;
+extern char *make_temp_file (const char *) ATTRIBUTE_MALLOC;
/* Remove a link to a file unless it is special. */
-extern int unlink_if_ordinary PARAMS((const char *));
+extern int unlink_if_ordinary (const char *);
/* Allocate memory filled with spaces. Allocates using malloc. */
-extern const char *spaces PARAMS ((int count));
+extern const char *spaces (int count);
/* Return the maximum error number for which strerror will return a
string. */
-extern int errno_max PARAMS ((void));
+extern int errno_max (void);
/* Return the name of an errno value (e.g., strerrno (EINVAL) returns
"EINVAL"). */
-extern const char *strerrno PARAMS ((int));
+extern const char *strerrno (int);
/* Given the name of an errno value, return the value. */
-extern int strtoerrno PARAMS ((const char *));
+extern int strtoerrno (const char *);
/* ANSI's strerror(), but more robust. */
-extern char *xstrerror PARAMS ((int));
+extern char *xstrerror (int);
/* Return the maximum signal number for which strsignal will return a
string. */
-extern int signo_max PARAMS ((void));
+extern int signo_max (void);
/* Return a signal message string for a signal number
(e.g., strsignal (SIGHUP) returns something like "Hangup"). */
/* This is commented out as it can conflict with one in system headers.
We still document its existence though. */
-/*extern const char *strsignal PARAMS ((int));*/
+/*extern const char *strsignal (int);*/
/* Return the name of a signal number (e.g., strsigno (SIGHUP) returns
"SIGHUP"). */
-extern const char *strsigno PARAMS ((int));
+extern const char *strsigno (int);
/* Given the name of a signal, return its number. */
-extern int strtosigno PARAMS ((const char *));
+extern int strtosigno (const char *);
/* Register a function to be run by xexit. Returns 0 on success. */
-extern int xatexit PARAMS ((void (*fn) (void)));
+extern int xatexit (void (*fn) (void));
/* Exit, calling all the functions registered with xatexit. */
-extern void xexit PARAMS ((int status)) ATTRIBUTE_NORETURN;
+extern void xexit (int status) ATTRIBUTE_NORETURN;
/* Set the program name used by xmalloc. */
-extern void xmalloc_set_program_name PARAMS ((const char *));
+extern void xmalloc_set_program_name (const char *);
/* Report an allocation failure. */
-extern void xmalloc_failed PARAMS ((size_t)) ATTRIBUTE_NORETURN;
+extern void xmalloc_failed (size_t) ATTRIBUTE_NORETURN;
/* Allocate memory without fail. If malloc fails, this will print a
message to stderr (using the name set by xmalloc_set_program_name,
if any) and then call xexit. */
-extern PTR xmalloc PARAMS ((size_t)) ATTRIBUTE_MALLOC;
+extern PTR xmalloc (size_t) ATTRIBUTE_MALLOC;
/* Reallocate memory without fail. This works like xmalloc. Note,
realloc type functions are not suitable for attribute malloc since
they may return the same address across multiple calls. */
-extern PTR xrealloc PARAMS ((PTR, size_t));
+extern PTR xrealloc (PTR, size_t);
/* Allocate memory without fail and set it to zero. This works like
xmalloc. */
-extern PTR xcalloc PARAMS ((size_t, size_t)) ATTRIBUTE_MALLOC;
+extern PTR xcalloc (size_t, size_t) ATTRIBUTE_MALLOC;
/* Copy a string into a memory buffer without fail. */
-extern char *xstrdup PARAMS ((const char *)) ATTRIBUTE_MALLOC;
+extern char *xstrdup (const char *) ATTRIBUTE_MALLOC;
+
+/* Copy at most N characters from string into a buffer without fail. */
+
+extern char *xstrndup (const char *, size_t) ATTRIBUTE_MALLOC;
/* Copy an existing memory buffer to a new memory buffer without fail. */
-extern PTR xmemdup PARAMS ((const PTR, size_t, size_t)) ATTRIBUTE_MALLOC;
+extern PTR xmemdup (const PTR, size_t, size_t) ATTRIBUTE_MALLOC;
/* Physical memory routines. Return values are in BYTES. */
-extern double physmem_total PARAMS ((void));
-extern double physmem_available PARAMS ((void));
+extern double physmem_total (void);
+extern double physmem_available (void);
/* These macros provide a K&R/C89/C++-friendly way of allocating structures
@@ -299,12 +310,172 @@ extern double physmem_available PARAMS ((void));
#define _hex_array_size 256
#define _hex_bad 99
extern const unsigned char _hex_value[_hex_array_size];
-extern void hex_init PARAMS ((void));
+extern void hex_init (void);
#define hex_p(c) (hex_value (c) != _hex_bad)
/* If you change this, note well: Some code relies on side effects in
the argument being performed exactly once. */
#define hex_value(c) ((unsigned int) _hex_value[(unsigned char) (c)])
+/* Flags for pex_init. These are bits to be or'ed together. */
+
+/* Record subprocess times, if possible. */
+#define PEX_RECORD_TIMES 0x1
+
+/* Use pipes for communication between processes, if possible. */
+#define PEX_USE_PIPES 0x2
+
+/* Save files used for communication between processes. */
+#define PEX_SAVE_TEMPS 0x4
+
+/* Prepare to execute one or more programs, with standard output of
+ each program fed to standard input of the next.
+ FLAGS As above.
+ PNAME The name of the program to report in error messages.
+ TEMPBASE A base name to use for temporary files; may be NULL to
+ use a random name.
+ Returns NULL on error. */
+
+extern struct pex_obj *pex_init (int flags, const char *pname,
+ const char *tempbase);
+
+/* Flags for pex_run. These are bits to be or'ed together. */
+
+/* Last program in pipeline. Standard output of program goes to
+ OUTNAME, or, if OUTNAME is NULL, to standard output of caller. Do
+ not set this if you want to call pex_read_output. After this is
+ set, pex_run may no longer be called with the same struct
+ pex_obj. */
+#define PEX_LAST 0x1
+
+/* Search for program in executable search path. */
+#define PEX_SEARCH 0x2
+
+/* OUTNAME is a suffix. */
+#define PEX_SUFFIX 0x4
+
+/* Send program's standard error to standard output. */
+#define PEX_STDERR_TO_STDOUT 0x8
+
+/* Input file should be opened in binary mode. This flag is ignored
+ on Unix. */
+#define PEX_BINARY_INPUT 0x10
+
+/* Output file should be opened in binary mode. This flag is ignored
+ on Unix. For proper behaviour PEX_BINARY_INPUT and
+ PEX_BINARY_OUTPUT have to match appropriately--i.e., a call using
+ PEX_BINARY_OUTPUT should be followed by a call using
+ PEX_BINARY_INPUT. */
+#define PEX_BINARY_OUTPUT 0x20
+
+/* Execute one program. Returns NULL on success. On error returns an
+ error string (typically just the name of a system call); the error
+ string is statically allocated.
+
+ OBJ Returned by pex_init.
+
+ FLAGS As above.
+
+ EXECUTABLE The program to execute.
+
+ ARGV NULL terminated array of arguments to pass to the program.
+
+ OUTNAME Sets the output file name as follows:
+
+ PEX_SUFFIX set (OUTNAME may not be NULL):
+ TEMPBASE parameter to pex_init not NULL:
+ Output file name is the concatenation of TEMPBASE
+ and OUTNAME.
+ TEMPBASE is NULL:
+ Output file name is a random file name ending in
+ OUTNAME.
+ PEX_SUFFIX not set:
+ OUTNAME not NULL:
+ Output file name is OUTNAME.
+ OUTNAME NULL, TEMPBASE not NULL:
+ Output file name is randomly chosen using
+ TEMPBASE.
+ OUTNAME NULL, TEMPBASE NULL:
+ Output file name is randomly chosen.
+
+ If PEX_LAST is not set, the output file name is the
+ name to use for a temporary file holding stdout, if
+ any (there will not be a file if PEX_USE_PIPES is set
+ and the system supports pipes). If a file is used, it
+ will be removed when no longer needed unless
+ PEX_SAVE_TEMPS is set.
+
+ If PEX_LAST is set, and OUTNAME is not NULL, standard
+ output is written to the output file name. The file
+ will not be removed. If PEX_LAST and PEX_SUFFIX are
+ both set, TEMPBASE may not be NULL.
+
+ ERRNAME If not NULL, this is the name of a file to which
+ standard error is written. If NULL, standard error of
+ the program is standard error of the caller.
+
+ ERR On an error return, *ERR is set to an errno value, or
+ to 0 if there is no relevant errno.
+*/
+
+extern const char *pex_run (struct pex_obj *obj, int flags,
+ const char *executable, char * const *argv,
+ const char *outname, const char *errname,
+ int *err);
+
+/* Read the standard output of the last program to be executed.
+ pex_run can not be called after this. BINARY should be non-zero if
+ the file should be opened in binary mode; this is ignored on Unix.
+ Returns NULL on error. Don't call fclose on the returned FILE; it
+ will be closed by pex_free. */
+
+extern FILE *pex_read_output (struct pex_obj *, int binary);
+
+/* Return exit status of all programs in VECTOR. COUNT indicates the
+ size of VECTOR. The status codes in the vector are in the order of
+ the calls to pex_run. Returns 0 on error, 1 on success. */
+
+extern int pex_get_status (struct pex_obj *, int count, int *vector);
+
+/* Return times of all programs in VECTOR. COUNT indicates the size
+ of VECTOR. struct pex_time is really just struct timeval, but that
+ is not portable to all systems. Returns 0 on error, 1 on
+ success. */
+
+struct pex_time
+{
+ unsigned long user_seconds;
+ unsigned long user_microseconds;
+ unsigned long system_seconds;
+ unsigned long system_microseconds;
+};
+
+extern int pex_get_times (struct pex_obj *, int count,
+ struct pex_time *vector);
+
+/* Clean up a pex_obj. */
+
+extern void pex_free (struct pex_obj *);
+
+/* Just execute one program. Return value is as for pex_run.
+ FLAGS Combination of PEX_SEARCH and PEX_STDERR_TO_STDOUT.
+ EXECUTABLE As for pex_run.
+ ARGV As for pex_run.
+ PNAME As for pex_init.
+ OUTNAME As for pex_run when PEX_LAST is set.
+ ERRNAME As for pex_run.
+ STATUS Set to exit status on success.
+ ERR As for pex_run.
+*/
+
+extern const char *pex_one (int flags, const char *executable,
+ char * const *argv, const char *pname,
+ const char *outname, const char *errname,
+ int *status, int *err);
+
+/* pexecute and pwait are the old pexecute interface, still here for
+ backward compatibility. Don't use these for new code. Instead,
+ use pex_init/pex_run/pex_get_status/pex_free, or pex_one. */
+
/* Definitions used by the pexecute routine. */
#define PEXECUTE_FIRST 1
@@ -315,25 +486,25 @@ extern void hex_init PARAMS ((void));
/* Execute a program. */
-extern int pexecute PARAMS ((const char *, char * const *, const char *,
- const char *, char **, char **, int));
+extern int pexecute (const char *, char * const *, const char *,
+ const char *, char **, char **, int);
/* Wait for pexecute to finish. */
-extern int pwait PARAMS ((int, int *, int));
+extern int pwait (int, int *, int);
#if !HAVE_DECL_ASPRINTF
/* Like sprintf but provides a pointer to malloc'd storage, which must
be freed by the caller. */
-extern int asprintf PARAMS ((char **, const char *, ...)) ATTRIBUTE_PRINTF_2;
+extern int asprintf (char **, const char *, ...) ATTRIBUTE_PRINTF_2;
#endif
#if !HAVE_DECL_VASPRINTF
/* Like vsprintf but provides a pointer to malloc'd storage, which
must be freed by the caller. */
-extern int vasprintf PARAMS ((char **, const char *, va_list))
+extern int vasprintf (char **, const char *, va_list)
ATTRIBUTE_PRINTF(2,0);
#endif
@@ -345,7 +516,7 @@ extern int vasprintf PARAMS ((char **, const char *, va_list))
USE_C_ALLOCA yourself. The canonical autoconf macro C_ALLOCA is
also set/unset as it is often used to indicate whether code needs
to call alloca(0). */
-extern PTR C_alloca PARAMS ((size_t)) ATTRIBUTE_MALLOC;
+extern PTR C_alloca (size_t) ATTRIBUTE_MALLOC;
#undef alloca
#if GCC_VERSION >= 2000 && !defined USE_C_ALLOCA
# define alloca(x) __builtin_alloca(x)
diff --git a/include/md5.h b/include/md5.h
index ad51f19877a..4cdad889a10 100644
--- a/include/md5.h
+++ b/include/md5.h
@@ -66,13 +66,6 @@ typedef u_int32_t md5_uint32;
# endif
#endif
-#undef __P
-#if defined (__STDC__) && __STDC__
-#define __P(x) x
-#else
-#define __P(x) ()
-#endif
-
/* Structure to save state of computation between the single steps. */
struct md5_ctx
{
@@ -93,21 +86,21 @@ struct md5_ctx
/* Initialize structure containing state of computation.
(RFC 1321, 3.3: Step 3) */
-extern void md5_init_ctx __P ((struct md5_ctx *ctx));
+extern void md5_init_ctx (struct md5_ctx *ctx);
/* Starting with the result of former calls of this function (or the
initialization function update the context for the next LEN bytes
starting at BUFFER.
It is necessary that LEN is a multiple of 64!!! */
-extern void md5_process_block __P ((const void *buffer, size_t len,
- struct md5_ctx *ctx));
+extern void md5_process_block (const void *buffer, size_t len,
+ struct md5_ctx *ctx);
/* Starting with the result of former calls of this function (or the
initialization function update the context for the next LEN bytes
starting at BUFFER.
It is NOT required that LEN is a multiple of 64. */
-extern void md5_process_bytes __P ((const void *buffer, size_t len,
- struct md5_ctx *ctx));
+extern void md5_process_bytes (const void *buffer, size_t len,
+ struct md5_ctx *ctx);
/* Process the remaining bytes in the buffer and put result from CTX
in first 16 bytes following RESBUF. The result is always in little
@@ -116,7 +109,7 @@ extern void md5_process_bytes __P ((const void *buffer, size_t len,
IMPORTANT: On some systems it is required that RESBUF is correctly
aligned for a 32 bits value. */
-extern void *md5_finish_ctx __P ((struct md5_ctx *ctx, void *resbuf));
+extern void *md5_finish_ctx (struct md5_ctx *ctx, void *resbuf);
/* Put result from CTX in first 16 bytes following RESBUF. The result is
@@ -125,18 +118,18 @@ extern void *md5_finish_ctx __P ((struct md5_ctx *ctx, void *resbuf));
IMPORTANT: On some systems it is required that RESBUF is correctly
aligned for a 32 bits value. */
-extern void *md5_read_ctx __P ((const struct md5_ctx *ctx, void *resbuf));
+extern void *md5_read_ctx (const struct md5_ctx *ctx, void *resbuf);
/* Compute MD5 message digest for bytes read from STREAM. The
resulting message digest number will be written into the 16 bytes
beginning at RESBLOCK. */
-extern int md5_stream __P ((FILE *stream, void *resblock));
+extern int md5_stream (FILE *stream, void *resblock);
/* Compute MD5 message digest for LEN bytes beginning at BUFFER. The
result is always in little endian byte order, so that a byte-wise
output yields to the wanted ASCII representation of the message
digest. */
-extern void *md5_buffer __P ((const char *buffer, size_t len, void *resblock));
+extern void *md5_buffer (const char *buffer, size_t len, void *resblock);
#endif
diff --git a/include/objalloc.h b/include/objalloc.h
index c7106478dca..67e8f00f4e6 100644
--- a/include/objalloc.h
+++ b/include/objalloc.h
@@ -64,12 +64,12 @@ struct objalloc_align { char x; double d; };
/* Create an objalloc structure. Returns NULL if malloc fails. */
-extern struct objalloc *objalloc_create PARAMS ((void));
+extern struct objalloc *objalloc_create (void);
/* Allocate space from an objalloc structure. Returns NULL if malloc
fails. */
-extern PTR _objalloc_alloc PARAMS ((struct objalloc *, unsigned long));
+extern PTR _objalloc_alloc (struct objalloc *, unsigned long);
/* The macro version of objalloc_alloc. We only define this if using
gcc, because otherwise we would have to evaluate the arguments
@@ -105,11 +105,11 @@ extern PTR _objalloc_alloc PARAMS ((struct objalloc *, unsigned long));
/* Free an entire objalloc structure. */
-extern void objalloc_free PARAMS ((struct objalloc *));
+extern void objalloc_free (struct objalloc *);
/* Free a block allocated by objalloc_alloc. This also frees all more
recently allocated blocks. */
-extern void objalloc_free_block PARAMS ((struct objalloc *, PTR));
+extern void objalloc_free_block (struct objalloc *, PTR);
#endif /* OBJALLOC_H */
diff --git a/include/obstack.h b/include/obstack.h
index 007853e805d..6e397ce2eb3 100644
--- a/include/obstack.h
+++ b/include/obstack.h
@@ -1,6 +1,6 @@
/* obstack.h - object stack macros
Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998,
- 1999, 2000
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
@@ -145,11 +145,7 @@ extern "C" {
#if defined _LIBC || defined HAVE_STRING_H
# include <string.h>
-# if defined __STDC__ && __STDC__
-# define _obstack_memcpy(To, From, N) memcpy ((To), (From), (N))
-# else
-# define _obstack_memcpy(To, From, N) memcpy ((To), (char *)(From), (N))
-# endif
+# define _obstack_memcpy(To, From, N) memcpy ((To), (From), (N))
#else
# ifdef memcpy
# define _obstack_memcpy(To, From, N) memcpy ((To), (char *)(From), (N))
@@ -174,18 +170,12 @@ struct obstack /* control current object in current chunk */
char *chunk_limit; /* address of char after current chunk */
PTR_INT_TYPE temp; /* Temporary for some macros. */
int alignment_mask; /* Mask of alignment for each object. */
-#if defined __STDC__ && __STDC__
/* These prototypes vary based on `use_extra_arg', and we use
casts to the prototypeless function type in all assignments,
but having prototypes here quiets -Wstrict-prototypes. */
struct _obstack_chunk *(*chunkfun) (void *, long);
void (*freefun) (void *, struct _obstack_chunk *);
void *extra_arg; /* first arg for chunk alloc/dealloc funcs */
-#else
- struct _obstack_chunk *(*chunkfun) (); /* User's fcn to allocate a chunk. */
- void (*freefun) (); /* User's function to free a chunk. */
- char *extra_arg; /* first arg for chunk alloc/dealloc funcs */
-#endif
unsigned use_extra_arg:1; /* chunk alloc/dealloc funcs take extra arg */
unsigned maybe_empty_object:1;/* There is a possibility that the current
chunk contains a zero-length object. This
@@ -198,7 +188,6 @@ struct obstack /* control current object in current chunk */
/* Declare the external functions we use; they are in obstack.c. */
-#if defined __STDC__ && __STDC__
extern void _obstack_newchunk (struct obstack *, int);
extern void _obstack_free (struct obstack *, void *);
extern int _obstack_begin (struct obstack *, int, int,
@@ -207,16 +196,7 @@ extern int _obstack_begin_1 (struct obstack *, int, int,
void *(*) (void *, long),
void (*) (void *, void *), void *);
extern int _obstack_memory_used (struct obstack *);
-#else
-extern void _obstack_newchunk ();
-extern void _obstack_free ();
-extern int _obstack_begin ();
-extern int _obstack_begin_1 ();
-extern int _obstack_memory_used ();
-#endif
-#if defined __STDC__ && __STDC__
-
/* Do the function-declarations after the structs
but before defining the macros. */
@@ -255,19 +235,10 @@ int obstack_alignment_mask (struct obstack *obstack);
int obstack_chunk_size (struct obstack *obstack);
int obstack_memory_used (struct obstack *obstack);
-#endif /* __STDC__ */
-
-/* Non-ANSI C cannot really support alternative functions for these macros,
- so we do not declare them. */
-
/* Error handler called when `obstack_chunk_alloc' failed to allocate
more memory. This can be set to a user defined function. The
default action is to print a message and abort. */
-#if defined __STDC__ && __STDC__
extern void (*obstack_alloc_failed_handler) (void);
-#else
-extern void (*obstack_alloc_failed_handler) ();
-#endif
/* Exit value used when `print_and_abort' is used. */
extern int obstack_exit_failure;
@@ -292,8 +263,6 @@ extern int obstack_exit_failure;
/* To prevent prototype warnings provide complete argument list in
standard C version. */
-#if defined __STDC__ && __STDC__
-
# define obstack_init(h) \
_obstack_begin ((h), 0, 0, \
(void *(*) (long)) obstack_chunk_alloc, (void (*) (void *)) obstack_chunk_free)
@@ -317,32 +286,6 @@ extern int obstack_exit_failure;
# define obstack_freefun(h, newfreefun) \
((h) -> freefun = (void (*)(void *, struct _obstack_chunk *)) (newfreefun))
-#else
-
-# define obstack_init(h) \
- _obstack_begin ((h), 0, 0, \
- (void *(*) ()) obstack_chunk_alloc, (void (*) ()) obstack_chunk_free)
-
-# define obstack_begin(h, size) \
- _obstack_begin ((h), (size), 0, \
- (void *(*) ()) obstack_chunk_alloc, (void (*) ()) obstack_chunk_free)
-
-# define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
- _obstack_begin ((h), (size), (alignment), \
- (void *(*) ()) (chunkfun), (void (*) ()) (freefun))
-
-# define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
- _obstack_begin_1 ((h), (size), (alignment), \
- (void *(*) ()) (chunkfun), (void (*) ()) (freefun), (arg))
-
-# define obstack_chunkfun(h, newchunkfun) \
- ((h) -> chunkfun = (struct _obstack_chunk *(*)()) (newchunkfun))
-
-# define obstack_freefun(h, newfreefun) \
- ((h) -> freefun = (void (*)()) (newfreefun))
-
-#endif
-
#define obstack_1grow_fast(h,achar) (*((h)->next_free)++ = (achar))
#define obstack_blank_fast(h,n) ((h)->next_free += (n))
@@ -586,21 +529,12 @@ __extension__ \
(h)->object_base = (h)->next_free, \
__INT_TO_PTR ((h)->temp))
-# if defined __STDC__ && __STDC__
-# define obstack_free(h,obj) \
+# define obstack_free(h,obj) \
( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \
(((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\
? (int) ((h)->next_free = (h)->object_base \
= (h)->temp + (char *) (h)->chunk) \
: (((obstack_free) ((h), (h)->temp + (char *) (h)->chunk), 0), 0)))
-# else
-# define obstack_free(h,obj) \
-( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \
- (((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\
- ? (int) ((h)->next_free = (h)->object_base \
- = (h)->temp + (char *) (h)->chunk) \
- : (_obstack_free ((h), (h)->temp + (char *) (h)->chunk), 0)))
-# endif
#endif /* not __GNUC__ or not __STDC__ */
diff --git a/include/partition.h b/include/partition.h
index 5d3623f716e..0cf3fbcb32d 100644
--- a/include/partition.h
+++ b/include/partition.h
@@ -64,13 +64,10 @@ typedef struct partition_def
struct partition_elem elements[1];
} *partition;
-extern partition partition_new PARAMS((int));
-extern void partition_delete PARAMS((partition));
-extern int partition_union PARAMS((partition,
- int,
- int));
-extern void partition_print PARAMS((partition,
- FILE*));
+extern partition partition_new (int);
+extern void partition_delete (partition);
+extern int partition_union (partition, int, int);
+extern void partition_print (partition, FILE*);
/* Returns the canonical element corresponding to the class containing
ELEMENT__ in PARTITION__. */
diff --git a/include/splay-tree.h b/include/splay-tree.h
index e05aeb5afb8..bcd2a3d4425 100644
--- a/include/splay-tree.h
+++ b/include/splay-tree.h
@@ -52,30 +52,30 @@ typedef struct splay_tree_node_s *splay_tree_node;
/* The type of a function which compares two splay-tree keys. The
function should return values as for qsort. */
-typedef int (*splay_tree_compare_fn) PARAMS((splay_tree_key, splay_tree_key));
+typedef int (*splay_tree_compare_fn) (splay_tree_key, splay_tree_key);
/* The type of a function used to deallocate any resources associated
with the key. */
-typedef void (*splay_tree_delete_key_fn) PARAMS((splay_tree_key));
+typedef void (*splay_tree_delete_key_fn) (splay_tree_key);
/* The type of a function used to deallocate any resources associated
with the value. */
-typedef void (*splay_tree_delete_value_fn) PARAMS((splay_tree_value));
+typedef void (*splay_tree_delete_value_fn) (splay_tree_value);
/* The type of a function used to iterate over the tree. */
-typedef int (*splay_tree_foreach_fn) PARAMS((splay_tree_node, void*));
+typedef int (*splay_tree_foreach_fn) (splay_tree_node, void*);
/* The type of a function used to allocate memory for tree root and
node structures. The first argument is the number of bytes needed;
the second is a data pointer the splay tree functions pass through
to the allocator. This function must never return zero. */
-typedef PTR (*splay_tree_allocate_fn) PARAMS((int, void *));
+typedef PTR (*splay_tree_allocate_fn) (int, void *);
/* The type of a function used to free memory allocated using the
corresponding splay_tree_allocate_fn. The first argument is the
memory to be freed; the latter is a data pointer the splay tree
functions pass through to the freer. */
-typedef void (*splay_tree_deallocate_fn) PARAMS((void *, void *));
+typedef void (*splay_tree_deallocate_fn) (void *, void *);
/* The nodes in the splay tree. */
struct splay_tree_node_s GTY(())
@@ -114,43 +114,28 @@ struct splay_tree_s GTY(())
};
typedef struct splay_tree_s *splay_tree;
-extern splay_tree splay_tree_new PARAMS((splay_tree_compare_fn,
- splay_tree_delete_key_fn,
- splay_tree_delete_value_fn));
-extern splay_tree splay_tree_new_with_allocator
- PARAMS((splay_tree_compare_fn,
- splay_tree_delete_key_fn,
+extern splay_tree splay_tree_new (splay_tree_compare_fn,
+ splay_tree_delete_key_fn,
+ splay_tree_delete_value_fn);
+extern splay_tree splay_tree_new_with_allocator (splay_tree_compare_fn,
+ splay_tree_delete_key_fn,
splay_tree_delete_value_fn,
- splay_tree_allocate_fn,
- splay_tree_deallocate_fn,
- void *));
-extern void splay_tree_delete PARAMS((splay_tree));
-extern splay_tree_node splay_tree_insert
- PARAMS((splay_tree,
- splay_tree_key,
- splay_tree_value));
-extern void splay_tree_remove PARAMS((splay_tree,
- splay_tree_key));
-extern splay_tree_node splay_tree_lookup
- PARAMS((splay_tree,
- splay_tree_key));
-extern splay_tree_node splay_tree_predecessor
- PARAMS((splay_tree,
- splay_tree_key));
-extern splay_tree_node splay_tree_successor
- PARAMS((splay_tree,
- splay_tree_key));
-extern splay_tree_node splay_tree_max
- PARAMS((splay_tree));
-extern splay_tree_node splay_tree_min
- PARAMS((splay_tree));
-extern int splay_tree_foreach PARAMS((splay_tree,
- splay_tree_foreach_fn,
- void*));
-extern int splay_tree_compare_ints PARAMS((splay_tree_key,
- splay_tree_key));
-extern int splay_tree_compare_pointers PARAMS((splay_tree_key,
- splay_tree_key));
+ splay_tree_allocate_fn,
+ splay_tree_deallocate_fn,
+ void *);
+extern void splay_tree_delete (splay_tree);
+extern splay_tree_node splay_tree_insert (splay_tree,
+ splay_tree_key,
+ splay_tree_value);
+extern void splay_tree_remove (splay_tree, splay_tree_key);
+extern splay_tree_node splay_tree_lookup (splay_tree, splay_tree_key);
+extern splay_tree_node splay_tree_predecessor (splay_tree, splay_tree_key);
+extern splay_tree_node splay_tree_successor (splay_tree, splay_tree_key);
+extern splay_tree_node splay_tree_max (splay_tree);
+extern splay_tree_node splay_tree_min (splay_tree);
+extern int splay_tree_foreach (splay_tree, splay_tree_foreach_fn, void*);
+extern int splay_tree_compare_ints (splay_tree_key, splay_tree_key);
+extern int splay_tree_compare_pointers (splay_tree_key, splay_tree_key);
#ifdef __cplusplus
}
diff --git a/include/ternary.h b/include/ternary.h
index 40d442e6223..c8de76ac0c8 100644
--- a/include/ternary.h
+++ b/include/ternary.h
@@ -38,14 +38,14 @@ ternary_node;
already there, and replace is 0.
Otherwise, replaces if it it exists, inserts if it doesn't, and
returns the data you passed in. */
-PTR ternary_insert PARAMS ((ternary_tree *p, const char *s,
- PTR data, int replace));
+PTR ternary_insert (ternary_tree *p, const char *s,
+ PTR data, int replace);
/* Delete the ternary search tree rooted at P.
Does NOT delete the data you associated with the strings. */
-void ternary_cleanup PARAMS ((ternary_tree p));
+void ternary_cleanup (ternary_tree p);
/* Search the ternary tree for string S, returning the data associated
with it if found. */
-PTR ternary_search PARAMS ((const ternary_node *p, const char *s));
+PTR ternary_search (const ternary_node *p, const char *s);
#endif
diff --git a/include/xregex2.h b/include/xregex2.h
index 2991daf9bcf..812518bbe39 100644
--- a/include/xregex2.h
+++ b/include/xregex2.h
@@ -434,32 +434,21 @@ typedef struct
unfortunately clutters up the declarations a bit, but I think it's
worth it. */
-#if __STDC__
-
-# define _RE_ARGS(args) args
-
-#else /* not __STDC__ */
-
-# define _RE_ARGS(args) ()
-
-#endif /* not __STDC__ */
-
/* Sets the current default syntax to SYNTAX, and return the old syntax.
You can also simply assign to the `re_syntax_options' variable. */
-extern reg_syntax_t re_set_syntax _RE_ARGS ((reg_syntax_t syntax));
+extern reg_syntax_t re_set_syntax (reg_syntax_t syntax);
/* Compile the regular expression PATTERN, with length LENGTH
and syntax given by the global `re_syntax_options', into the buffer
BUFFER. Return NULL if successful, and an error string if not. */
-extern const char *re_compile_pattern
- _RE_ARGS ((const char *pattern, size_t length,
- struct re_pattern_buffer *buffer));
+extern const char *re_compile_pattern (const char *pattern, size_t length,
+ struct re_pattern_buffer *buffer);
/* Compile a fastmap for the compiled pattern in BUFFER; used to
accelerate searches. Return 0 if successful and -2 if was an
internal error. */
-extern int re_compile_fastmap _RE_ARGS ((struct re_pattern_buffer *buffer));
+extern int re_compile_fastmap (struct re_pattern_buffer *buffer);
/* Search in the string STRING (with length LENGTH) for the pattern
@@ -467,31 +456,29 @@ extern int re_compile_fastmap _RE_ARGS ((struct re_pattern_buffer *buffer));
characters. Return the starting position of the match, -1 for no
match, or -2 for an internal error. Also return register
information in REGS (if REGS and BUFFER->no_sub are nonzero). */
-extern int re_search
- _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string,
- int length, int start, int range, struct re_registers *regs));
+extern int re_search (struct re_pattern_buffer *buffer, const char *string,
+ int length, int start, int range,
+ struct re_registers *regs);
/* Like `re_search', but search in the concatenation of STRING1 and
STRING2. Also, stop searching at index START + STOP. */
-extern int re_search_2
- _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1,
- int length1, const char *string2, int length2,
- int start, int range, struct re_registers *regs, int stop));
+extern int re_search_2 (struct re_pattern_buffer *buffer, const char *string1,
+ int length1, const char *string2, int length2,
+ int start, int range, struct re_registers *regs,
+ int stop);
/* Like `re_search', but return how many characters in STRING the regexp
in BUFFER matched, starting at position START. */
-extern int re_match
- _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string,
- int length, int start, struct re_registers *regs));
+extern int re_match (struct re_pattern_buffer *buffer, const char *string,
+ int length, int start, struct re_registers *regs);
/* Relates to `re_match' as `re_search_2' relates to `re_search'. */
-extern int re_match_2
- _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1,
- int length1, const char *string2, int length2,
- int start, struct re_registers *regs, int stop));
+extern int re_match_2 (struct re_pattern_buffer *buffer, const char *string1,
+ int length1, const char *string2, int length2,
+ int start, struct re_registers *regs, int stop);
/* Set REGS to hold NUM_REGS registers, storing them in STARTS and
@@ -506,15 +493,16 @@ extern int re_match_2
Unless this function is called, the first search or match using
PATTERN_BUFFER will allocate its own register data, without
freeing the old data. */
-extern void re_set_registers
- _RE_ARGS ((struct re_pattern_buffer *buffer, struct re_registers *regs,
- unsigned num_regs, regoff_t *starts, regoff_t *ends));
+extern void re_set_registers (struct re_pattern_buffer *buffer,
+ struct re_registers *regs,
+ unsigned num_regs, regoff_t *starts,
+ regoff_t *ends);
#if defined _REGEX_RE_COMP || defined _LIBC
# ifndef _CRAY
/* 4.2 bsd compatibility. */
-extern char *re_comp _RE_ARGS ((const char *));
-extern int re_exec _RE_ARGS ((const char *));
+extern char *re_comp (const char *);
+extern int re_exec (const char *);
# endif
#endif
@@ -541,19 +529,19 @@ extern int re_exec _RE_ARGS ((const char *));
#endif
/* POSIX compatibility. */
-extern int regcomp _RE_ARGS ((regex_t *__restrict __preg,
- const char *__restrict __pattern,
- int __cflags));
+extern int regcomp (regex_t *__restrict __preg,
+ const char *__restrict __pattern,
+ int __cflags);
-extern int regexec _RE_ARGS ((const regex_t *__restrict __preg,
- const char *__restrict __string, size_t __nmatch,
- regmatch_t __pmatch[__restrict_arr],
- int __eflags));
+extern int regexec (const regex_t *__restrict __preg,
+ const char *__restrict __string, size_t __nmatch,
+ regmatch_t __pmatch[__restrict_arr],
+ int __eflags);
-extern size_t regerror _RE_ARGS ((int __errcode, const regex_t *__preg,
- char *__errbuf, size_t __errbuf_size));
+extern size_t regerror (int __errcode, const regex_t *__preg,
+ char *__errbuf, size_t __errbuf_size);
-extern void regfree _RE_ARGS ((regex_t *__preg));
+extern void regfree (regex_t *__preg);
#ifdef __cplusplus
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog
index 28fac2e1072..99476d0c89f 100644
--- a/libcpp/ChangeLog
+++ b/libcpp/ChangeLog
@@ -1,3 +1,8 @@
+2005-03-28 Andreas Jaeger <aj@suse.de>
+
+ * lex.c (warn_about_normalization): Cast field width to int to
+ avoid warning.
+
2005-03-19 Joseph S. Myers <joseph@codesourcery.com>
* configure.ac: Consistently use solaris2.1[0-9]* instead of
diff --git a/libcpp/lex.c b/libcpp/lex.c
index 289f7b35033..58e559fd9fd 100644
--- a/libcpp/lex.c
+++ b/libcpp/lex.c
@@ -1,5 +1,5 @@
/* CPP Library - lexical analysis.
- Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
Contributed by Per Bothner, 1994-95.
Based on CCCP program by Paul Rubin, June 1986
Adapted to ANSI C, Richard Stallman, Jan 1987
@@ -445,10 +445,10 @@ warn_about_normalization (cpp_reader *pfile,
sz = cpp_spell_token (pfile, token, buf, false) - buf;
if (NORMALIZE_STATE_RESULT (s) == normalized_C)
cpp_error_with_line (pfile, CPP_DL_WARNING, token->src_loc, 0,
- "`%.*s' is not in NFKC", sz, buf);
+ "`%.*s' is not in NFKC", (int) sz, buf);
else
cpp_error_with_line (pfile, CPP_DL_WARNING, token->src_loc, 0,
- "`%.*s' is not in NFC", sz, buf);
+ "`%.*s' is not in NFC", (int) sz, buf);
}
}
diff --git a/libcpp/po/ChangeLog b/libcpp/po/ChangeLog
index b7200149f90..4d071b85e6f 100644
--- a/libcpp/po/ChangeLog
+++ b/libcpp/po/ChangeLog
@@ -1,3 +1,7 @@
+2005-03-29 Joseph S. Myers <joseph@codesourcery.com>
+
+ * de.po: Update.
+
2005-03-04 Joseph S. Myers <joseph@codesourcery.com>
* tr.po: Update.
diff --git a/libcpp/po/de.po b/libcpp/po/de.po
index 99cbe93e38f..536628f77d4 100644
--- a/libcpp/po/de.po
+++ b/libcpp/po/de.po
@@ -6,10 +6,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: gcc 3.4-b20040206\n"
+"Project-Id-Version: cpplib 4.0-b20050226\n"
"Report-Msgid-Bugs-To: http://gcc.gnu.org/bugs.html\n"
"POT-Creation-Date: 2005-02-25 23:37+0000\n"
-"PO-Revision-Date: 2004-02-15 12:14+0100\n"
+"PO-Revision-Date: 2005-03-26 15:41+0100\n"
"Last-Translator: Roland Stigge <stigge@antcom.de>\n"
"Language-Team: German <de@li.org>\n"
"MIME-Version: 1.0\n"
@@ -31,18 +31,18 @@ msgid "no iconv implementation, cannot convert from %s to %s"
msgstr "keine Implementation für iconv, es kann nicht von %s nach %s konvertiert werden"
#: charset.c:743
-#, fuzzy, c-format
+#, c-format
msgid "character 0x%lx is not in the basic source character set\n"
-msgstr "UCN wird in Quellzeichensatz konvertiert"
+msgstr "Zeichen 0x%lx ist nicht im regulären Quellzeichensatz\n"
#: charset.c:760 charset.c:1243
msgid "converting to execution character set"
msgstr "Konvertierung in Zeichensatz der Ausführung"
#: charset.c:766
-#, fuzzy, c-format
+#, c-format
msgid "character 0x%lx is not unibyte in execution character set"
-msgstr "Konvertierung in Zeichensatz der Ausführung"
+msgstr "Zeichen 0x%lx ist kein Unibyte im Ausführungs-Zeichensatz"
#: charset.c:865
msgid "universal character names are only valid in C++ and C99"
@@ -209,7 +209,7 @@ msgstr "#%s erwartet \"DATEINAME\" oder <DATEINAME>"
#: directives.c:673
#, c-format
msgid "empty filename in #%s"
-msgstr ""
+msgstr "leerer Dateiname in #%s"
#: directives.c:681
msgid "#include nested too deeply"
@@ -250,7 +250,7 @@ msgstr "ungültige #ident-Direktive"
#: directives.c:1038
#, c-format
msgid "registering \"%s\" as both a pragma and a pragma namespace"
-msgstr "registriere »%s« sowohl als Pragma als auch als Pragma-Namespace"
+msgstr "»%s« wird sowohl als Pragma als auch als Pragma-Namespace registriert"
#: directives.c:1041
#, c-format
@@ -461,9 +461,8 @@ msgid "token \"%s\" is not valid in preprocessor expressions"
msgstr "Token »%s« ist nicht gültig in Präprozessorausdrücken"
#: expr.c:753
-#, fuzzy
msgid "missing expression between '(' and ')'"
-msgstr "ungültiger Ausdruck zwischen '(' und ')'"
+msgstr "fehlender Ausdruck zwischen '(' und ')'"
#: expr.c:756
msgid "#if with no expression"
@@ -475,9 +474,9 @@ msgid "operator '%s' has no right operand"
msgstr "Operator »%s« hat keinen rechten Operanden"
#: expr.c:764
-#, fuzzy, c-format
+#, c-format
msgid "operator '%s' has no left operand"
-msgstr "Operator »%s« hat keinen rechten Operanden"
+msgstr "Operator »%s« hat keinen linken Operanden"
#: expr.c:790
msgid " ':' without preceding '?'"
@@ -540,7 +539,7 @@ msgstr "ein oder mehrere PCH-Dateien wurden gefunden, aber sie sind ungültig"
#: files.c:457
msgid "use -Winvalid-pch for more information"
-msgstr "verwenden Sie -Winvalid-pch für mehr Informationen"
+msgstr "-Winvalid-pch für mehr Informationen verwenden"
#: files.c:522
#, c-format
@@ -614,9 +613,9 @@ msgid "trigraph ??%c converted to %c"
msgstr "Trigraph ??%c in %c konvertiert"
#: lex.c:301
-#, fuzzy, c-format
+#, c-format
msgid "trigraph ??%c ignored, use -trigraphs to enable"
-msgstr "Trigraph ??%c ignoriert"
+msgstr "Trigraph ??%c ignoriert, -trigraphs zum Aktivieren verwenden"
#: lex.c:347
msgid "\"/*\" within comment"
diff --git a/libffi/ChangeLog b/libffi/ChangeLog
index 88dc9581e0a..fa801d1539c 100644
--- a/libffi/ChangeLog
+++ b/libffi/ChangeLog
@@ -1,3 +1,8 @@
+2005-03-23 Mike Stump <mrs@apple.com>
+
+ * src/powerpc/darwin.S: Update for -m64 multilib.
+ * src/powerpc/darwin_closure.S: Likewise.
+
2005-03-21 Zack Weinberg <zack@codesourcery.com>
* configure.ac: Do not invoke TL_AC_GCC_VERSION.
diff --git a/libffi/src/powerpc/darwin.S b/libffi/src/powerpc/darwin.S
index b608e9c0333..d8a1df5fe98 100644
--- a/libffi/src/powerpc/darwin.S
+++ b/libffi/src/powerpc/darwin.S
@@ -24,6 +24,16 @@
OTHER DEALINGS IN THE SOFTWARE.
----------------------------------------------------------------------- */
+#if defined(__ppc64__)
+#define MODE_CHOICE(x, y) y
+#else
+#define MODE_CHOICE(x, y) x
+#endif
+
+#define g_long MODE_CHOICE(long, quad) /* usage is ".g_long" */
+
+#define LOG2_GPR_BYTES MODE_CHOICE(2,3) /* log2(GPR_BYTES) */
+
#define LIBFFI_ASM
#include <fficonfig.h>
#include <ffi.h>
@@ -190,7 +200,7 @@ LSCIE1:
.byte 0xc ; DW_CFA_def_cfa
.byte 0x1 ; uleb128 0x1
.byte 0x0 ; uleb128 0x0
- .align 2
+ .align LOG2_GPR_BYTES
LECIE1:
.globl _ffi_call_DARWIN.eh
_ffi_call_DARWIN.eh:
@@ -199,9 +209,9 @@ LSFDE1:
.long L$set$1 ; FDE Length
LASFDE1:
.long LASFDE1-EH_frame1 ; FDE CIE offset
- .long LLFB0$non_lazy_ptr-. ; FDE initial location
+ .g_long LLFB0$non_lazy_ptr-. ; FDE initial location
.set L$set$3,LFE1-LFB0
- .long L$set$3 ; FDE address range
+ .g_long L$set$3 ; FDE address range
.byte 0x0 ; uleb128 0x0; Augmentation size
.byte 0x4 ; DW_CFA_advance_loc4
.set L$set$4,LCFI0-LFB1
@@ -227,9 +237,9 @@ LASFDE1:
.long L$set$6
.byte 0xd ; DW_CFA_def_cfa_register
.byte 0x1c ; uleb128 0x1c
- .align 2
+ .align LOG2_GPR_BYTES
LEFDE1:
.data
- .align 2
+ .align LOG2_GPR_BYTES
LLFB0$non_lazy_ptr:
- .long LFB0
+ .g_long LFB0
diff --git a/libffi/src/powerpc/darwin_closure.S b/libffi/src/powerpc/darwin_closure.S
index 272278b938b..7959838e95b 100644
--- a/libffi/src/powerpc/darwin_closure.S
+++ b/libffi/src/powerpc/darwin_closure.S
@@ -27,13 +27,25 @@
#define LIBFFI_ASM
#define L(x) x
+#if defined(__ppc64__)
+#define MODE_CHOICE(x, y) y
+#else
+#define MODE_CHOICE(x, y) x
+#endif
+
+#define lgu MODE_CHOICE(lwzu, ldu)
+
+#define g_long MODE_CHOICE(long, quad) /* usage is ".g_long" */
+
+#define LOG2_GPR_BYTES MODE_CHOICE(2,3) /* log2(GPR_BYTES) */
+
.file "darwin_closure.S"
.text
- .align 2
+ .align LOG2_GPR_BYTES
.globl _ffi_closure_ASM
.text
- .align 2
+ .align LOG2_GPR_BYTES
_ffi_closure_ASM:
LFB1:
mflr r0 /* extract return address */
@@ -234,7 +246,7 @@ Lfinish:
/* END(ffi_closure_ASM) */
.data
-.section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms
+.section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support
EH_frame1:
.set L$set$0,LECIE1-LSCIE1
.long L$set$0 ; Length of Common Information Entry
@@ -250,7 +262,7 @@ LSCIE1:
.byte 0xc ; DW_CFA_def_cfa
.byte 0x1 ; uleb128 0x1
.byte 0x0 ; uleb128 0x0
- .align 2
+ .align LOG2_GPR_BYTES
LECIE1:
.globl _ffi_closure_ASM.eh
_ffi_closure_ASM.eh:
@@ -260,9 +272,9 @@ LSFDE1:
LASFDE1:
.long LASFDE1-EH_frame1 ; FDE CIE offset
- .long LLFB1$non_lazy_ptr-. ; FDE initial location
+ .g_long LLFB1$non_lazy_ptr-. ; FDE initial location
.set L$set$3,LFE1-LFB1
- .long L$set$3 ; FDE address range
+ .g_long L$set$3 ; FDE address range
.byte 0x0 ; uleb128 0x0; Augmentation size
.byte 0x4 ; DW_CFA_advance_loc4
.set L$set$3,LCFI1-LCFI0
@@ -275,14 +287,15 @@ LASFDE1:
.byte 0x11 ; DW_CFA_offset_extended_sf
.byte 0x41 ; uleb128 0x41
.byte 0x7e ; sleb128 -2
- .align 2
+ .align LOG2_GPR_BYTES
LEFDE1:
.data
- .align 2
+ .align LOG2_GPR_BYTES
LDFCM0:
.section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
- .align 2
+ .align LOG2_GPR_BYTES
Lffi_closure_helper_DARWIN$stub:
+#if 1
.indirect_symbol _ffi_closure_helper_DARWIN
mflr r0
bcl 20,31,LO$ffi_closure_helper_DARWIN
@@ -290,15 +303,15 @@ LO$ffi_closure_helper_DARWIN:
mflr r11
addis r11,r11,ha16(L_ffi_closure_helper_DARWIN$lazy_ptr - LO$ffi_closure_helper_DARWIN)
mtlr r0
- lwzu r12,lo16(L_ffi_closure_helper_DARWIN$lazy_ptr - LO$ffi_closure_helper_DARWIN)(r11)
+ lgu r12,lo16(L_ffi_closure_helper_DARWIN$lazy_ptr - LO$ffi_closure_helper_DARWIN)(r11)
mtctr r12
bctr
-.data
.lazy_symbol_pointer
L_ffi_closure_helper_DARWIN$lazy_ptr:
.indirect_symbol _ffi_closure_helper_DARWIN
- .long dyld_stub_binding_helper
+ .g_long dyld_stub_binding_helper
+#endif
.data
- .align 2
+ .align LOG2_GPR_BYTES
LLFB1$non_lazy_ptr:
- .long LFB1
+ .g_long LFB1
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 9f37130d56e..edc23af6ce9 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,52 @@
+2005-03-29 Dale Ranta <dir@lanl.gov>
+ Francois-Xavier Coudert <coudert@clipper.ens.fr>
+
+ PR libfortran/20163
+ * io/open.c (st_open): call library_end() before returning even if
+ an error arises.
+
+2005-03-25 Francois-Xavier Coudert <coudert@clipper.ens.fr>
+
+ PR libfortran/19678
+ * list_read.c (next_char, eat_separator, finish_separator, read_real)
+ (namelist_read): Add support for '\r' as well as '\n' as EOL
+ character.
+
+ PR libfortran/19679
+ * list_read.c (read_sf): Add a '\r' in a test to support DOS
+ line-endings when line length is exceeded.
+
+2005-03-25 Francois-Xavier Coudert <coudert@clipper.ens.fr>
+
+ PR libfortran/15332
+ * io/format.c (parse_format_list): format node for colon edit
+ descriptor needs a repeat counter set to 1.
+
+2005-02-24 Francois-Xavier Coudert <coudert@clipper.ens.fr>
+
+ * config.h.in: Regenerate.
+
+2005-02-23 Francois-Xavier Coudert <coudert@clipper.ens.fr>
+
+ PR libfortran/18025
+ * write.c (output_float): Handling the "F0.d" format similarly as
+ commercial compilers.
+
+2005-03-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
+
+ * Makefile.am: Added new files.
+ * Makefile.in: Regenerate.
+ * aclocal.m4: Regenerate.
+ * configure.ac: add checks for signal.h headers file, as well as
+ following functions: chdir, strerror, getlogin, gethostname, kill,
+ link, symlink, perror, sleep, time.
+ * configure: Regenerate.
+ * intrinsics/chdir.c, intrinsics/gerror.c, intrinsics/getlog.c,
+ intrinsics/hostnm.c, intrinsics/ierrno.c, intrinsics/kill.c,
+ intrinsics/link.c, intrinsics/perror.c, intrinsics/rename.c,
+ intrinsics/sleep.c, intrinsics/symlnk.c, intrinsics/time.c: Newly
+ implementend g77 intrinsics.
+
2005-03-21 Zack Weinberg <zack@codesourcery.com>
* configure.ac: Do not invoke TL_AC_GCC_VERSION.
diff --git a/libgfortran/Makefile.am b/libgfortran/Makefile.am
index 347b5523d1e..58df6097338 100644
--- a/libgfortran/Makefile.am
+++ b/libgfortran/Makefile.am
@@ -47,6 +47,7 @@ intrinsics/abort.c \
intrinsics/args.c \
intrinsics/bessel.c \
intrinsics/c99_functions.c \
+intrinsics/chdir.c \
intrinsics/cpu_time.c \
intrinsics/cshift0.c \
intrinsics/date_and_time.c \
@@ -58,23 +59,34 @@ intrinsics/etime.c \
intrinsics/exit.c \
intrinsics/flush.c \
intrinsics/fnum.c \
+intrinsics/gerror.c \
intrinsics/getcwd.c \
+intrinsics/getlog.c \
intrinsics/getXid.c \
+intrinsics/hostnm.c \
+intrinsics/kill.c \
+intrinsics/ierrno.c \
intrinsics/ishftc.c \
+intrinsics/link.c \
intrinsics/mvbits.c \
intrinsics/pack_generic.c \
+intrinsics/perror.c \
intrinsics/size.c \
+intrinsics/sleep.c \
intrinsics/spread_generic.c \
intrinsics/string_intrinsics.c \
intrinsics/system.c \
intrinsics/rand.c \
intrinsics/random.c \
+intrinsics/rename.c \
intrinsics/reshape_generic.c \
intrinsics/reshape_packed.c \
intrinsics/selected_int_kind.f90 \
intrinsics/selected_real_kind.f90 \
intrinsics/stat.c \
+intrinsics/symlnk.c \
intrinsics/system_clock.c \
+intrinsics/time.c \
intrinsics/transpose_generic.c \
intrinsics/umask.c \
intrinsics/unlink.c \
diff --git a/libgfortran/Makefile.in b/libgfortran/Makefile.in
index 147cd3643a6..14e8ed6c09d 100644
--- a/libgfortran/Makefile.in
+++ b/libgfortran/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.3 from Makefile.am.
+# Makefile.in generated by automake 1.9.4 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -47,9 +47,8 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/../config.guess \
$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/../config/no-executables.m4 \
- $(top_srcdir)/acinclude.m4 $(top_srcdir)/../libtool.m4 \
- $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/../libtool.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
@@ -127,13 +126,15 @@ am__objects_32 = backspace.lo close.lo endfile.lo format.lo inquire.lo \
list_read.lo lock.lo open.lo read.lo rewind.lo transfer.lo \
unit.lo unix.lo write.lo
am__objects_33 = associated.lo abort.lo args.lo bessel.lo \
- c99_functions.lo cpu_time.lo cshift0.lo date_and_time.lo \
- env.lo erf.lo eoshift0.lo eoshift2.lo etime.lo exit.lo \
- flush.lo fnum.lo getcwd.lo getXid.lo ishftc.lo mvbits.lo \
- pack_generic.lo size.lo spread_generic.lo string_intrinsics.lo \
- system.lo rand.lo random.lo reshape_generic.lo \
- reshape_packed.lo selected_int_kind.lo selected_real_kind.lo \
- stat.lo system_clock.lo transpose_generic.lo umask.lo \
+ c99_functions.lo chdir.lo cpu_time.lo cshift0.lo \
+ date_and_time.lo env.lo erf.lo eoshift0.lo eoshift2.lo \
+ etime.lo exit.lo flush.lo fnum.lo gerror.lo getcwd.lo \
+ getlog.lo getXid.lo hostnm.lo kill.lo ierrno.lo ishftc.lo \
+ link.lo mvbits.lo pack_generic.lo perror.lo size.lo sleep.lo \
+ spread_generic.lo string_intrinsics.lo system.lo rand.lo \
+ random.lo rename.lo reshape_generic.lo reshape_packed.lo \
+ selected_int_kind.lo selected_real_kind.lo stat.lo symlnk.lo \
+ system_clock.lo time.lo transpose_generic.lo umask.lo \
unlink.lo unpack_generic.lo in_pack_generic.lo \
in_unpack_generic.lo normalize.lo
am__objects_34 =
@@ -326,6 +327,7 @@ intrinsics/abort.c \
intrinsics/args.c \
intrinsics/bessel.c \
intrinsics/c99_functions.c \
+intrinsics/chdir.c \
intrinsics/cpu_time.c \
intrinsics/cshift0.c \
intrinsics/date_and_time.c \
@@ -337,23 +339,34 @@ intrinsics/etime.c \
intrinsics/exit.c \
intrinsics/flush.c \
intrinsics/fnum.c \
+intrinsics/gerror.c \
intrinsics/getcwd.c \
+intrinsics/getlog.c \
intrinsics/getXid.c \
+intrinsics/hostnm.c \
+intrinsics/kill.c \
+intrinsics/ierrno.c \
intrinsics/ishftc.c \
+intrinsics/link.c \
intrinsics/mvbits.c \
intrinsics/pack_generic.c \
+intrinsics/perror.c \
intrinsics/size.c \
+intrinsics/sleep.c \
intrinsics/spread_generic.c \
intrinsics/string_intrinsics.c \
intrinsics/system.c \
intrinsics/rand.c \
intrinsics/random.c \
+intrinsics/rename.c \
intrinsics/reshape_generic.c \
intrinsics/reshape_packed.c \
intrinsics/selected_int_kind.f90 \
intrinsics/selected_real_kind.f90 \
intrinsics/stat.c \
+intrinsics/symlnk.c \
intrinsics/system_clock.c \
+intrinsics/time.c \
intrinsics/transpose_generic.c \
intrinsics/umask.c \
intrinsics/unlink.c \
@@ -1210,6 +1223,9 @@ bessel.lo: intrinsics/bessel.c
c99_functions.lo: intrinsics/c99_functions.c
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o c99_functions.lo `test -f 'intrinsics/c99_functions.c' || echo '$(srcdir)/'`intrinsics/c99_functions.c
+chdir.lo: intrinsics/chdir.c
+ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o chdir.lo `test -f 'intrinsics/chdir.c' || echo '$(srcdir)/'`intrinsics/chdir.c
+
cpu_time.lo: intrinsics/cpu_time.c
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cpu_time.lo `test -f 'intrinsics/cpu_time.c' || echo '$(srcdir)/'`intrinsics/cpu_time.c
@@ -1243,24 +1259,48 @@ flush.lo: intrinsics/flush.c
fnum.lo: intrinsics/fnum.c
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fnum.lo `test -f 'intrinsics/fnum.c' || echo '$(srcdir)/'`intrinsics/fnum.c
+gerror.lo: intrinsics/gerror.c
+ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gerror.lo `test -f 'intrinsics/gerror.c' || echo '$(srcdir)/'`intrinsics/gerror.c
+
getcwd.lo: intrinsics/getcwd.c
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o getcwd.lo `test -f 'intrinsics/getcwd.c' || echo '$(srcdir)/'`intrinsics/getcwd.c
+getlog.lo: intrinsics/getlog.c
+ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o getlog.lo `test -f 'intrinsics/getlog.c' || echo '$(srcdir)/'`intrinsics/getlog.c
+
getXid.lo: intrinsics/getXid.c
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o getXid.lo `test -f 'intrinsics/getXid.c' || echo '$(srcdir)/'`intrinsics/getXid.c
+hostnm.lo: intrinsics/hostnm.c
+ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o hostnm.lo `test -f 'intrinsics/hostnm.c' || echo '$(srcdir)/'`intrinsics/hostnm.c
+
+kill.lo: intrinsics/kill.c
+ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o kill.lo `test -f 'intrinsics/kill.c' || echo '$(srcdir)/'`intrinsics/kill.c
+
+ierrno.lo: intrinsics/ierrno.c
+ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ierrno.lo `test -f 'intrinsics/ierrno.c' || echo '$(srcdir)/'`intrinsics/ierrno.c
+
ishftc.lo: intrinsics/ishftc.c
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ishftc.lo `test -f 'intrinsics/ishftc.c' || echo '$(srcdir)/'`intrinsics/ishftc.c
+link.lo: intrinsics/link.c
+ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o link.lo `test -f 'intrinsics/link.c' || echo '$(srcdir)/'`intrinsics/link.c
+
mvbits.lo: intrinsics/mvbits.c
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mvbits.lo `test -f 'intrinsics/mvbits.c' || echo '$(srcdir)/'`intrinsics/mvbits.c
pack_generic.lo: intrinsics/pack_generic.c
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pack_generic.lo `test -f 'intrinsics/pack_generic.c' || echo '$(srcdir)/'`intrinsics/pack_generic.c
+perror.lo: intrinsics/perror.c
+ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o perror.lo `test -f 'intrinsics/perror.c' || echo '$(srcdir)/'`intrinsics/perror.c
+
size.lo: intrinsics/size.c
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o size.lo `test -f 'intrinsics/size.c' || echo '$(srcdir)/'`intrinsics/size.c
+sleep.lo: intrinsics/sleep.c
+ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sleep.lo `test -f 'intrinsics/sleep.c' || echo '$(srcdir)/'`intrinsics/sleep.c
+
spread_generic.lo: intrinsics/spread_generic.c
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o spread_generic.lo `test -f 'intrinsics/spread_generic.c' || echo '$(srcdir)/'`intrinsics/spread_generic.c
@@ -1276,6 +1316,9 @@ rand.lo: intrinsics/rand.c
random.lo: intrinsics/random.c
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o random.lo `test -f 'intrinsics/random.c' || echo '$(srcdir)/'`intrinsics/random.c
+rename.lo: intrinsics/rename.c
+ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o rename.lo `test -f 'intrinsics/rename.c' || echo '$(srcdir)/'`intrinsics/rename.c
+
reshape_generic.lo: intrinsics/reshape_generic.c
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o reshape_generic.lo `test -f 'intrinsics/reshape_generic.c' || echo '$(srcdir)/'`intrinsics/reshape_generic.c
@@ -1285,9 +1328,15 @@ reshape_packed.lo: intrinsics/reshape_packed.c
stat.lo: intrinsics/stat.c
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stat.lo `test -f 'intrinsics/stat.c' || echo '$(srcdir)/'`intrinsics/stat.c
+symlnk.lo: intrinsics/symlnk.c
+ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o symlnk.lo `test -f 'intrinsics/symlnk.c' || echo '$(srcdir)/'`intrinsics/symlnk.c
+
system_clock.lo: intrinsics/system_clock.c
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o system_clock.lo `test -f 'intrinsics/system_clock.c' || echo '$(srcdir)/'`intrinsics/system_clock.c
+time.lo: intrinsics/time.c
+ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o time.lo `test -f 'intrinsics/time.c' || echo '$(srcdir)/'`intrinsics/time.c
+
transpose_generic.lo: intrinsics/transpose_generic.c
$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o transpose_generic.lo `test -f 'intrinsics/transpose_generic.c' || echo '$(srcdir)/'`intrinsics/transpose_generic.c
@@ -1609,7 +1658,7 @@ distclean-tags:
distdir: $(DISTFILES)
$(am__remove_distdir)
mkdir $(distdir)
- $(mkdir_p) $(distdir)/.. $(distdir)/../config $(distdir)/m4
+ $(mkdir_p) $(distdir)/.. $(distdir)/m4
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
diff --git a/libgfortran/aclocal.m4 b/libgfortran/aclocal.m4
index 935e8039cfb..b67612a6257 100644
--- a/libgfortran/aclocal.m4
+++ b/libgfortran/aclocal.m4
@@ -1,4 +1,4 @@
-# generated automatically by aclocal 1.9.3 -*- Autoconf -*-
+# generated automatically by aclocal 1.9.4 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
# Free Software Foundation, Inc.
@@ -40,7 +40,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
# Call AM_AUTOMAKE_VERSION so it can be traced.
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.9.3])])
+ [AM_AUTOMAKE_VERSION([1.9.4])])
# AM_AUX_DIR_EXPAND
@@ -817,5 +817,4 @@ AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
-m4_include([../config/no-executables.m4])
m4_include([acinclude.m4])
diff --git a/libgfortran/config.h.in b/libgfortran/config.h.in
index b858c4ef01b..5c545497ba8 100644
--- a/libgfortran/config.h.in
+++ b/libgfortran/config.h.in
@@ -27,6 +27,9 @@
/* libm includes ceilf */
#undef HAVE_CEILF
+/* Define to 1 if you have the `chdir' function. */
+#undef HAVE_CHDIR
+
/* complex.h exists */
#undef HAVE_COMPLEX_H
@@ -69,6 +72,12 @@
/* libc includes getgid */
#undef HAVE_GETGID
+/* Define to 1 if you have the `gethostname' function. */
+#undef HAVE_GETHOSTNAME
+
+/* Define to 1 if you have the `getlogin' function. */
+#undef HAVE_GETLOGIN
+
/* Define to 1 if you have the `getpagesize' function. */
#undef HAVE_GETPAGESIZE
@@ -111,6 +120,12 @@
/* libm includes jnf */
#undef HAVE_JNF
+/* Define to 1 if you have the `kill' function. */
+#undef HAVE_KILL
+
+/* Define to 1 if you have the `link' function. */
+#undef HAVE_LINK
+
/* libm includes log10f */
#undef HAVE_LOG10F
@@ -135,6 +150,9 @@
/* libm includes nextafterf */
#undef HAVE_NEXTAFTERF
+/* Define to 1 if you have the `perror' function. */
+#undef HAVE_PERROR
+
/* libm includes powf */
#undef HAVE_POWF
@@ -147,12 +165,18 @@
/* libm includes scalbnf */
#undef HAVE_SCALBNF
+/* Define to 1 if you have the <signal.h> header file. */
+#undef HAVE_SIGNAL_H
+
/* libm includes sinf */
#undef HAVE_SINF
/* libm includes sinhf */
#undef HAVE_SINHF
+/* Define to 1 if you have the `sleep' function. */
+#undef HAVE_SLEEP
+
/* Define to 1 if you have the `snprintf' function. */
#undef HAVE_SNPRINTF
@@ -171,6 +195,9 @@
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
+/* Define to 1 if you have the `strerror' function. */
+#undef HAVE_STRERROR
+
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
@@ -189,6 +216,9 @@
/* Define to 1 if `st_rdev' is member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_RDEV
+/* Define to 1 if you have the `symlink' function. */
+#undef HAVE_SYMLINK
+
/* Define to 1 if you have the <sys/mman.h> header file. */
#undef HAVE_SYS_MMAN_H
@@ -216,6 +246,9 @@
/* libm includes tanhf */
#undef HAVE_TANHF
+/* Define to 1 if you have the `time' function. */
+#undef HAVE_TIME
+
/* Define to 1 if you have the `times' function. */
#undef HAVE_TIMES
diff --git a/libgfortran/configure b/libgfortran/configure
index a02f84a7b4c..9d2d03223d7 100755
--- a/libgfortran/configure
+++ b/libgfortran/configure
@@ -970,7 +970,7 @@ esac
else
echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
fi
- cd $ac_popdir
+ cd "$ac_popdir"
done
fi
@@ -1957,7 +1957,7 @@ fi
# suite is included, we'll have to know.
if test "$build" != "$host"; then
LIBGFOR_IS_NATIVE=false
-
+ GCC_NO_EXECUTABLES
else
LIBGFOR_IS_NATIVE=true
fi
@@ -2350,39 +2350,6 @@ main ()
return 0;
}
_ACEOF
-# FIXME: Cleanup?
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- gcc_no_link=no
-else
- gcc_no_link=yes
-fi
-
-if test x$gcc_no_link = xyes; then
- # Setting cross_compile will disable run tests; it will
- # also disable AC_CHECK_FILE but that's generally
- # correct if we can't link.
- cross_compiling=yes
- EXEEXT=
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files a.out a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
@@ -2519,7 +2486,6 @@ echo "${ECHO_T}$ac_cv_exeext" >&6
rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
-fi
echo "$as_me:$LINENO: checking for suffix of object files" >&5
echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
if test "${ac_cv_objext+set}" = set; then
@@ -2602,8 +2568,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -2661,8 +2626,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -2778,8 +2742,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -2833,8 +2796,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -2879,8 +2841,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -2924,8 +2885,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -4059,7 +4019,7 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
case $host in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 4062 "configure"' > conftest.$ac_ext
+ echo '#line 4022 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -4177,12 +4137,7 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -4206,8 +4161,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -4450,7 +4404,7 @@ fi
# Provide some information about the compiler.
-echo "$as_me:4453:" \
+echo "$as_me:4407:" \
"checking for Fortran compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
@@ -4496,8 +4450,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_fc_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_fc_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -4546,8 +4499,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_fc_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_fc_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -4645,8 +4597,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -4675,8 +4626,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -4746,8 +4696,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -4799,8 +4748,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -4871,8 +4819,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -4924,8 +4871,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -4959,13 +4905,7 @@ fi
rm -f conftest*
fi
-if test x$gcc_no_link = xyes; then
- if test "x${ac_cv_func_mmap_fixed_mapped+set}" != xset; then
- ac_cv_func_mmap_fixed_mapped=no
- fi
-fi
-if test "x${ac_cv_func_mmap_fixed_mapped+set}" != xset; then
- ac_ext=c
+ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
@@ -5248,8 +5188,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5419,8 +5358,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5488,8 +5426,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5613,12 +5550,7 @@ echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -5678,8 +5610,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5886,7 +5817,6 @@ _ACEOF
fi
rm -f conftest.mmap
-fi
echo "$as_me:$LINENO: checking for off_t" >&5
echo $ECHO_N "checking for off_t... $ECHO_C" >&6
if test "${ac_cv_type_off_t+set}" = set; then
@@ -5919,8 +5849,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5988,8 +5917,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -6127,7 +6055,8 @@ fi
-for ac_header in stdlib.h stdio.h string.h stddef.h math.h unistd.h
+
+for ac_header in stdlib.h stdio.h string.h stddef.h math.h unistd.h signal.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
@@ -6160,8 +6089,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -6314,8 +6242,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -6467,8 +6394,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -6613,8 +6539,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -6761,8 +6686,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -6805,8 +6729,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -6871,8 +6794,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -6915,8 +6837,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -6981,8 +6902,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -7025,8 +6945,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -7069,11 +6988,6 @@ if test "${ac_cv_lib_m_csin+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -7105,8 +7019,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -7152,12 +7065,115 @@ echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
fi
-cat >conftest.$ac_ext <<_ACEOF
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+
+
+
+
+
+
+for ac_func in chdir strerror getlogin gethostname kill link symlink perror
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -7217,8 +7233,109 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+for ac_func in sleep time
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -7259,11 +7376,6 @@ if test "${ac_cv_lib_c_getgid+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lc $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -7295,8 +7407,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -7336,11 +7447,6 @@ if test "${ac_cv_lib_c_getpid+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lc $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -7372,8 +7478,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -7413,11 +7518,6 @@ if test "${ac_cv_lib_c_getuid+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lc $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -7449,8 +7549,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -7493,11 +7592,6 @@ if test "${ac_cv_lib_m_acosf+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -7529,8 +7623,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -7570,11 +7663,6 @@ if test "${ac_cv_lib_m_asinf+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -7606,8 +7694,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -7647,11 +7734,6 @@ if test "${ac_cv_lib_m_atan2f+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -7683,8 +7765,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -7724,11 +7805,6 @@ if test "${ac_cv_lib_m_atanf+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -7760,8 +7836,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -7801,11 +7876,6 @@ if test "${ac_cv_lib_m_ceilf+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -7837,8 +7907,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -7878,11 +7947,6 @@ if test "${ac_cv_lib_m_copysignf+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -7914,8 +7978,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -7955,11 +8018,6 @@ if test "${ac_cv_lib_m_cosf+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -7991,8 +8049,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -8032,11 +8089,6 @@ if test "${ac_cv_lib_m_coshf+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -8068,8 +8120,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -8109,11 +8160,6 @@ if test "${ac_cv_lib_m_expf+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -8145,8 +8191,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -8186,11 +8231,6 @@ if test "${ac_cv_lib_m_fabsf+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -8222,8 +8262,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -8263,11 +8302,6 @@ if test "${ac_cv_lib_m_floorf+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -8299,8 +8333,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -8340,11 +8373,6 @@ if test "${ac_cv_lib_m_frexpf+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -8376,8 +8404,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -8417,11 +8444,6 @@ if test "${ac_cv_lib_m_hypotf+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -8453,8 +8475,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -8494,11 +8515,6 @@ if test "${ac_cv_lib_m_logf+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -8530,8 +8546,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -8571,11 +8586,6 @@ if test "${ac_cv_lib_m_log10f+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -8607,8 +8617,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -8648,11 +8657,6 @@ if test "${ac_cv_lib_m_nextafter+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -8684,8 +8688,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -8725,11 +8728,6 @@ if test "${ac_cv_lib_m_nextafterf+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -8761,8 +8759,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -8802,11 +8799,6 @@ if test "${ac_cv_lib_m_powf+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -8838,8 +8830,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -8879,11 +8870,6 @@ if test "${ac_cv_lib_m_round+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -8915,8 +8901,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -8956,11 +8941,6 @@ if test "${ac_cv_lib_m_roundf+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -8992,8 +8972,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -9033,11 +9012,6 @@ if test "${ac_cv_lib_m_scalbnf+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -9069,8 +9043,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -9110,11 +9083,6 @@ if test "${ac_cv_lib_m_sinf+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -9146,8 +9114,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -9187,11 +9154,6 @@ if test "${ac_cv_lib_m_sinhf+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -9223,8 +9185,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -9264,11 +9225,6 @@ if test "${ac_cv_lib_m_sqrtf+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -9300,8 +9256,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -9341,11 +9296,6 @@ if test "${ac_cv_lib_m_tanf+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -9377,8 +9327,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -9418,11 +9367,6 @@ if test "${ac_cv_lib_m_tanhf+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -9454,8 +9398,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -9495,11 +9438,6 @@ if test "${ac_cv_lib_m_erf+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -9531,8 +9469,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -9572,11 +9509,6 @@ if test "${ac_cv_lib_m_erfc+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -9608,8 +9540,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -9649,11 +9580,6 @@ if test "${ac_cv_lib_m_erfcf+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -9685,8 +9611,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -9726,11 +9651,6 @@ if test "${ac_cv_lib_m_erff+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -9762,8 +9682,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -9803,11 +9722,6 @@ if test "${ac_cv_lib_m_j0+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -9839,8 +9753,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -9880,11 +9793,6 @@ if test "${ac_cv_lib_m_j0f+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -9916,8 +9824,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -9957,11 +9864,6 @@ if test "${ac_cv_lib_m_j1+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -9993,8 +9895,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -10034,11 +9935,6 @@ if test "${ac_cv_lib_m_j1f+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -10070,8 +9966,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -10111,11 +10006,6 @@ if test "${ac_cv_lib_m_jn+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -10147,8 +10037,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -10188,11 +10077,6 @@ if test "${ac_cv_lib_m_jnf+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -10224,8 +10108,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -10265,11 +10148,6 @@ if test "${ac_cv_lib_m_y0+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -10301,8 +10179,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -10342,11 +10219,6 @@ if test "${ac_cv_lib_m_y0f+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -10378,8 +10250,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -10419,11 +10290,6 @@ if test "${ac_cv_lib_m_y1+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -10455,8 +10321,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -10496,11 +10361,6 @@ if test "${ac_cv_lib_m_y1f+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -10532,8 +10392,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -10573,11 +10432,6 @@ if test "${ac_cv_lib_m_yn+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -10609,8 +10463,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -10650,11 +10503,6 @@ if test "${ac_cv_lib_m_ynf+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -10686,8 +10534,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -10729,11 +10576,6 @@ if test "${ac_cv_lib_m_finite+set}" = set; then
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -10765,8 +10607,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -10851,8 +10692,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -10893,12 +10733,7 @@ echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -10958,8 +10793,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -11021,8 +10855,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -11112,12 +10945,7 @@ echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C"
if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -11160,8 +10988,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -11205,12 +11032,7 @@ else
save_CFLAGS="$CFLAGS"
CFLAGS="-O2"
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -11239,8 +11061,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -11308,8 +11129,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -11373,8 +11193,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -11412,12 +11231,7 @@ if test "${have_attribute_alias+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -11446,8 +11260,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -12414,11 +12227,6 @@ esac
*) ac_INSTALL=$ac_top_builddir$INSTALL ;;
esac
- if test x"$ac_file" != x-; then
- { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
- rm -f "$ac_file"
- fi
# Let's still pretend it is `configure' which instantiates (i.e., don't
# use $as_me), people would be surprised to read:
# /* config.h. Generated by config.status. */
@@ -12457,6 +12265,12 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
fi;;
esac
done` || { (exit 1); exit 1; }
+
+ if test x"$ac_file" != x-; then
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
sed "$ac_vpsub
diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac
index eb5e32ad98a..e9fea87d1fc 100644
--- a/libgfortran/configure.ac
+++ b/libgfortran/configure.ac
@@ -144,7 +144,7 @@ AC_TYPE_OFF_T
# check header files
AC_STDC_HEADERS
-AC_HAVE_HEADERS(stdlib.h stdio.h string.h stddef.h math.h unistd.h)
+AC_HAVE_HEADERS(stdlib.h stdio.h string.h stddef.h math.h unistd.h signal.h)
AC_CHECK_HEADERS(time.h sys/params.h sys/time.h sys/times.h sys/resource.h)
AC_CHECK_HEADERS(sys/mman.h sys/types.h sys/stat.h ieeefp.h)
AC_CHECK_HEADER([complex.h],[AC_DEFINE([HAVE_COMPLEX_H], [1], [complex.h exists])])
@@ -158,6 +158,8 @@ AC_CHECK_LIB([m],[csin],[need_math="no"],[need_math="yes"])
# Check for library functions.
AC_CHECK_FUNCS(getrusage times mkstemp strtof snprintf)
+AC_CHECK_FUNCS(chdir strerror getlogin gethostname kill link symlink perror)
+AC_CHECK_FUNCS(sleep time)
# Check libc for getgid, getpid, getuid
AC_CHECK_LIB([c],[getgid],[AC_DEFINE([HAVE_GETGID],[1],[libc includes getgid])])
diff --git a/libgfortran/io/format.c b/libgfortran/io/format.c
index db5e0fe7372..f8d858af7a7 100644
--- a/libgfortran/io/format.c
+++ b/libgfortran/io/format.c
@@ -564,6 +564,7 @@ parse_format_list (void)
case FMT_COLON:
get_fnode (&head, &tail, FMT_COLON);
+ tail->repeat = 1;
goto optional_comma;
case FMT_SLASH:
diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c
index 74a6688b014..384df36f6c4 100644
--- a/libgfortran/io/list_read.c
+++ b/libgfortran/io/list_read.c
@@ -66,12 +66,13 @@ static char value[20];
#define CASE_DIGITS case '0': case '1': case '2': case '3': case '4': \
case '5': case '6': case '7': case '8': case '9'
-#define CASE_SEPARATORS case ' ': case ',': case '/': case '\n': case '\t'
+#define CASE_SEPARATORS case ' ': case ',': case '/': case '\n': case '\t': \
+ case '\r'
/* This macro assumes that we're operating on a variable. */
#define is_separator(c) (c == '/' || c == ',' || c == '\n' || c == ' ' \
- || c == '\t')
+ || c == '\t' || c == '\r')
/* Maximum repeat count. Less than ten times the maximum signed int32. */
@@ -163,7 +164,7 @@ next_char (void)
c = *p;
done:
- at_eol = (c == '\n');
+ at_eol = (c == '\n' || c == '\r');
return c;
}
@@ -230,6 +231,7 @@ eat_separator (void)
break;
case '\n':
+ case '\r':
break;
case '!':
@@ -284,6 +286,7 @@ finish_separator (void)
break;
case '\n':
+ case '\r':
goto restart;
case '!':
@@ -1052,6 +1055,8 @@ read_real (int length)
goto got_repeat;
CASE_SEPARATORS:
+ if (c != '\n' && c != ',' && c != '\r')
+ unget_char (c);
goto done;
default:
@@ -1483,6 +1488,7 @@ namelist_read (void)
return;
case ' ':
case '\n':
+ case '\r':
case '\t':
break;
case ',':
diff --git a/libgfortran/io/open.c b/libgfortran/io/open.c
index 3d0e5bebe7a..82a862b7c47 100644
--- a/libgfortran/io/open.c
+++ b/libgfortran/io/open.c
@@ -481,7 +481,10 @@ st_open (void)
flags.position = POSITION_ASIS;
if (ioparm.library_return != LIBRARY_OK)
+ {
+ library_end ();
return;
+ }
u = find_unit (ioparm.unit);
diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c
index 0e4c619dc98..aed0aa90dbc 100644
--- a/libgfortran/io/transfer.c
+++ b/libgfortran/io/transfer.c
@@ -177,7 +177,7 @@ read_sf (int *length)
return NULL;
}
- if (readlen < 1 || *q == '\n')
+ if (readlen < 1 || *q == '\n' || *q == '\r')
{
/* ??? What is this for? */
if (current_unit->unit_number == options.stdin_unit)
diff --git a/libgfortran/io/write.c b/libgfortran/io/write.c
index 88e5280b338..556adea268b 100644
--- a/libgfortran/io/write.c
+++ b/libgfortran/io/write.c
@@ -537,7 +537,7 @@ output_float (fnode *f, double value, int len)
/* Pick a field size if none was specified. */
if (w <= 0)
- w = nbefore + nzero + nafter + 2;
+ w = nbefore + nzero + nafter + (sign != SIGN_NONE ? 2 : 1);
/* Create the ouput buffer. */
out = write_block (w);
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 0ab2ec9abf9..412a4aaa5d8 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,302 @@
+2005-03-28 Ian Lance Taylor <ian@airs.com>
+
+ * pex-common.c: New file.
+ * pex-one.c: New file.
+ * pexecute.c: New file.
+ * pex-common.h: Include <stdio.h>.
+ (struct pex_obj): Define.
+ (struct pex_funcs): Define.
+ (pex_init_common): Declare.
+ * pex-unix.c: Rewrite.
+ * pex-win32.c: Rewrite.
+ * pex-djgpp.c: Rewrite.
+ * pex-msdos.c: Rewrite.
+ * testsuite/text-pexecute.c: New file.
+ * pexecute.txh: Rewrite.
+ * configure.ac: Check for wait3 and wait4. Set CHECK to
+ really-check rather than check-cplus-dem.
+ * functions.texi: Rebuild.
+ * Makefile.in: Rebuild dependencies.
+ (CFILES): Add pexecute.c, pex-common.c, pex-one.c.
+ (REQUIRED_OFILES): Add pexecute.o, pex-common.o, pex-one.o.
+ * testsuite/Makefile.in (really-check): New target.
+ (check-pexecute, test-pexecute): New targets.
+ * configure: Rebuild.
+
+2005-03-28 Mark Kettenis <kettenis@gnu.org>
+
+ * unlink-if-ordinary.c: Include <sys/types.h>.
+
+2005-03-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ Convert libiberty to use ISO C prototype style 7/n.
+ * regex.c (PARAMS): Remove definition.
+ (PREFIX): Unconditionaly define using ISO C ## operator.
+ (init_syntax_once, extract_number, extract_number_and_incr,
+ print_fastmap, print_partial_compiled_pattern,
+ print_compiled_pattern, print_double_string, printchar,
+ convert_mbs_to_wcs, re_set_syntax, regex_grow_registers,
+ regex_compile, store_op1, store_op2, insert_op1, insert_op2,
+ at_begline_loc_p, at_endline_p, group_in_compile_stack,
+ insert_space, wcs_compile_range, byte_compile_range,
+ truncate_wchar, re_compile_fastmap, re_compile_fastmap,
+ re_set_registers, re_search, re_search_2, re_search_3, re_match,
+ re_match_2, count_mbs_length, wcs_re_match_2_internal,
+ byte_re_match_2_internal, group_match_null_string_p,
+ alt_match_null_string_p, common_op_match_null_string_p,
+ bcmp_translate, re_compile_pattern, re_comp, re_exec, regcomp,
+ regexec, regerror, regfree): Use ISO C prototype style.
+ * partition.c: (elem_compare): Likewise.
+ * cp-demangle.c (print_usage): Likewise.
+
+2005-03-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ Convert libiberty to use ISO C prototype style 5/n.
+ * random.c (srandom, initstate, setstate, random): Use ISO C
+ prototypes.
+ * putenv.c (putenv): Likewise.
+ * physmem.c (physmem_available, physmem_total, main): Likewise.
+ * pex-win32.c (fix_argv, pexecute, pwait): Likewise.
+ * pex-unix.c (pexecute, pwait): Likewise.
+ * pex-msdos.c (pexecute, pwait): Likewise.
+ * pex-djgpp.c (pexecute, pwait): Likewise.
+ * partition.c (partition_new, partition_delete, partition_union)
+ (elem_compare, partition_print): Likewise.
+ * obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
+ _obstack_allocated_p, _obstack_free, obstack_free,
+ _obstack_memory_used, print_and_abort, obstack_next_free,
+ obstack_object_size, obstack_base): Likewise. Remove codes
+ predicated on !defined(__STDC__).
+ * objalloc.c (objalloc_create, _objalloc_alloc, objalloc_free,
+ objalloc_free_block): Use ISO C prototypes.
+ * mkstemps.c (mkstemps): Likewise.
+ * memset.c (memset): Likewise.
+ * mempcpy.c (mempcpy): Likewise.
+ * rename.c (rename): Likewise.
+ * rindex.c (rindex): Likewise.
+ * setenv.c (setenv, unsetenv): Likewise.
+ * sigsetmask.c (sigsetmask): Likewise.
+ * snprintf.c (snprintf): Likewise.
+ * sort.c (sort_pointers, xmalloc): Likewise.
+ * spaces.c (spaces): Likewise.
+ * splay-tree.c (splay_tree_delete_helper,
+ splay_tree_splay_helper, splay_tree_splay,
+ splay_tree_foreach_helper, splay_tree_xmalloc_allocate,
+ splay_tree_new, splay_tree_xmalloc_allocate,
+ splay_tree_new_with_allocator, splay_tree_delete,
+ splay_tree_insert, splay_tree_remove, splay_tree_lookup,
+ splay_tree_max, splay_tree_min, splay_tree_predecessor,
+ splay_tree_successor, splay_tree_foreach,
+ splay_tree_compare_ints, splay_tree_compare_pointers): Likewise.
+ * stpcpy.c (stpcpy): Likewise.
+ * stpncpy.c (stpncpy): Likewise.
+ * strcasecmp.c (strcasecmp): Likewise.
+ * strchr.c (strchr): Likewise.
+ * strdup.c (strdup): Likewise.
+
+2005-03-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ Convert libiberty to use ISO C prototype style 6/n.
+ * strerror.c (init_error_tables, errno_max, strerror, strerrno,
+ strtoerrno, main): Use ISO C prototype style.
+ * strncasecmp.c (strncasecmp): Likewise.
+ * strncmp.c (strncmp): Likewise.
+ * strndup.c (strndup): Likewise.
+ * strrchr.c (strrchr): Likewise.
+ * strsignal.c (init_signal_tables, signo_max, strsignal,
+ strsigno, strtosigno, psignal, main): Likewise.
+ * strstr.c (strstr): Likewise.
+ * strtod.c (strtod, atof): Likewise.
+ * strtol.c (strtol): Likewise.
+ * strtoul.c (strtoul): Likewise.
+ * ternary.c (ternary_insert, ternary_cleanup, ternary_search,
+ ternary_recursivesearch): Likewise.
+ * tmpnam.c (tmpnam): Likewise.
+ * unlink-if-ordinary.c (unlink_if_ordinary): Likewise.
+ * vasprintf.c (int_vasprintf, vasprintf, checkit, main): Likewise.
+ * vfork.c (vfork): Likewise.
+ * vfprintf.c (vfprintf): Likewise.
+ * vprintf.c (vprintf): Likewise.
+ * vsnprintf.c (vsnprintf, checkit, main): Likewise.
+ * vsprintf.c (vsprintf): Likewise.
+ * waitpid.c (waitpid): Likewise.
+ * xatexit.c (xatexit, xatexit_cleanup): Likewise.
+ * xexit.c (xexit): Likewise.
+ * xmalloc.c (xmalloc_set_program_name, xmalloc_failed, xmalloc,
+ xcalloc, xrealloc): Likewise.
+ * xmemdup.c (xmemdup): Likewise.
+ * xstrdup.c (xstrdup): Likewise.
+ * xstrerror.c (xstrerror): Likewise.
+ * xstrndup.c (xstrndup): Likewise.
+
+2005-03-27 Andreas Jaeger <aj@suse.de>
+
+ * configure.ac (ac_c_preproc_warn_flag): Remove -Wtraditional
+ flags.
+ * configure: Regenerated.
+
+2005-03-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ * getopt1.c (getopt_long_only): Fix thinko.
+
+2005-03-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ Convert libiberty to use ISO C prototype style 4/n.
+ * hashtab.c (higher_prime_index, hash_pointer, eq_pointer,
+ htab_size, htab_elements, htab_mod_1, htab_mod, htab_mod_m2,
+ htab_create_alloc, htab_set_functions_ex, htab_create,
+ htab_try_create, htab_delete, htab_empty,
+ find_empty_slot_for_expand, htab_expand, htab_find_with_hash,
+ htab_find, htab_find_slot_with_hash, htab_find_slot,
+ htab_remove_elt, htab_remove_elt_with_hash, htab_clear_slot,
+ htab_traverse_noresize, htab_traverse, htab_collisions,
+ htab_hash_string, iterative_hash): Use ISO C prototype.
+ * hex.c (hex_init): Likewise.
+ * index.c (index): Likewise.
+ * insque.c (insque, remque): Likewise.
+ * lbasename.c (lbasename): Likewise.
+ * lrealpath.c (lrealpath): Likewise.
+ * make-relative-prefix.c (save_string, split_directories,
+ free_split_directories, make_relative_prefix): Likewise.
+ * make-temp-file.c (try, choose_tmpdir, make_temp_file): Likewise.
+ * md5.c (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
+ md5_buffer, md5_process_bytes, md5_process_block): Likewise.
+ * memchr.c (memchr): Likewise.
+ * memcpy.c (memcpy): Likewise.
+ * memmove.c (memmove): Likewise.
+ * gettimeofday.c (gettimeofday): Likewise.
+ * getruntime.c (get_run_time): Likewise.
+ * getpwd.c (getpwd, getpwd): Likewise.
+ * getpagesize.c (getpagesize): Likewise.
+ * getopt1.c (getopt_long, getopt_long_only, main): Likewise.
+ * getopt.c (my_index, exchange, _getopt_initialize,
+ _getopt_internal, getopt, main): Likewise.
+ * getcwd.c (getcwd): Likewise.
+ * fnmatch.c (fnmatch): Likewise.
+ * floatformat.c (floatformat_always_valid,
+ floatformat_i387_ext_is_valid, get_field, floatformat_to_double,
+ put_field, floatformat_from_double, floatformat_is_valid,
+ ieee_test, main): Likewise.
+ * fibheap.c (fibheap_new, fibnode_new, fibheap_compare,
+ fibheap_comp_data, fibheap_insert, fibheap_min, fibheap_min_key,
+ fibheap_union, fibheap_extract_min, fibheap_replace_key_data,
+ fibheap_replace_key, fibheap_replace_data, fibheap_delete_node,
+ fibheap_delete, fibheap_empty, fibheap_extr_min_node,
+ fibheap_ins_root, fibheap_rem_root, fibheap_consolidate,
+ fibheap_link, fibheap_cut, fibheap_cascading_cut,
+ fibnode_insert_after, fibnode_remove): Likewise.
+ * ffs.c (ffs): Likewise.
+ * fdmatch.c (fdmatch): Likewise.
+ * dyn-string.c (dyn_string_init, dyn_string_new,
+ dyn_string_delete, dyn_string_release, dyn_string_resize,
+ dyn_string_clear, dyn_string_copy, dyn_string_copy_cstr,
+ dyn_string_prepend, dyn_string_prepend_cstr, dyn_string_insert,
+ dyn_string_insert_cstr, dyn_string_insert_char,
+ dyn_string_append, dyn_string_append_cstr,
+ dyn_string_append_char, dyn_string_substring, dyn_string_eq):
+ Likewise.
+
+2005-03-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ Convert libiberty to use ISO C prototype style 3/n.
+ * cplus-dem.c (set_cplus_marker_for_demangling, consume_count,
+ consume_count_with_underscores, code_for_qualifier,
+ qualifier_string, demangle_qualifier, cplus_demangle_opname,
+ cplus_mangle_opname, cplus_demangle_set_style,
+ cplus_demangle_name_to_style, cplus_demangle, grow_vect,
+ ada_demangle, internal_cplus_demangle, squangle_mop_up,
+ work_stuff_copy_to_from, delete_non_B_K_work_stuff,
+ delete_work_stuff, mop_up, demangle_signature,
+ demangle_method_args, demangle_template_template_parm,
+ demangle_expression, demangle_integral_value,
+ demangle_real_value, demangle_template_value_parm,
+ demangle_template, arm_pt, demangle_arm_hp_template,
+ demangle_class_name, demangle_class, iterate_demangle_function,
+ demangle_prefix, gnu_special, recursively_demangle, arm_special,
+ demangle_qualified, get_count, do_type, demangle_fund_type,
+ do_hpacc_template_const_value, do_hpacc_template_literal,
+ snarf_numeric_literal, do_arg, remember_type, remember_Ktype,
+ register_Btype, remember_Btype, forget_B_and_K_types,
+ forget_types, demangle_args, demangle_nested_args,
+ demangle_function_name, string_need, string_delete, string_init,
+ string_clear, string_empty, string_append, string_appends,
+ string_appendn, string_prepend, string_prepends, string_prependn,
+ string_append_template_idx): Use ISO C prootype style.
+ * cp-demint.c (cplus_demangle_fill_component,
+ cplus_demangle_fill_builtin_type, cplus_demangle_fill_operator,
+ cplus_demangle_v3_components): Likewise.
+
+2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ Convert libiberty to use ISO C prototype style 2/n.
+ * cp-demangle.h: Remove uses of PARAMS.
+ * cp-demangle.c: Likewise.
+ (d_dump, cplus_demangle_fill_name,
+ cplus_demangle_fill_extended_operator, cplus_demangle_fill_ctor,
+ cplus_demangle_fill_dtor, d_make_empty, d_make_comp, d_make_name,
+ d_make_builtin_type, d_make_operator, d_make_extended_operator,
+ d_make_ctor, d_make_dtor, d_make_template_param, d_make_sub,
+ cplus_demangle_mangled_name, has_return_type,
+ is_ctor_dtor_or_conversion, d_encoding, d_name, d_nested_name,
+ d_prefix, d_unqualified_name, d_source_name, d_number,
+ d_identifier, d_operator_name, d_special_name, d_call_offset,
+ d_ctor_dtor_name, cplus_demangle_type, d_cv_qualifiers,
+ d_function_type, d_bare_function_type, d_class_enum_type,
+ d_array_type, d_pointer_to_member_type, d_template_param,
+ d_template_args, d_template_arg, d_expression, d_expr_primary,
+ d_local_name, d_discriminator, d_add_substitution,
+ d_substitution, d_print_resize, d_print_append_char,
+ d_print_append_buffer, d_print_error, cplus_demangle_print,
+ d_print_comp, d_print_java_identifier, d_print_mod_list,
+ d_print_mod, d_print_function_type, d_print_array_type,
+ d_print_expr_op, d_print_cast, cplus_demangle_init_info,
+ d_demangle, __cxa_demangle, cplus_demangle_v3, java_demangle_v3,
+ is_ctor_or_dtor, is_gnu_v3_mangled_ctor, is_gnu_v3_mangled_dtor,
+ print_usage, main):
+
+2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ Convert libiberty to ISO C prototype style 1/n.
+ * _doprnt.c: Remove conditional #include <varargs.h> on
+ ANSI_PROTOTYPES as the latter is always assumed.
+ (_doprnt, checkit, main): Use ISO C prototype.
+ * alloca.c (find_stack_direction, C_alloca): Use ISO C prototype.
+ * argv.c: Remove conditional #includes on ANSI_PROTOTYPES.
+ (dupargv, freeargv, buildargv, main): Use ISO C prototype.
+ * atexit.c (atexit): Likewise
+ * asprintf.c: Remove conditional include on ANSI_PROTOTYPES.
+ (asprintf): Use ISO C prototype.
+ * basename.c (basename): Likewise
+ * bcmp.c (bcmp): Likewise.
+ * bcopy.c (bcopy): Likewise.
+ * bzero.c (bzero): Likewise.
+ * bsearch.c (bsearch): Likewise. Improve const-correctness.
+ * choose-temp.c (choose_temp_base): Likewise.
+ * calloc.c: Remove conditional #include on ANSI_PROTOTYPES.
+ (calloc): Use ISO C prototype.
+ * clock.c (clock): Likewise.
+ * concat.c: Remove conditional #include on ANSI_PROTOTYPES.
+ (vconcat_length, vconcat_copy, concat_length, concat_copy,
+ concat_copy2, concat, reconcat, main): Use ISO C prototype.
+ * copysign.c (copysign): Likewise.
+
+2005-03-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * Makefile.in (CFILES): Add strndup.c and xstrndup.c.
+ (REQUIRED_OFILES): Add xstrndup.o.
+ (CONFIGURED_OFILES): Add strndup.o.
+ Regenerate dependencies.
+
+ * configure.ac (funcs, AC_CHECK_FUNCS): Add strndup.
+
+ * strndup.c, xstrndup.c: New.
+
+ * config.in, configure, functions.texi: Regenerate.
+
+2005-03-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * xmemdup.c, xstrdup.c: Expose the tail call.
+
2005-03-09 Mark Mitchell <mark@codesourcery.com>
* configure.ac (funcs): Add gettimeofday.
@@ -53,7 +352,7 @@
* hex.c (hex_value): Group 'unsigned int' together to get correct
markup.
* functions.texi: Regenerated.
-
+
2004-12-27 H.J. Lu <hongjiu.lu@intel.com>
* Makefile.in: Undo to 2004-12-17.
@@ -166,15 +465,15 @@
* vasprintf.c: Accept __va_copy in addition to va_copy.
-2004-09-03 Paolo Bonzini <bonzini@gnu.org>
+2004-09-03 Paolo Bonzini <bonzini@gnu.org>
* configure: Regenerate.
-2004-09-02 Paolo Bonzini <bonzini@gnu.org>
+2004-09-02 Paolo Bonzini <bonzini@gnu.org>
* configure.ac: Do not enable multilibs for build-side libiberty.
-2004-06-29 Danny Smith <dannysmith@users.sourceforge.net>
+2004-06-29 Danny Smith <dannysmith@users.sourceforge.net>
* lrealpath.c (lrealpath): Add _WIN32 support.
diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
index 3cbde17bcd1..78957ee4662 100644
--- a/libiberty/Makefile.in
+++ b/libiberty/Makefile.in
@@ -142,20 +142,21 @@ CFILES = alloca.c argv.c asprintf.c atexit.c \
make-temp-file.c md5.c memchr.c memcmp.c memcpy.c memmove.c \
mempcpy.c memset.c mkstemps.c \
objalloc.c obstack.c \
- partition.c \
- pex-djgpp.c pex-msdos.c \
+ partition.c pexecute.c \
+ pex-common.c pex-djgpp.c pex-msdos.c pex-one.c \
pex-unix.c pex-win32.c \
physmem.c putenv.c \
random.c regex.c rename.c rindex.c \
safe-ctype.c setenv.c sigsetmask.c snprintf.c sort.c spaces.c \
splay-tree.c stpcpy.c stpncpy.c strcasecmp.c strchr.c strdup.c \
strerror.c strncasecmp.c strncmp.c strrchr.c strsignal.c \
- strstr.c strtod.c strtol.c strtoul.c \
+ strstr.c strtod.c strtol.c strtoul.c strndup.c \
ternary.c tmpnam.c \
unlink-if-ordinary.c \
vasprintf.c vfork.c vfprintf.c vprintf.c vsnprintf.c vsprintf.c \
waitpid.c \
- xatexit.c xexit.c xmalloc.c xmemdup.c xstrdup.c xstrerror.c
+ xatexit.c xexit.c xmalloc.c xmemdup.c xstrdup.c xstrerror.c \
+ xstrndup.c
# These are always included in the library. The first four are listed
# first and by compile time to optimize parallel builds.
@@ -169,13 +170,14 @@ REQUIRED_OFILES = ./regex.o ./cplus-dem.o ./cp-demangle.o ./md5.o \
./lbasename.o ./lrealpath.o \
./make-relative-prefix.o ./make-temp-file.o \
./objalloc.o ./obstack.o \
- ./partition.o ./physmem.o @pexecute@ \
+ ./partition.o ./pexecute.o ./physmem.o \
+ ./pex-common.o ./pex-one.o @pexecute@ \
./safe-ctype.o ./sort.o ./spaces.o ./splay-tree.o ./strerror.o \
./strsignal.o \
./ternary.o \
./unlink-if-ordinary.o \
./xatexit.o ./xexit.o ./xmalloc.o ./xmemdup.o ./xstrdup.o \
- ./xstrerror.o
+ ./xstrerror.o ./xstrndup.o
# These are all the objects that configure may add to the library via
# $funcs or EXTRA_OFILES. This list exists here only for "make
@@ -195,7 +197,7 @@ CONFIGURED_OFILES = ./asprintf.o ./atexit.o \
./random.o ./rename.o ./rindex.o \
./setenv.o ./sigsetmask.o ./snprintf.o ./stpcpy.o ./stpncpy.o \
./strcasecmp.o ./strchr.o ./strdup.o ./strncasecmp.o \
- ./strncmp.o ./strrchr.o ./strstr.o \
+ ./strncmp.o ./strndup.o ./strrchr.o ./strstr.o \
./strtod.o ./strtol.o ./strtoul.o \
./tmpnam.o \
./vasprintf.o ./vfork.o ./vfprintf.o ./vprintf.o ./vsnprintf.o \
@@ -755,6 +757,13 @@ $(CONFIGURED_OFILES): stamp-picdir
else true; fi
$(COMPILE.c) $(srcdir)/partition.c $(OUTPUT_OPTION)
+./pex-common.o: $(srcdir)/pex-common.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h $(srcdir)/pex-common.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/pex-common.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/pex-common.c $(OUTPUT_OPTION)
+
./pex-djgpp.o: $(srcdir)/pex-djgpp.c config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/libiberty.h $(srcdir)/pex-common.h
if [ x"$(PICFLAG)" != x ]; then \
@@ -770,6 +779,13 @@ $(CONFIGURED_OFILES): stamp-picdir
else true; fi
$(COMPILE.c) $(srcdir)/pex-msdos.c $(OUTPUT_OPTION)
+./pex-one.o: $(srcdir)/pex-one.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/pex-one.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/pex-one.c $(OUTPUT_OPTION)
+
./pex-unix.o: $(srcdir)/pex-unix.c config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/libiberty.h $(srcdir)/pex-common.h
if [ x"$(PICFLAG)" != x ]; then \
@@ -784,6 +800,13 @@ $(CONFIGURED_OFILES): stamp-picdir
else true; fi
$(COMPILE.c) $(srcdir)/pex-win32.c $(OUTPUT_OPTION)
+./pexecute.o: $(srcdir)/pexecute.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/pexecute.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/pexecute.c $(OUTPUT_OPTION)
+
./physmem.o: $(srcdir)/physmem.c config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/libiberty.h
if [ x"$(PICFLAG)" != x ]; then \
@@ -916,6 +939,12 @@ $(CONFIGURED_OFILES): stamp-picdir
else true; fi
$(COMPILE.c) $(srcdir)/strncmp.c $(OUTPUT_OPTION)
+./strndup.o: $(srcdir)/strndup.c $(INCDIR)/ansidecl.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/strndup.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/strndup.c $(OUTPUT_OPTION)
+
./strrchr.o: $(srcdir)/strrchr.c $(INCDIR)/ansidecl.h
if [ x"$(PICFLAG)" != x ]; then \
$(COMPILE.c) $(PICFLAG) $(srcdir)/strrchr.c -o pic/$@; \
@@ -1058,3 +1087,10 @@ $(CONFIGURED_OFILES): stamp-picdir
else true; fi
$(COMPILE.c) $(srcdir)/xstrerror.c $(OUTPUT_OPTION)
+./xstrndup.o: $(srcdir)/xstrndup.c config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/xstrndup.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/xstrndup.c $(OUTPUT_OPTION)
+
diff --git a/libiberty/_doprnt.c b/libiberty/_doprnt.c
index 8ce14158c99..804b9397780 100644
--- a/libiberty/_doprnt.c
+++ b/libiberty/_doprnt.c
@@ -21,11 +21,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "safe-ctype.h"
#include <stdio.h>
-#ifdef ANSI_PROTOTYPES
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
@@ -79,10 +75,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
} while (0)
int
-_doprnt (format, ap, stream)
- const char * format;
- va_list ap;
- FILE * stream;
+_doprnt (const char *format, va_list ap, FILE *stream)
{
const char * ptr = format;
char specifier[128];
@@ -223,10 +216,10 @@ _doprnt (format, ap, stream)
fflush(stdin); \
} while (0)
-static int checkit PARAMS ((const char * format, ...)) ATTRIBUTE_PRINTF_1;
+static int checkit (const char * format, ...) ATTRIBUTE_PRINTF_1;
static int
-checkit VPARAMS ((const char* format, ...))
+checkit (const char* format, ...)
{
int result;
VA_OPEN (args, format);
@@ -239,7 +232,7 @@ checkit VPARAMS ((const char* format, ...))
}
int
-main ()
+main (void)
{
RESULT(checkit ("<%d>\n", 0x12345678));
RESULT(printf ("<%d>\n", 0x12345678));
diff --git a/libiberty/alloca.c b/libiberty/alloca.c
index 918235df465..866344429df 100644
--- a/libiberty/alloca.c
+++ b/libiberty/alloca.c
@@ -97,7 +97,7 @@ static int stack_dir; /* 1 or -1 once known. */
#define STACK_DIR stack_dir
static void
-find_stack_direction ()
+find_stack_direction (void)
{
static char *addr = NULL; /* Address of first `dummy', once known. */
auto char dummy; /* To get stack address. */
@@ -153,8 +153,7 @@ static header *last_alloca_header = NULL; /* -> last alloca header. */
/* @undocumented C_alloca */
PTR
-C_alloca (size)
- size_t size;
+C_alloca (size_t size)
{
auto char probe; /* Probes stack depth: */
register char *depth = ADDRESS_FUNCTION (probe);
diff --git a/libiberty/argv.c b/libiberty/argv.c
index 31d8ef55e26..76502058d3e 100644
--- a/libiberty/argv.c
+++ b/libiberty/argv.c
@@ -29,26 +29,10 @@ Boston, MA 02111-1307, USA. */
/* Routines imported from standard C runtime libraries. */
-#ifdef ANSI_PROTOTYPES
-
#include <stddef.h>
#include <string.h>
#include <stdlib.h>
-#else /* !ANSI_PROTOTYPES */
-
-#if !defined _WIN32 || defined __GNUC__
-extern char *memcpy (); /* Copy memory region */
-extern int strlen (); /* Count length of string */
-extern char *malloc (); /* Standard memory allocater */
-extern char *realloc (); /* Standard memory reallocator */
-extern void free (); /* Free malloc'd memory */
-extern char *strdup (); /* Duplicate a string */
-#endif
-
-#endif /* ANSI_PROTOTYPES */
-
-
#ifndef NULL
#define NULL 0
#endif
@@ -75,8 +59,7 @@ argument vector.
*/
char **
-dupargv (argv)
- char **argv;
+dupargv (char **argv)
{
int argc;
char **copy;
@@ -119,8 +102,7 @@ itself.
*/
-void freeargv (vector)
-char **vector;
+void freeargv (char **vector)
{
register char **scan;
@@ -174,8 +156,7 @@ returned, as appropriate.
*/
-char **buildargv (input)
- const char *input;
+char **buildargv (const char *input)
{
char *arg;
char *copybuf;
@@ -325,7 +306,8 @@ static const char *const tests[] =
NULL
};
-int main ()
+int
+main (void)
{
char **argv;
const char *const *test;
diff --git a/libiberty/asprintf.c b/libiberty/asprintf.c
index cd0543aa7ad..3ef067ffac7 100644
--- a/libiberty/asprintf.c
+++ b/libiberty/asprintf.c
@@ -22,11 +22,7 @@ Boston, MA 02111-1307, USA. */
#include "ansidecl.h"
#include "libiberty.h"
-#ifdef ANSI_PROTOTYPES
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
/*
@@ -45,7 +41,7 @@ not be allocated, minus one is returned and @code{NULL} is stored in
*/
int
-asprintf VPARAMS ((char **buf, const char *fmt, ...))
+asprintf (char **buf, const char *fmt, ...)
{
int status;
VA_OPEN (ap, fmt);
diff --git a/libiberty/atexit.c b/libiberty/atexit.c
index e14de29ab1d..e091f0139ee 100644
--- a/libiberty/atexit.c
+++ b/libiberty/atexit.c
@@ -16,8 +16,7 @@ Causes function @var{f} to be called at exit. Returns 0.
#ifdef HAVE_ON_EXIT
int
-atexit(f)
- void (*f)();
+atexit(void (*f)(void))
{
/* If the system doesn't provide a definition for atexit, use on_exit
if the system provides that. */
diff --git a/libiberty/basename.c b/libiberty/basename.c
index 69a982d7dca..037a9060145 100644
--- a/libiberty/basename.c
+++ b/libiberty/basename.c
@@ -37,8 +37,7 @@ Behavior is undefined if the pathname ends in a directory separator.
#endif /* DIR_SEPARATOR_2 */
char *
-basename (name)
- const char *name;
+basename (const char *name)
{
const char *base;
diff --git a/libiberty/bcmp.c b/libiberty/bcmp.c
index 1895773d52d..1bd28160f69 100644
--- a/libiberty/bcmp.c
+++ b/libiberty/bcmp.c
@@ -17,9 +17,7 @@ result mean @var{x} sorts before @var{y}).
int
-bcmp (from, to, count)
- char *from, *to;
- int count;
+bcmp (char *from, char *to, int count)
{
int rtnval = 0;
diff --git a/libiberty/bcopy.c b/libiberty/bcopy.c
index 70fa7e328cc..09442474645 100644
--- a/libiberty/bcopy.c
+++ b/libiberty/bcopy.c
@@ -10,9 +10,7 @@ Copies @var{length} bytes from memory region @var{in} to region
*/
void
-bcopy (src, dest, len)
- register char *src, *dest;
- int len;
+bcopy (register char *src, register char *dest, int len)
{
if (dest < src)
while (len--)
diff --git a/libiberty/bsearch.c b/libiberty/bsearch.c
index b3283f9285f..bb5555eff3c 100644
--- a/libiberty/bsearch.c
+++ b/libiberty/bsearch.c
@@ -67,16 +67,13 @@ is respectively less than, matching, or greater than the array member.
* look at item 3.
*/
void *
-bsearch(key, base0, nmemb, size, compar)
- register void *key;
- void *base0;
- size_t nmemb;
- register size_t size;
- register int (*compar)();
+bsearch (register const void *key, const void *base0,
+ size_t nmemb, register size_t size,
+ register int (*compar)(const void *, const void *))
{
- register char *base = base0;
+ register const char *base = (const char *) base0;
register int lim, cmp;
- register void *p;
+ register const void *p;
for (lim = nmemb; lim != 0; lim >>= 1) {
p = base + (lim >> 1) * size;
@@ -84,7 +81,7 @@ bsearch(key, base0, nmemb, size, compar)
if (cmp == 0)
return (p);
if (cmp > 0) { /* key > p: move right */
- base = (char *)p + size;
+ base = (const char *)p + size;
lim--;
} /* else move left */
}
diff --git a/libiberty/bzero.c b/libiberty/bzero.c
index 8874118698e..1f52d2d3098 100644
--- a/libiberty/bzero.c
+++ b/libiberty/bzero.c
@@ -14,9 +14,7 @@ is deprecated in favor of @code{memset}.
void
-bzero (to, count)
- char *to;
- int count;
+bzero (char *to, int count)
{
while (count-- > 0)
{
diff --git a/libiberty/calloc.c b/libiberty/calloc.c
index 50736823077..f4bd27b1cd2 100644
--- a/libiberty/calloc.c
+++ b/libiberty/calloc.c
@@ -13,19 +13,14 @@ Uses @code{malloc} to allocate storage for @var{nelem} objects of
*/
#include "ansidecl.h"
-#ifdef ANSI_PROTOTYPES
#include <stddef.h>
-#else
-#define size_t unsigned long
-#endif
/* For systems with larger pointers than ints, this must be declared. */
-PTR malloc PARAMS ((size_t));
-void bzero PARAMS ((PTR, size_t));
+PTR malloc (size_t);
+void bzero (PTR, size_t);
PTR
-calloc (nelem, elsize)
- size_t nelem, elsize;
+calloc (size_t nelem, size_t elsize)
{
register PTR ptr;
diff --git a/libiberty/choose-temp.c b/libiberty/choose-temp.c
index 5c2c6140dbf..25c36cc997b 100644
--- a/libiberty/choose-temp.c
+++ b/libiberty/choose-temp.c
@@ -30,7 +30,7 @@ Boston, MA 02111-1307, USA. */
#endif
#include "libiberty.h"
-extern char *choose_tmpdir PARAMS ((void));
+extern char *choose_tmpdir (void);
/* Name of temporary file.
mktemp requires 6 trailing X's. */
@@ -54,7 +54,7 @@ not recommended.
*/
char *
-choose_temp_base ()
+choose_temp_base (void)
{
const char *base = choose_tmpdir ();
char *temp_filename;
diff --git a/libiberty/clock.c b/libiberty/clock.c
index 3ea70c31c60..2a59900384f 100644
--- a/libiberty/clock.c
+++ b/libiberty/clock.c
@@ -67,7 +67,7 @@ number of seconds used.
/* FIXME: should be able to declare as clock_t. */
long
-clock ()
+clock (void)
{
#ifdef HAVE_GETRUSAGE
struct rusage rusage;
diff --git a/libiberty/concat.c b/libiberty/concat.c
index 98b20e16a11..e3bdd91c550 100644
--- a/libiberty/concat.c
+++ b/libiberty/concat.c
@@ -51,11 +51,7 @@ NOTES
#include "libiberty.h"
#include <sys/types.h> /* size_t */
-#ifdef ANSI_PROTOTYPES
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
# if HAVE_STRING_H
# include <string.h>
@@ -69,11 +65,9 @@ NOTES
#include <stdlib.h>
#endif
-static inline unsigned long vconcat_length PARAMS ((const char *, va_list));
+static inline unsigned long vconcat_length (const char *, va_list);
static inline unsigned long
-vconcat_length (first, args)
- const char *first;
- va_list args;
+vconcat_length (const char *first, va_list args)
{
unsigned long length = 0;
const char *arg;
@@ -84,12 +78,8 @@ vconcat_length (first, args)
return length;
}
-static inline char *vconcat_copy PARAMS ((char *, const char *, va_list));
static inline char *
-vconcat_copy (dst, first, args)
- char *dst;
- const char *first;
- va_list args;
+vconcat_copy (char *dst, const char *first, va_list args)
{
char *end = dst;
const char *arg;
@@ -108,7 +98,7 @@ vconcat_copy (dst, first, args)
/* @undocumented concat_length */
unsigned long
-concat_length VPARAMS ((const char *first, ...))
+concat_length (const char *first, ...)
{
unsigned long length;
@@ -123,7 +113,7 @@ concat_length VPARAMS ((const char *first, ...))
/* @undocumented concat_copy */
char *
-concat_copy VPARAMS ((char *dst, const char *first, ...))
+concat_copy (char *dst, const char *first, ...)
{
char *save_dst;
@@ -142,7 +132,7 @@ char *libiberty_concat_ptr;
/* @undocumented concat_copy2 */
char *
-concat_copy2 VPARAMS ((const char *first, ...))
+concat_copy2 (const char *first, ...)
{
VA_OPEN (args, first);
VA_FIXEDARG (args, const char *, first);
@@ -153,7 +143,7 @@ concat_copy2 VPARAMS ((const char *first, ...))
}
char *
-concat VPARAMS ((const char *first, ...))
+concat (const char *first, ...)
{
char *newstr;
@@ -190,7 +180,7 @@ loop:
*/
char *
-reconcat VPARAMS ((char *optr, const char *first, ...))
+reconcat (char *optr, const char *first, ...)
{
char *newstr;
@@ -221,7 +211,7 @@ reconcat VPARAMS ((char *optr, const char *first, ...))
#include <stdio.h>
int
-main ()
+main (void)
{
printf ("\"\" = \"%s\"\n", concat (NULLP));
printf ("\"a\" = \"%s\"\n", concat ("a", NULLP));
diff --git a/libiberty/config.in b/libiberty/config.in
index 2b57d29f39e..6eb169e2eec 100644
--- a/libiberty/config.in
+++ b/libiberty/config.in
@@ -181,6 +181,9 @@
/* Define to 1 if you have the `strncasecmp' function. */
#undef HAVE_STRNCASECMP
+/* Define to 1 if you have the `strndup' function. */
+#undef HAVE_STRNDUP
+
/* Define to 1 if you have the `strrchr' function. */
#undef HAVE_STRRCHR
diff --git a/libiberty/configure b/libiberty/configure
index 9e238de31fe..f76d3c5732f 100755
--- a/libiberty/configure
+++ b/libiberty/configure
@@ -2930,7 +2930,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_c_preproc_warn_flag=yes
if test x$GCC = xyes; then
- ac_libiberty_warn_cflags='-W -Wall -Wtraditional -pedantic'
+ ac_libiberty_warn_cflags='-W -Wall -pedantic'
fi
@@ -4775,6 +4775,7 @@ funcs="$funcs clock"
funcs="$funcs ffs"
funcs="$funcs getcwd"
funcs="$funcs getpagesize"
+funcs="$funcs gettimeofday"
funcs="$funcs index"
funcs="$funcs insque"
funcs="$funcs memchr"
@@ -4797,6 +4798,7 @@ funcs="$funcs strcasecmp"
funcs="$funcs strchr"
funcs="$funcs strdup"
funcs="$funcs strncasecmp"
+funcs="$funcs strndup"
funcs="$funcs strrchr"
funcs="$funcs strstr"
funcs="$funcs strtod"
@@ -4816,7 +4818,7 @@ vars="sys_errlist sys_nerr sys_siglist"
checkfuncs="getrusage on_exit psignal strerror strsignal sysconf times sbrk gettimeofday"
checkfuncs="$checkfuncs realpath canonicalize_file_name pstat_getstatic pstat_getdynamic sysmp"
-checkfuncs="$checkfuncs getsysinfo table sysctl"
+checkfuncs="$checkfuncs getsysinfo table sysctl wait3 wait4"
# These are neither executed nor required, but they help keep
# autoheader happy without adding a bunch of text to acconfig.h.
@@ -4884,14 +4886,16 @@ if test "x" = "y"; then
+
+
for ac_func in asprintf atexit basename bcmp bcopy bsearch bzero calloc clock \
- getcwd getpagesize index insque mkstemps memchr memcmp memcpy \
+ getcwd getpagesize gettimeofday index insque mkstemps memchr memcmp memcpy \
memmove mempcpy memset putenv random rename rindex sigsetmask \
- strcasecmp setenv stpcpy stpncpy strchr strdup strncasecmp strrchr strstr \
+ strcasecmp setenv stpcpy stpncpy strchr strdup strncasecmp strndup strrchr strstr \
strtod strtol strtoul tmpnam vasprintf vfprintf vprintf \
vsprintf waitpid getrusage on_exit psignal strerror strsignal \
sysconf times sbrk gettimeofday ffs snprintf vsnprintf \
- pstat_getstatic pstat_getdynamic sysmp getsysinfo table sysctl \
+ pstat_getstatic pstat_getdynamic sysmp getsysinfo table sysctl wait3 wait4 \
realpath canonicalize_file_name
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -5129,7 +5133,7 @@ fi;
else
# Not a target library, so we set things up to run the test suite.
- CHECK=check-cplus-dem
+ CHECK=really-check
fi
diff --git a/libiberty/configure.ac b/libiberty/configure.ac
index 4d5361b89b6..6c4347da36c 100644
--- a/libiberty/configure.ac
+++ b/libiberty/configure.ac
@@ -114,7 +114,7 @@ AC_PROG_CC
AC_PROG_CPP_WERROR
if test x$GCC = xyes; then
- ac_libiberty_warn_cflags='-W -Wall -Wtraditional -pedantic'
+ ac_libiberty_warn_cflags='-W -Wall -pedantic'
fi
AC_SUBST(ac_libiberty_warn_cflags)
@@ -248,6 +248,7 @@ funcs="$funcs strcasecmp"
funcs="$funcs strchr"
funcs="$funcs strdup"
funcs="$funcs strncasecmp"
+funcs="$funcs strndup"
funcs="$funcs strrchr"
funcs="$funcs strstr"
funcs="$funcs strtod"
@@ -267,7 +268,7 @@ vars="sys_errlist sys_nerr sys_siglist"
checkfuncs="getrusage on_exit psignal strerror strsignal sysconf times sbrk gettimeofday"
checkfuncs="$checkfuncs realpath canonicalize_file_name pstat_getstatic pstat_getdynamic sysmp"
-checkfuncs="$checkfuncs getsysinfo table sysctl"
+checkfuncs="$checkfuncs getsysinfo table sysctl wait3 wait4"
# These are neither executed nor required, but they help keep
# autoheader happy without adding a bunch of text to acconfig.h.
@@ -275,11 +276,11 @@ if test "x" = "y"; then
AC_CHECK_FUNCS(asprintf atexit basename bcmp bcopy bsearch bzero calloc clock \
getcwd getpagesize gettimeofday index insque mkstemps memchr memcmp memcpy \
memmove mempcpy memset putenv random rename rindex sigsetmask \
- strcasecmp setenv stpcpy stpncpy strchr strdup strncasecmp strrchr strstr \
+ strcasecmp setenv stpcpy stpncpy strchr strdup strncasecmp strndup strrchr strstr \
strtod strtol strtoul tmpnam vasprintf vfprintf vprintf \
vsprintf waitpid getrusage on_exit psignal strerror strsignal \
sysconf times sbrk gettimeofday ffs snprintf vsnprintf \
- pstat_getstatic pstat_getdynamic sysmp getsysinfo table sysctl \
+ pstat_getstatic pstat_getdynamic sysmp getsysinfo table sysctl wait3 wait4 \
realpath canonicalize_file_name)
AC_DEFINE(HAVE_SYS_ERRLIST, 1, [Define if you have the sys_errlist variable.])
AC_DEFINE(HAVE_SYS_NERR, 1, [Define if you have the sys_nerr variable.])
@@ -356,7 +357,7 @@ if test -n "${with_target_subdir}"; then
else
# Not a target library, so we set things up to run the test suite.
- CHECK=check-cplus-dem
+ CHECK=really-check
fi
diff --git a/libiberty/copysign.c b/libiberty/copysign.c
index d288be239eb..6793f22e8cc 100644
--- a/libiberty/copysign.c
+++ b/libiberty/copysign.c
@@ -132,8 +132,7 @@ typedef union
#if defined(__IEEE_BIG_ENDIAN) || defined(__IEEE_LITTLE_ENDIAN)
double
-copysign (x, y)
- double x, y;
+copysign (double x, double y)
{
__ieee_double_shape_type a,b;
b.value = y;
@@ -145,8 +144,7 @@ copysign (x, y)
#else
double
-copysign (x, y)
- double x, y;
+copysign (double x, double y)
{
if ((x < 0 && y > 0) || (x > 0 && y < 0))
return -x;
diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c
index c4436d7d7d5..5bea354beee 100644
--- a/libiberty/cp-demangle.c
+++ b/libiberty/cp-demangle.c
@@ -109,39 +109,34 @@
#define CP_STATIC_IF_GLIBCPP_V3 static
#define cplus_demangle_fill_name d_fill_name
-static int
-d_fill_name PARAMS ((struct demangle_component *, const char *, int));
+static int d_fill_name (struct demangle_component *, const char *, int);
#define cplus_demangle_fill_extended_operator d_fill_extended_operator
static int
-d_fill_extended_operator PARAMS ((struct demangle_component *, int,
- struct demangle_component *));
+d_fill_extended_operator (struct demangle_component *, int,
+ struct demangle_component *);
#define cplus_demangle_fill_ctor d_fill_ctor
static int
-d_fill_ctor PARAMS ((struct demangle_component *, enum gnu_v3_ctor_kinds,
- struct demangle_component *));
+d_fill_ctor (struct demangle_component *, enum gnu_v3_ctor_kinds,
+ struct demangle_component *);
#define cplus_demangle_fill_dtor d_fill_dtor
static int
-d_fill_dtor PARAMS ((struct demangle_component *, enum gnu_v3_dtor_kinds,
- struct demangle_component *));
+d_fill_dtor (struct demangle_component *, enum gnu_v3_dtor_kinds,
+ struct demangle_component *);
#define cplus_demangle_mangled_name d_mangled_name
-static struct demangle_component *
-d_mangled_name PARAMS ((struct d_info *, int));
+static struct demangle_component *d_mangled_name (struct d_info *, int);
#define cplus_demangle_type d_type
-static struct demangle_component *
-d_type PARAMS ((struct d_info *));
+static struct demangle_component *d_type (struct d_info *);
#define cplus_demangle_print d_print
-static char *
-d_print PARAMS ((int, const struct demangle_component *, int, size_t *));
+static char *d_print (int, const struct demangle_component *, int, size_t *);
#define cplus_demangle_init_info d_init_info
-static void
-d_init_info PARAMS ((const char *, int, size_t, struct d_info *));
+static void d_init_info (const char *, int, size_t, struct d_info *);
#else /* ! defined(IN_GLIBCPP_V3) */
#define CP_STATIC_IF_GLIBCPP_V3
@@ -286,187 +281,157 @@ struct d_print_info
((dpi)->buf == NULL || (dpi)->len == 0 ? '\0' : (dpi)->buf[(dpi)->len - 1])
#ifdef CP_DEMANGLE_DEBUG
-static void
-d_dump PARAMS ((struct demangle_component *, int));
+static void d_dump (struct demangle_component *, int);
#endif
static struct demangle_component *
-d_make_empty PARAMS ((struct d_info *));
+d_make_empty (struct d_info *);
static struct demangle_component *
-d_make_comp PARAMS ((struct d_info *, enum demangle_component_type,
- struct demangle_component *,
- struct demangle_component *));
+d_make_comp (struct d_info *, enum demangle_component_type,
+ struct demangle_component *,
+ struct demangle_component *);
static struct demangle_component *
-d_make_name PARAMS ((struct d_info *, const char *, int));
+d_make_name (struct d_info *, const char *, int);
static struct demangle_component *
-d_make_builtin_type PARAMS ((struct d_info *,
- const struct demangle_builtin_type_info *));
+d_make_builtin_type (struct d_info *,
+ const struct demangle_builtin_type_info *);
static struct demangle_component *
-d_make_operator PARAMS ((struct d_info *,
- const struct demangle_operator_info *));
+d_make_operator (struct d_info *,
+ const struct demangle_operator_info *);
static struct demangle_component *
-d_make_extended_operator PARAMS ((struct d_info *, int,
- struct demangle_component *));
+d_make_extended_operator (struct d_info *, int,
+ struct demangle_component *);
static struct demangle_component *
-d_make_ctor PARAMS ((struct d_info *, enum gnu_v3_ctor_kinds,
- struct demangle_component *));
+d_make_ctor (struct d_info *, enum gnu_v3_ctor_kinds,
+ struct demangle_component *);
static struct demangle_component *
-d_make_dtor PARAMS ((struct d_info *, enum gnu_v3_dtor_kinds,
- struct demangle_component *));
+d_make_dtor (struct d_info *, enum gnu_v3_dtor_kinds,
+ struct demangle_component *);
static struct demangle_component *
-d_make_template_param PARAMS ((struct d_info *, long));
+d_make_template_param (struct d_info *, long);
static struct demangle_component *
-d_make_sub PARAMS ((struct d_info *, const char *, int));
+d_make_sub (struct d_info *, const char *, int);
static int
-has_return_type PARAMS ((struct demangle_component *));
+has_return_type (struct demangle_component *);
static int
-is_ctor_dtor_or_conversion PARAMS ((struct demangle_component *));
+is_ctor_dtor_or_conversion (struct demangle_component *);
-static struct demangle_component *
-d_encoding PARAMS ((struct d_info *, int));
+static struct demangle_component *d_encoding (struct d_info *, int);
-static struct demangle_component *
-d_name PARAMS ((struct d_info *));
+static struct demangle_component *d_name (struct d_info *);
-static struct demangle_component *
-d_nested_name PARAMS ((struct d_info *));
+static struct demangle_component *d_nested_name (struct d_info *);
-static struct demangle_component *
-d_prefix PARAMS ((struct d_info *));
+static struct demangle_component *d_prefix (struct d_info *);
-static struct demangle_component *
-d_unqualified_name PARAMS ((struct d_info *));
+static struct demangle_component *d_unqualified_name (struct d_info *);
-static struct demangle_component *
-d_source_name PARAMS ((struct d_info *));
+static struct demangle_component *d_source_name (struct d_info *);
-static long
-d_number PARAMS ((struct d_info *));
+static long d_number (struct d_info *);
-static struct demangle_component *
-d_identifier PARAMS ((struct d_info *, int));
+static struct demangle_component *d_identifier (struct d_info *, int);
-static struct demangle_component *
-d_operator_name PARAMS ((struct d_info *));
+static struct demangle_component *d_operator_name (struct d_info *);
-static struct demangle_component *
-d_special_name PARAMS ((struct d_info *));
+static struct demangle_component *d_special_name (struct d_info *);
-static int
-d_call_offset PARAMS ((struct d_info *, int));
+static int d_call_offset (struct d_info *, int);
-static struct demangle_component *
-d_ctor_dtor_name PARAMS ((struct d_info *));
+static struct demangle_component *d_ctor_dtor_name (struct d_info *);
static struct demangle_component **
-d_cv_qualifiers PARAMS ((struct d_info *, struct demangle_component **, int));
+d_cv_qualifiers (struct d_info *, struct demangle_component **, int);
static struct demangle_component *
-d_function_type PARAMS ((struct d_info *));
+d_function_type (struct d_info *);
static struct demangle_component *
-d_bare_function_type PARAMS ((struct d_info *, int));
+d_bare_function_type (struct d_info *, int);
static struct demangle_component *
-d_class_enum_type PARAMS ((struct d_info *));
+d_class_enum_type (struct d_info *);
-static struct demangle_component *
-d_array_type PARAMS ((struct d_info *));
+static struct demangle_component *d_array_type (struct d_info *);
static struct demangle_component *
-d_pointer_to_member_type PARAMS ((struct d_info *));
+d_pointer_to_member_type (struct d_info *);
static struct demangle_component *
-d_template_param PARAMS ((struct d_info *));
+d_template_param (struct d_info *);
-static struct demangle_component *
-d_template_args PARAMS ((struct d_info *));
+static struct demangle_component *d_template_args (struct d_info *);
static struct demangle_component *
-d_template_arg PARAMS ((struct d_info *));
+d_template_arg (struct d_info *);
-static struct demangle_component *
-d_expression PARAMS ((struct d_info *));
+static struct demangle_component *d_expression (struct d_info *);
-static struct demangle_component *
-d_expr_primary PARAMS ((struct d_info *));
+static struct demangle_component *d_expr_primary (struct d_info *);
-static struct demangle_component *
-d_local_name PARAMS ((struct d_info *));
+static struct demangle_component *d_local_name (struct d_info *);
-static int
-d_discriminator PARAMS ((struct d_info *));
+static int d_discriminator (struct d_info *);
static int
-d_add_substitution PARAMS ((struct d_info *, struct demangle_component *));
+d_add_substitution (struct d_info *, struct demangle_component *);
-static struct demangle_component *
-d_substitution PARAMS ((struct d_info *, int));
+static struct demangle_component *d_substitution (struct d_info *, int);
-static void
-d_print_resize PARAMS ((struct d_print_info *, size_t));
+static void d_print_resize (struct d_print_info *, size_t);
-static void
-d_print_append_char PARAMS ((struct d_print_info *, int));
+static void d_print_append_char (struct d_print_info *, int);
static void
-d_print_append_buffer PARAMS ((struct d_print_info *, const char *, size_t));
+d_print_append_buffer (struct d_print_info *, const char *, size_t);
-static void
-d_print_error PARAMS ((struct d_print_info *));
+static void d_print_error (struct d_print_info *);
static void
-d_print_comp PARAMS ((struct d_print_info *,
- const struct demangle_component *));
+d_print_comp (struct d_print_info *, const struct demangle_component *);
static void
-d_print_java_identifier PARAMS ((struct d_print_info *, const char *, int));
+d_print_java_identifier (struct d_print_info *, const char *, int);
static void
-d_print_mod_list PARAMS ((struct d_print_info *, struct d_print_mod *, int));
+d_print_mod_list (struct d_print_info *, struct d_print_mod *, int);
static void
-d_print_mod PARAMS ((struct d_print_info *,
- const struct demangle_component *));
+d_print_mod (struct d_print_info *, const struct demangle_component *);
static void
-d_print_function_type PARAMS ((struct d_print_info *,
- const struct demangle_component *,
- struct d_print_mod *));
+d_print_function_type (struct d_print_info *,
+ const struct demangle_component *,
+ struct d_print_mod *);
static void
-d_print_array_type PARAMS ((struct d_print_info *,
- const struct demangle_component *,
- struct d_print_mod *));
+d_print_array_type (struct d_print_info *,
+ const struct demangle_component *,
+ struct d_print_mod *);
static void
-d_print_expr_op PARAMS ((struct d_print_info *,
- const struct demangle_component *));
+d_print_expr_op (struct d_print_info *, const struct demangle_component *);
static void
-d_print_cast PARAMS ((struct d_print_info *,
- const struct demangle_component *));
+d_print_cast (struct d_print_info *, const struct demangle_component *);
-static char *
-d_demangle PARAMS ((const char *, int, size_t *));
+static char *d_demangle (const char *, int, size_t *);
#ifdef CP_DEMANGLE_DEBUG
static void
-d_dump (dc, indent)
- struct demangle_component *dc;
- int indent;
+d_dump (struct demangle_component *dc, int indent)
{
int i;
@@ -645,10 +610,7 @@ d_dump (dc, indent)
CP_STATIC_IF_GLIBCPP_V3
int
-cplus_demangle_fill_name (p, s, len)
- struct demangle_component *p;
- const char *s;
- int len;
+cplus_demangle_fill_name (struct demangle_component *p, const char *s, int len)
{
if (p == NULL || s == NULL || len == 0)
return 0;
@@ -662,10 +624,8 @@ cplus_demangle_fill_name (p, s, len)
CP_STATIC_IF_GLIBCPP_V3
int
-cplus_demangle_fill_extended_operator (p, args, name)
- struct demangle_component *p;
- int args;
- struct demangle_component *name;
+cplus_demangle_fill_extended_operator (struct demangle_component *p, int args,
+ struct demangle_component *name)
{
if (p == NULL || args < 0 || name == NULL)
return 0;
@@ -679,10 +639,9 @@ cplus_demangle_fill_extended_operator (p, args, name)
CP_STATIC_IF_GLIBCPP_V3
int
-cplus_demangle_fill_ctor (p, kind, name)
- struct demangle_component *p;
- enum gnu_v3_ctor_kinds kind;
- struct demangle_component *name;
+cplus_demangle_fill_ctor (struct demangle_component *p,
+ enum gnu_v3_ctor_kinds kind,
+ struct demangle_component *name)
{
if (p == NULL
|| name == NULL
@@ -699,10 +658,9 @@ cplus_demangle_fill_ctor (p, kind, name)
CP_STATIC_IF_GLIBCPP_V3
int
-cplus_demangle_fill_dtor (p, kind, name)
- struct demangle_component *p;
- enum gnu_v3_dtor_kinds kind;
- struct demangle_component *name;
+cplus_demangle_fill_dtor (struct demangle_component *p,
+ enum gnu_v3_dtor_kinds kind,
+ struct demangle_component *name)
{
if (p == NULL
|| name == NULL
@@ -718,8 +676,7 @@ cplus_demangle_fill_dtor (p, kind, name)
/* Add a new component. */
static struct demangle_component *
-d_make_empty (di)
- struct d_info *di;
+d_make_empty (struct d_info *di)
{
struct demangle_component *p;
@@ -733,11 +690,9 @@ d_make_empty (di)
/* Add a new generic component. */
static struct demangle_component *
-d_make_comp (di, type, left, right)
- struct d_info *di;
- enum demangle_component_type type;
- struct demangle_component *left;
- struct demangle_component *right;
+d_make_comp (struct d_info *di, enum demangle_component_type type,
+ struct demangle_component *left,
+ struct demangle_component *right)
{
struct demangle_component *p;
@@ -826,10 +781,7 @@ d_make_comp (di, type, left, right)
/* Add a new name component. */
static struct demangle_component *
-d_make_name (di, s, len)
- struct d_info *di;
- const char *s;
- int len;
+d_make_name (struct d_info *di, const char *s, int len)
{
struct demangle_component *p;
@@ -842,9 +794,8 @@ d_make_name (di, s, len)
/* Add a new builtin type component. */
static struct demangle_component *
-d_make_builtin_type (di, type)
- struct d_info *di;
- const struct demangle_builtin_type_info *type;
+d_make_builtin_type (struct d_info *di,
+ const struct demangle_builtin_type_info *type)
{
struct demangle_component *p;
@@ -862,9 +813,7 @@ d_make_builtin_type (di, type)
/* Add a new operator component. */
static struct demangle_component *
-d_make_operator (di, op)
- struct d_info *di;
- const struct demangle_operator_info *op;
+d_make_operator (struct d_info *di, const struct demangle_operator_info *op)
{
struct demangle_component *p;
@@ -880,10 +829,8 @@ d_make_operator (di, op)
/* Add a new extended operator component. */
static struct demangle_component *
-d_make_extended_operator (di, args, name)
- struct d_info *di;
- int args;
- struct demangle_component *name;
+d_make_extended_operator (struct d_info *di, int args,
+ struct demangle_component *name)
{
struct demangle_component *p;
@@ -896,10 +843,8 @@ d_make_extended_operator (di, args, name)
/* Add a new constructor component. */
static struct demangle_component *
-d_make_ctor (di, kind, name)
- struct d_info *di;
- enum gnu_v3_ctor_kinds kind;
- struct demangle_component *name;
+d_make_ctor (struct d_info *di, enum gnu_v3_ctor_kinds kind,
+ struct demangle_component *name)
{
struct demangle_component *p;
@@ -912,10 +857,8 @@ d_make_ctor (di, kind, name)
/* Add a new destructor component. */
static struct demangle_component *
-d_make_dtor (di, kind, name)
- struct d_info *di;
- enum gnu_v3_dtor_kinds kind;
- struct demangle_component *name;
+d_make_dtor (struct d_info *di, enum gnu_v3_dtor_kinds kind,
+ struct demangle_component *name)
{
struct demangle_component *p;
@@ -928,9 +871,7 @@ d_make_dtor (di, kind, name)
/* Add a new template parameter. */
static struct demangle_component *
-d_make_template_param (di, i)
- struct d_info *di;
- long i;
+d_make_template_param (struct d_info *di, long i)
{
struct demangle_component *p;
@@ -946,10 +887,7 @@ d_make_template_param (di, i)
/* Add a new standard substitution component. */
static struct demangle_component *
-d_make_sub (di, name, len)
- struct d_info *di;
- const char *name;
- int len;
+d_make_sub (struct d_info *di, const char *name, int len)
{
struct demangle_component *p;
@@ -969,9 +907,7 @@ d_make_sub (di, name, len)
CP_STATIC_IF_GLIBCPP_V3
struct demangle_component *
-cplus_demangle_mangled_name (di, top_level)
- struct d_info *di;
- int top_level;
+cplus_demangle_mangled_name (struct d_info *di, int top_level)
{
if (d_next_char (di) != '_')
return NULL;
@@ -990,8 +926,7 @@ cplus_demangle_mangled_name (di, top_level)
return types. */
static int
-has_return_type (dc)
- struct demangle_component *dc;
+has_return_type (struct demangle_component *dc)
{
if (dc == NULL)
return 0;
@@ -1012,8 +947,7 @@ has_return_type (dc)
conversion operator. */
static int
-is_ctor_dtor_or_conversion (dc)
- struct demangle_component *dc;
+is_ctor_dtor_or_conversion (struct demangle_component *dc)
{
if (dc == NULL)
return 0;
@@ -1041,9 +975,7 @@ is_ctor_dtor_or_conversion (dc)
we would not correctly demangle names in local scopes. */
static struct demangle_component *
-d_encoding (di, top_level)
- struct d_info *di;
- int top_level;
+d_encoding (struct d_info *di, int top_level)
{
char peek = d_peek_char (di);
@@ -1105,8 +1037,7 @@ d_encoding (di, top_level)
*/
static struct demangle_component *
-d_name (di)
- struct d_info *di;
+d_name (struct d_info *di)
{
char peek = d_peek_char (di);
struct demangle_component *dc;
@@ -1183,8 +1114,7 @@ d_name (di)
*/
static struct demangle_component *
-d_nested_name (di)
- struct d_info *di;
+d_nested_name (struct d_info *di)
{
struct demangle_component *ret;
struct demangle_component **pret;
@@ -1218,8 +1148,7 @@ d_nested_name (di)
*/
static struct demangle_component *
-d_prefix (di)
- struct d_info *di;
+d_prefix (struct d_info *di)
{
struct demangle_component *ret = NULL;
@@ -1278,8 +1207,7 @@ d_prefix (di)
*/
static struct demangle_component *
-d_unqualified_name (di)
- struct d_info *di;
+d_unqualified_name (struct d_info *di)
{
char peek;
@@ -1304,8 +1232,7 @@ d_unqualified_name (di)
/* <source-name> ::= <(positive length) number> <identifier> */
static struct demangle_component *
-d_source_name (di)
- struct d_info *di;
+d_source_name (struct d_info *di)
{
long len;
struct demangle_component *ret;
@@ -1321,8 +1248,7 @@ d_source_name (di)
/* number ::= [n] <(non-negative decimal integer)> */
static long
-d_number (di)
- struct d_info *di;
+d_number (struct d_info *di)
{
int negative;
char peek;
@@ -1355,9 +1281,7 @@ d_number (di)
/* identifier ::= <(unqualified source code identifier)> */
static struct demangle_component *
-d_identifier (di, len)
- struct d_info *di;
- int len;
+d_identifier (struct d_info *di, int len)
{
const char *name;
@@ -1460,8 +1384,7 @@ const struct demangle_operator_info cplus_demangle_operators[] =
};
static struct demangle_component *
-d_operator_name (di)
- struct d_info *di;
+d_operator_name (struct d_info *di)
{
char c1;
char c2;
@@ -1519,8 +1442,7 @@ d_operator_name (di)
*/
static struct demangle_component *
-d_special_name (di)
- struct d_info *di;
+d_special_name (struct d_info *di)
{
char c;
@@ -1629,9 +1551,7 @@ d_special_name (di)
display it in verbose mode. */
static int
-d_call_offset (di, c)
- struct d_info *di;
- int c;
+d_call_offset (struct d_info *di, int c)
{
if (c == '\0')
c = d_next_char (di);
@@ -1663,8 +1583,7 @@ d_call_offset (di, c)
*/
static struct demangle_component *
-d_ctor_dtor_name (di)
- struct d_info *di;
+d_ctor_dtor_name (struct d_info *di)
{
if (di->last_name != NULL)
{
@@ -1777,8 +1696,7 @@ cplus_demangle_builtin_types[D_BUILTIN_TYPE_COUNT] =
CP_STATIC_IF_GLIBCPP_V3
struct demangle_component *
-cplus_demangle_type (di)
- struct d_info *di;
+cplus_demangle_type (struct d_info *di)
{
char peek;
struct demangle_component *ret;
@@ -1947,10 +1865,8 @@ cplus_demangle_type (di)
/* <CV-qualifiers> ::= [r] [V] [K] */
static struct demangle_component **
-d_cv_qualifiers (di, pret, member_fn)
- struct d_info *di;
- struct demangle_component **pret;
- int member_fn;
+d_cv_qualifiers (struct d_info *di,
+ struct demangle_component **pret, int member_fn)
{
char peek;
@@ -1996,8 +1912,7 @@ d_cv_qualifiers (di, pret, member_fn)
/* <function-type> ::= F [Y] <bare-function-type> E */
static struct demangle_component *
-d_function_type (di)
- struct d_info *di;
+d_function_type (struct d_info *di)
{
struct demangle_component *ret;
@@ -2018,9 +1933,7 @@ d_function_type (di)
/* <bare-function-type> ::= <type>+ */
static struct demangle_component *
-d_bare_function_type (di, has_return_type)
- struct d_info *di;
- int has_return_type;
+d_bare_function_type (struct d_info *di, int has_return_type)
{
struct demangle_component *return_type;
struct demangle_component *tl;
@@ -2075,8 +1988,7 @@ d_bare_function_type (di, has_return_type)
/* <class-enum-type> ::= <name> */
static struct demangle_component *
-d_class_enum_type (di)
- struct d_info *di;
+d_class_enum_type (struct d_info *di)
{
return d_name (di);
}
@@ -2086,8 +1998,7 @@ d_class_enum_type (di)
*/
static struct demangle_component *
-d_array_type (di)
- struct d_info *di;
+d_array_type (struct d_info *di)
{
char peek;
struct demangle_component *dim;
@@ -2130,8 +2041,7 @@ d_array_type (di)
/* <pointer-to-member-type> ::= M <(class) type> <(member) type> */
static struct demangle_component *
-d_pointer_to_member_type (di)
- struct d_info *di;
+d_pointer_to_member_type (struct d_info *di)
{
struct demangle_component *cl;
struct demangle_component *mem;
@@ -2168,8 +2078,7 @@ d_pointer_to_member_type (di)
*/
static struct demangle_component *
-d_template_param (di)
- struct d_info *di;
+d_template_param (struct d_info *di)
{
long param;
@@ -2197,8 +2106,7 @@ d_template_param (di)
/* <template-args> ::= I <template-arg>+ E */
static struct demangle_component *
-d_template_args (di)
- struct d_info *di;
+d_template_args (struct d_info *di)
{
struct demangle_component *hold_last_name;
struct demangle_component *al;
@@ -2245,8 +2153,7 @@ d_template_args (di)
*/
static struct demangle_component *
-d_template_arg (di)
- struct d_info *di;
+d_template_arg (struct d_info *di)
{
struct demangle_component *ret;
@@ -2278,8 +2185,7 @@ d_template_arg (di)
*/
static struct demangle_component *
-d_expression (di)
- struct d_info *di;
+d_expression (struct d_info *di)
{
char peek;
@@ -2379,8 +2285,7 @@ d_expression (di)
*/
static struct demangle_component *
-d_expr_primary (di)
- struct d_info *di;
+d_expr_primary (struct d_info *di)
{
struct demangle_component *ret;
@@ -2436,8 +2341,7 @@ d_expr_primary (di)
*/
static struct demangle_component *
-d_local_name (di)
- struct d_info *di;
+d_local_name (struct d_info *di)
{
struct demangle_component *function;
@@ -2475,8 +2379,7 @@ d_local_name (di)
We should print it out in verbose mode. */
static int
-d_discriminator (di)
- struct d_info *di;
+d_discriminator (struct d_info *di)
{
long discrim;
@@ -2492,9 +2395,7 @@ d_discriminator (di)
/* Add a new substitution. */
static int
-d_add_substitution (di, dc)
- struct d_info *di;
- struct demangle_component *dc;
+d_add_substitution (struct d_info *di, struct demangle_component *dc)
{
if (dc == NULL)
return 0;
@@ -2550,9 +2451,7 @@ static const struct d_standard_sub_info standard_subs[] =
};
static struct demangle_component *
-d_substitution (di, prefix)
- struct d_info *di;
- int prefix;
+d_substitution (struct d_info *di, int prefix)
{
char c;
@@ -2639,9 +2538,7 @@ d_substitution (di, prefix)
/* Resize the print buffer. */
static void
-d_print_resize (dpi, add)
- struct d_print_info *dpi;
- size_t add;
+d_print_resize (struct d_print_info *dpi, size_t add)
{
size_t need;
@@ -2670,9 +2567,7 @@ d_print_resize (dpi, add)
/* Append a character to the print buffer. */
static void
-d_print_append_char (dpi, c)
- struct d_print_info *dpi;
- int c;
+d_print_append_char (struct d_print_info *dpi, int c)
{
if (dpi->buf != NULL)
{
@@ -2691,10 +2586,7 @@ d_print_append_char (dpi, c)
/* Append a buffer to the print buffer. */
static void
-d_print_append_buffer (dpi, s, l)
- struct d_print_info *dpi;
- const char *s;
- size_t l;
+d_print_append_buffer (struct d_print_info *dpi, const char *s, size_t l)
{
if (dpi->buf != NULL)
{
@@ -2713,8 +2605,7 @@ d_print_append_buffer (dpi, s, l)
/* Indicate that an error occurred during printing. */
static void
-d_print_error (dpi)
- struct d_print_info *dpi;
+d_print_error (struct d_print_info *dpi)
{
free (dpi->buf);
dpi->buf = NULL;
@@ -2730,11 +2621,8 @@ d_print_error (dpi)
CP_STATIC_IF_GLIBCPP_V3
char *
-cplus_demangle_print (options, dc, estimate, palc)
- int options;
- const struct demangle_component *dc;
- int estimate;
- size_t *palc;
+cplus_demangle_print (int options, const struct demangle_component *dc,
+ int estimate, size_t *palc)
{
struct d_print_info dpi;
@@ -2769,9 +2657,8 @@ cplus_demangle_print (options, dc, estimate, palc)
/* Subroutine to handle components. */
static void
-d_print_comp (dpi, dc)
- struct d_print_info *dpi;
- const struct demangle_component *dc;
+d_print_comp (struct d_print_info *dpi,
+ const struct demangle_component *dc)
{
if (dc == NULL)
{
@@ -3442,10 +3329,7 @@ d_print_comp (dpi, dc)
__U<hex-char>+_. */
static void
-d_print_java_identifier (dpi, name, len)
- struct d_print_info *dpi;
- const char *name;
- int len;
+d_print_java_identifier (struct d_print_info *dpi, const char *name, int len)
{
const char *p;
const char *end;
@@ -3495,10 +3379,8 @@ d_print_java_identifier (dpi, name, len)
qualifiers on this after printing a function. */
static void
-d_print_mod_list (dpi, mods, suffix)
- struct d_print_info *dpi;
- struct d_print_mod *mods;
- int suffix;
+d_print_mod_list (struct d_print_info *dpi,
+ struct d_print_mod *mods, int suffix)
{
struct d_print_template *hold_dpt;
@@ -3574,9 +3456,8 @@ d_print_mod_list (dpi, mods, suffix)
/* Print a modifier. */
static void
-d_print_mod (dpi, mod)
- struct d_print_info *dpi;
- const struct demangle_component *mod;
+d_print_mod (struct d_print_info *dpi,
+ const struct demangle_component *mod)
{
switch (mod->type)
{
@@ -3630,10 +3511,9 @@ d_print_mod (dpi, mod)
/* Print a function type, except for the return type. */
static void
-d_print_function_type (dpi, dc, mods)
- struct d_print_info *dpi;
- const struct demangle_component *dc;
- struct d_print_mod *mods;
+d_print_function_type (struct d_print_info *dpi,
+ const struct demangle_component *dc,
+ struct d_print_mod *mods)
{
int need_paren;
int saw_mod;
@@ -3716,10 +3596,9 @@ d_print_function_type (dpi, dc, mods)
/* Print an array type, except for the element type. */
static void
-d_print_array_type (dpi, dc, mods)
- struct d_print_info *dpi;
- const struct demangle_component *dc;
- struct d_print_mod *mods;
+d_print_array_type (struct d_print_info *dpi,
+ const struct demangle_component *dc,
+ struct d_print_mod *mods)
{
int need_space;
@@ -3771,9 +3650,8 @@ d_print_array_type (dpi, dc, mods)
/* Print an operator in an expression. */
static void
-d_print_expr_op (dpi, dc)
- struct d_print_info *dpi;
- const struct demangle_component *dc;
+d_print_expr_op (struct d_print_info *dpi,
+ const struct demangle_component *dc)
{
if (dc->type == DEMANGLE_COMPONENT_OPERATOR)
d_append_buffer (dpi, dc->u.s_operator.op->name,
@@ -3785,9 +3663,8 @@ d_print_expr_op (dpi, dc)
/* Print a cast. */
static void
-d_print_cast (dpi, dc)
- struct d_print_info *dpi;
- const struct demangle_component *dc;
+d_print_cast (struct d_print_info *dpi,
+ const struct demangle_component *dc)
{
if (d_left (dc)->type != DEMANGLE_COMPONENT_TEMPLATE)
d_print_comp (dpi, d_left (dc));
@@ -3831,11 +3708,8 @@ d_print_cast (dpi, dc)
CP_STATIC_IF_GLIBCPP_V3
void
-cplus_demangle_init_info (mangled, options, len, di)
- const char *mangled;
- int options;
- size_t len;
- struct d_info *di;
+cplus_demangle_init_info (const char *mangled, int options, size_t len,
+ struct d_info *di)
{
di->s = mangled;
di->send = mangled + len;
@@ -3868,10 +3742,7 @@ cplus_demangle_init_info (mangled, options, len, di)
a memory allocation failure. On failure, this returns NULL. */
static char *
-d_demangle (mangled, options, palc)
- const char* mangled;
- int options;
- size_t *palc;
+d_demangle (const char* mangled, int options, size_t *palc)
{
size_t len;
int type;
@@ -3995,7 +3866,7 @@ d_demangle (mangled, options, palc)
#if defined(IN_LIBGCC2) || defined(IN_GLIBCPP_V3)
-extern char *__cxa_demangle PARAMS ((const char *, char *, size_t *, int *));
+extern char *__cxa_demangle (const char *, char *, size_t *, int *);
/* ia64 ABI-mandated entry point in the C++ runtime library for
performing demangling. MANGLED_NAME is a NUL-terminated character
@@ -4024,11 +3895,8 @@ extern char *__cxa_demangle PARAMS ((const char *, char *, size_t *, int *));
GNU extensions. */
char *
-__cxa_demangle (mangled_name, output_buffer, length, status)
- const char *mangled_name;
- char *output_buffer;
- size_t *length;
- int *status;
+__cxa_demangle (const char *mangled_name, char *output_buffer,
+ size_t *length, int *status)
{
char *demangled;
size_t alc;
@@ -4094,9 +3962,7 @@ __cxa_demangle (mangled_name, output_buffer, length, status)
demangled name. Otherwise, return NULL. */
char *
-cplus_demangle_v3 (mangled, options)
- const char* mangled;
- int options;
+cplus_demangle_v3 (const char* mangled, int options)
{
size_t alc;
@@ -4111,8 +3977,7 @@ cplus_demangle_v3 (mangled, options)
of JArray<TYPE> with TYPE[]. */
char *
-java_demangle_v3 (mangled)
- const char* mangled;
+java_demangle_v3 (const char* mangled)
{
size_t alc;
char *demangled;
@@ -4162,10 +4027,9 @@ java_demangle_v3 (mangled)
*DTOR_KIND appropriately. */
static int
-is_ctor_or_dtor (mangled, ctor_kind, dtor_kind)
- const char *mangled;
- enum gnu_v3_ctor_kinds *ctor_kind;
- enum gnu_v3_dtor_kinds *dtor_kind;
+is_ctor_or_dtor (const char *mangled,
+ enum gnu_v3_ctor_kinds *ctor_kind,
+ enum gnu_v3_dtor_kinds *dtor_kind)
{
struct d_info di;
struct demangle_component *dc;
@@ -4248,8 +4112,7 @@ is_ctor_or_dtor (mangled, ctor_kind, dtor_kind)
name. A non-zero return indicates the type of constructor. */
enum gnu_v3_ctor_kinds
-is_gnu_v3_mangled_ctor (name)
- const char *name;
+is_gnu_v3_mangled_ctor (const char *name)
{
enum gnu_v3_ctor_kinds ctor_kind;
enum gnu_v3_dtor_kinds dtor_kind;
@@ -4264,8 +4127,7 @@ is_gnu_v3_mangled_ctor (name)
name. A non-zero return indicates the type of destructor. */
enum gnu_v3_dtor_kinds
-is_gnu_v3_mangled_dtor (name)
- const char *name;
+is_gnu_v3_mangled_dtor (const char *name)
{
enum gnu_v3_ctor_kinds ctor_kind;
enum gnu_v3_dtor_kinds dtor_kind;
@@ -4282,7 +4144,7 @@ is_gnu_v3_mangled_dtor (name)
#include "getopt.h"
#include "dyn-string.h"
-static void print_usage PARAMS ((FILE* fp, int exit_value));
+static void print_usage (FILE* fp, int exit_value);
#define IS_ALPHA(CHAR) \
(((CHAR) >= 'a' && (CHAR) <= 'z') \
@@ -4299,9 +4161,7 @@ const char* program_name;
/* Prints usage summary to FP and then exits with EXIT_VALUE. */
static void
-print_usage (fp, exit_value)
- FILE* fp;
- int exit_value;
+print_usage (FILE* fp, int exit_value)
{
fprintf (fp, "Usage: %s [options] [names ...]\n", program_name);
fprintf (fp, "Options:\n");
@@ -4328,9 +4188,7 @@ static const struct option long_options[] =
with their demangled equivalents. */
int
-main (argc, argv)
- int argc;
- char *argv[];
+main (int argc, char *argv[])
{
int i;
int opt_char;
diff --git a/libiberty/cp-demangle.h b/libiberty/cp-demangle.h
index 02e74ec8735..4fe1fa57247 100644
--- a/libiberty/cp-demangle.h
+++ b/libiberty/cp-demangle.h
@@ -148,14 +148,14 @@ cplus_demangle_builtin_types[D_BUILTIN_TYPE_COUNT];
CP_STATIC_IF_GLIBCPP_V3
struct demangle_component *
-cplus_demangle_mangled_name PARAMS ((struct d_info *, int));
+cplus_demangle_mangled_name (struct d_info *, int);
CP_STATIC_IF_GLIBCPP_V3
struct demangle_component *
-cplus_demangle_type PARAMS ((struct d_info *));
+cplus_demangle_type (struct d_info *);
extern void
-cplus_demangle_init_info PARAMS ((const char *, int, size_t, struct d_info *));
+cplus_demangle_init_info (const char *, int, size_t, struct d_info *);
/* cp-demangle.c needs to define this a little differently */
#undef CP_STATIC_IF_GLIBCPP_V3
diff --git a/libiberty/cp-demint.c b/libiberty/cp-demint.c
index 533202dd104..8c200baed9a 100644
--- a/libiberty/cp-demint.c
+++ b/libiberty/cp-demint.c
@@ -56,11 +56,10 @@
/* Fill in most component types. */
int
-cplus_demangle_fill_component (p, type, left, right)
- struct demangle_component *p;
- enum demangle_component_type type;
- struct demangle_component *left;
- struct demangle_component *right;
+cplus_demangle_fill_component (struct demangle_component *p,
+ enum demangle_component_type type,
+ struct demangle_component *left,
+ struct demangle_component *right)
{
if (p == NULL)
return 0;
@@ -130,9 +129,8 @@ cplus_demangle_fill_component (p, type, left, right)
/* Fill in a DEMANGLE_COMPONENT_BUILTIN_TYPE. */
int
-cplus_demangle_fill_builtin_type (p, typename)
- struct demangle_component *p;
- const char *typename;
+cplus_demangle_fill_builtin_type (struct demangle_component *p,
+ const char *typename)
{
int len;
unsigned int i;
@@ -156,10 +154,8 @@ cplus_demangle_fill_builtin_type (p, typename)
/* Fill in a DEMANGLE_COMPONENT_OPERATOR. */
int
-cplus_demangle_fill_operator (p, opname, args)
- struct demangle_component *p;
- const char *opname;
- int args;
+cplus_demangle_fill_operator (struct demangle_component *p,
+ const char *opname, int args)
{
int len;
unsigned int i;
@@ -184,10 +180,7 @@ cplus_demangle_fill_operator (p, opname, args)
/* Translate a mangled name into components. */
struct demangle_component *
-cplus_demangle_v3_components (mangled, options, mem)
- const char *mangled;
- int options;
- void **mem;
+cplus_demangle_v3_components (const char *mangled, int options, void **mem)
{
size_t len;
int type;
diff --git a/libiberty/cplus-dem.c b/libiberty/cplus-dem.c
index 60a54844c23..b186963510f 100644
--- a/libiberty/cplus-dem.c
+++ b/libiberty/cplus-dem.c
@@ -62,7 +62,7 @@ char * realloc ();
#include "libiberty.h"
-static char *ada_demangle PARAMS ((const char *, int));
+static char *ada_demangle (const char *, int);
#define min(X,Y) (((X) < (Y)) ? (X) : (Y))
@@ -70,7 +70,7 @@ static char *ada_demangle PARAMS ((const char *, int));
that will be output when using the `%d' format with `printf'. */
#define INTBUF_SIZE 32
-extern void fancy_abort PARAMS ((void)) ATTRIBUTE_NORETURN;
+extern void fancy_abort (void) ATTRIBUTE_NORETURN;
/* In order to allow a single demangler executable to demangle strings
using various common values of CPLUS_MARKER, as well as any specific
@@ -99,8 +99,7 @@ static char cplus_markers[] = { CPLUS_MARKER, '.', '$', '\0' };
static char char_str[2] = { '\000', '\000' };
void
-set_cplus_marker_for_demangling (ch)
- int ch;
+set_cplus_marker_for_demangling (int ch)
{
cplus_markers[0] = ch;
}
@@ -327,163 +326,127 @@ const struct demangler_engine libiberty_demanglers[] =
/* Prototypes for local functions */
-static void
-delete_work_stuff PARAMS ((struct work_stuff *));
+static void delete_work_stuff (struct work_stuff *);
-static void
-delete_non_B_K_work_stuff PARAMS ((struct work_stuff *));
+static void delete_non_B_K_work_stuff (struct work_stuff *);
-static char *
-mop_up PARAMS ((struct work_stuff *, string *, int));
+static char *mop_up (struct work_stuff *, string *, int);
-static void
-squangle_mop_up PARAMS ((struct work_stuff *));
+static void squangle_mop_up (struct work_stuff *);
-static void
-work_stuff_copy_to_from PARAMS ((struct work_stuff *, struct work_stuff *));
+static void work_stuff_copy_to_from (struct work_stuff *, struct work_stuff *);
#if 0
static int
-demangle_method_args PARAMS ((struct work_stuff *, const char **, string *));
+demangle_method_args (struct work_stuff *, const char **, string *);
#endif
static char *
-internal_cplus_demangle PARAMS ((struct work_stuff *, const char *));
+internal_cplus_demangle (struct work_stuff *, const char *);
static int
-demangle_template_template_parm PARAMS ((struct work_stuff *work,
- const char **, string *));
+demangle_template_template_parm (struct work_stuff *work,
+ const char **, string *);
static int
-demangle_template PARAMS ((struct work_stuff *work, const char **, string *,
- string *, int, int));
+demangle_template (struct work_stuff *work, const char **, string *,
+ string *, int, int);
static int
-arm_pt PARAMS ((struct work_stuff *, const char *, int, const char **,
- const char **));
+arm_pt (struct work_stuff *, const char *, int, const char **,
+ const char **);
static int
-demangle_class_name PARAMS ((struct work_stuff *, const char **, string *));
+demangle_class_name (struct work_stuff *, const char **, string *);
static int
-demangle_qualified PARAMS ((struct work_stuff *, const char **, string *,
- int, int));
+demangle_qualified (struct work_stuff *, const char **, string *,
+ int, int);
-static int
-demangle_class PARAMS ((struct work_stuff *, const char **, string *));
+static int demangle_class (struct work_stuff *, const char **, string *);
-static int
-demangle_fund_type PARAMS ((struct work_stuff *, const char **, string *));
+static int demangle_fund_type (struct work_stuff *, const char **, string *);
-static int
-demangle_signature PARAMS ((struct work_stuff *, const char **, string *));
+static int demangle_signature (struct work_stuff *, const char **, string *);
-static int
-demangle_prefix PARAMS ((struct work_stuff *, const char **, string *));
+static int demangle_prefix (struct work_stuff *, const char **, string *);
-static int
-gnu_special PARAMS ((struct work_stuff *, const char **, string *));
+static int gnu_special (struct work_stuff *, const char **, string *);
-static int
-arm_special PARAMS ((const char **, string *));
+static int arm_special (const char **, string *);
-static void
-string_need PARAMS ((string *, int));
+static void string_need (string *, int);
-static void
-string_delete PARAMS ((string *));
+static void string_delete (string *);
static void
-string_init PARAMS ((string *));
+string_init (string *);
-static void
-string_clear PARAMS ((string *));
+static void string_clear (string *);
#if 0
-static int
-string_empty PARAMS ((string *));
+static int string_empty (string *);
#endif
-static void
-string_append PARAMS ((string *, const char *));
+static void string_append (string *, const char *);
-static void
-string_appends PARAMS ((string *, string *));
+static void string_appends (string *, string *);
-static void
-string_appendn PARAMS ((string *, const char *, int));
+static void string_appendn (string *, const char *, int);
-static void
-string_prepend PARAMS ((string *, const char *));
+static void string_prepend (string *, const char *);
-static void
-string_prependn PARAMS ((string *, const char *, int));
+static void string_prependn (string *, const char *, int);
-static void
-string_append_template_idx PARAMS ((string *, int));
+static void string_append_template_idx (string *, int);
-static int
-get_count PARAMS ((const char **, int *));
+static int get_count (const char **, int *);
-static int
-consume_count PARAMS ((const char **));
+static int consume_count (const char **);
-static int
-consume_count_with_underscores PARAMS ((const char**));
+static int consume_count_with_underscores (const char**);
-static int
-demangle_args PARAMS ((struct work_stuff *, const char **, string *));
+static int demangle_args (struct work_stuff *, const char **, string *);
-static int
-demangle_nested_args PARAMS ((struct work_stuff*, const char**, string*));
+static int demangle_nested_args (struct work_stuff*, const char**, string*);
-static int
-do_type PARAMS ((struct work_stuff *, const char **, string *));
+static int do_type (struct work_stuff *, const char **, string *);
-static int
-do_arg PARAMS ((struct work_stuff *, const char **, string *));
+static int do_arg (struct work_stuff *, const char **, string *);
static void
-demangle_function_name PARAMS ((struct work_stuff *, const char **, string *,
- const char *));
+demangle_function_name (struct work_stuff *, const char **, string *,
+ const char *);
static int
-iterate_demangle_function PARAMS ((struct work_stuff *,
- const char **, string *, const char *));
+iterate_demangle_function (struct work_stuff *,
+ const char **, string *, const char *);
-static void
-remember_type PARAMS ((struct work_stuff *, const char *, int));
+static void remember_type (struct work_stuff *, const char *, int);
-static void
-remember_Btype PARAMS ((struct work_stuff *, const char *, int, int));
+static void remember_Btype (struct work_stuff *, const char *, int, int);
-static int
-register_Btype PARAMS ((struct work_stuff *));
+static int register_Btype (struct work_stuff *);
-static void
-remember_Ktype PARAMS ((struct work_stuff *, const char *, int));
+static void remember_Ktype (struct work_stuff *, const char *, int);
-static void
-forget_types PARAMS ((struct work_stuff *));
+static void forget_types (struct work_stuff *);
-static void
-forget_B_and_K_types PARAMS ((struct work_stuff *));
+static void forget_B_and_K_types (struct work_stuff *);
-static void
-string_prepends PARAMS ((string *, string *));
+static void string_prepends (string *, string *);
static int
-demangle_template_value_parm PARAMS ((struct work_stuff*, const char**,
- string*, type_kind_t));
+demangle_template_value_parm (struct work_stuff*, const char**,
+ string*, type_kind_t);
static int
-do_hpacc_template_const_value PARAMS ((struct work_stuff *, const char **, string *));
+do_hpacc_template_const_value (struct work_stuff *, const char **, string *);
static int
-do_hpacc_template_literal PARAMS ((struct work_stuff *, const char **, string *));
+do_hpacc_template_literal (struct work_stuff *, const char **, string *);
-static int
-snarf_numeric_literal PARAMS ((const char **, string *));
+static int snarf_numeric_literal (const char **, string *);
/* There is a TYPE_QUAL value for each type qualifier. They can be
combined by bitwise-or to form the complete set of qualifiers for a
@@ -494,36 +457,28 @@ snarf_numeric_literal PARAMS ((const char **, string *));
#define TYPE_QUAL_VOLATILE 0x2
#define TYPE_QUAL_RESTRICT 0x4
-static int
-code_for_qualifier PARAMS ((int));
+static int code_for_qualifier (int);
-static const char*
-qualifier_string PARAMS ((int));
+static const char* qualifier_string (int);
-static const char*
-demangle_qualifier PARAMS ((int));
+static const char* demangle_qualifier (int);
-static int
-demangle_expression PARAMS ((struct work_stuff *, const char **, string *,
- type_kind_t));
+static int demangle_expression (struct work_stuff *, const char **, string *,
+ type_kind_t);
static int
-demangle_integral_value PARAMS ((struct work_stuff *, const char **,
- string *));
+demangle_integral_value (struct work_stuff *, const char **, string *);
static int
-demangle_real_value PARAMS ((struct work_stuff *, const char **, string *));
+demangle_real_value (struct work_stuff *, const char **, string *);
static void
-demangle_arm_hp_template PARAMS ((struct work_stuff *, const char **, int,
- string *));
+demangle_arm_hp_template (struct work_stuff *, const char **, int, string *);
static void
-recursively_demangle PARAMS ((struct work_stuff *, const char **, string *,
- int));
+recursively_demangle (struct work_stuff *, const char **, string *, int);
-static void
-grow_vect PARAMS ((char **, size_t *, size_t, int));
+static void grow_vect (char **, size_t *, size_t, int);
/* Translate count to integer, consuming tokens in the process.
Conversion terminates on the first non-digit character.
@@ -534,8 +489,7 @@ grow_vect PARAMS ((char **, size_t *, size_t, int));
Overflow consumes the rest of the digits, and returns -1. */
static int
-consume_count (type)
- const char **type;
+consume_count (const char **type)
{
int count = 0;
@@ -574,8 +528,7 @@ consume_count (type)
failure, since 0 can be a valid value. */
static int
-consume_count_with_underscores (mangled)
- const char **mangled;
+consume_count_with_underscores (const char **mangled)
{
int idx;
@@ -608,8 +561,7 @@ consume_count_with_underscores (mangled)
corresponding to this qualifier. */
static int
-code_for_qualifier (c)
- int c;
+code_for_qualifier (int c)
{
switch (c)
{
@@ -634,8 +586,7 @@ code_for_qualifier (c)
TYPE_QUALS. */
static const char*
-qualifier_string (type_quals)
- int type_quals;
+qualifier_string (int type_quals)
{
switch (type_quals)
{
@@ -676,17 +627,13 @@ qualifier_string (type_quals)
called with a valid qualifier code. */
static const char*
-demangle_qualifier (c)
- int c;
+demangle_qualifier (int c)
{
return qualifier_string (code_for_qualifier (c));
}
int
-cplus_demangle_opname (opname, result, options)
- const char *opname;
- char *result;
- int options;
+cplus_demangle_opname (const char *opname, char *result, int options)
{
int len, len1, ret;
string type;
@@ -819,9 +766,7 @@ cplus_demangle_opname (opname, result, options)
if OPTIONS & DMGL_ANSI == 0, return the old GNU name. */
const char *
-cplus_mangle_opname (opname, options)
- const char *opname;
- int options;
+cplus_mangle_opname (const char *opname, int options)
{
size_t i;
int len;
@@ -841,8 +786,7 @@ cplus_mangle_opname (opname, options)
allow for any demangler initialization that maybe necessary. */
enum demangling_styles
-cplus_demangle_set_style (style)
- enum demangling_styles style;
+cplus_demangle_set_style (enum demangling_styles style)
{
const struct demangler_engine *demangler = libiberty_demanglers;
@@ -859,8 +803,7 @@ cplus_demangle_set_style (style)
/* Do string name to style translation */
enum demangling_styles
-cplus_demangle_name_to_style (name)
- const char *name;
+cplus_demangle_name_to_style (const char *name)
{
const struct demangler_engine *demangler = libiberty_demanglers;
@@ -900,9 +843,7 @@ cplus_demangle_name_to_style (name)
MANGLED. */
char *
-cplus_demangle (mangled, options)
- const char *mangled;
- int options;
+cplus_demangle (const char *mangled, int options)
{
char *ret;
struct work_stuff work[1];
@@ -944,11 +885,7 @@ cplus_demangle (mangled, options)
updating *OLD_VECT and *SIZE as necessary. */
static void
-grow_vect (old_vect, size, min_size, element_size)
- char **old_vect;
- size_t *size;
- size_t min_size;
- int element_size;
+grow_vect (char **old_vect, size_t *size, size_t min_size, int element_size)
{
if (*size < min_size)
{
@@ -968,9 +905,7 @@ grow_vect (old_vect, size, min_size, element_size)
The resulting string is valid until the next call of ada_demangle. */
static char *
-ada_demangle (mangled, option)
- const char *mangled;
- int option ATTRIBUTE_UNUSED;
+ada_demangle (const char *mangled, int option ATTRIBUTE_UNUSED)
{
int i, j;
int len0;
@@ -1073,9 +1008,7 @@ ada_demangle (mangled, option)
calls go directly to this routine to avoid resetting that info. */
static char *
-internal_cplus_demangle (work, mangled)
- struct work_stuff *work;
- const char *mangled;
+internal_cplus_demangle (struct work_stuff *work, const char *mangled)
{
string decl;
@@ -1140,8 +1073,7 @@ internal_cplus_demangle (work, mangled)
/* Clear out and squangling related storage */
static void
-squangle_mop_up (work)
- struct work_stuff *work;
+squangle_mop_up (struct work_stuff *work)
{
/* clean up the B and K type mangling types. */
forget_B_and_K_types (work);
@@ -1159,9 +1091,7 @@ squangle_mop_up (work)
/* Copy the work state and storage. */
static void
-work_stuff_copy_to_from (to, from)
- struct work_stuff *to;
- struct work_stuff *from;
+work_stuff_copy_to_from (struct work_stuff *to, struct work_stuff *from)
{
int i;
@@ -1231,8 +1161,7 @@ work_stuff_copy_to_from (to, from)
/* Delete dynamic stuff in work_stuff that is not to be re-used. */
static void
-delete_non_B_K_work_stuff (work)
- struct work_stuff *work;
+delete_non_B_K_work_stuff (struct work_stuff *work)
{
/* Discard the remembered types, if any. */
@@ -1265,8 +1194,7 @@ delete_non_B_K_work_stuff (work)
/* Delete all dynamic storage in work_stuff. */
static void
-delete_work_stuff (work)
- struct work_stuff *work;
+delete_work_stuff (struct work_stuff *work)
{
delete_non_B_K_work_stuff (work);
squangle_mop_up (work);
@@ -1276,10 +1204,7 @@ delete_work_stuff (work)
/* Clear out any mangled storage */
static char *
-mop_up (work, declp, success)
- struct work_stuff *work;
- string *declp;
- int success;
+mop_up (struct work_stuff *work, string *declp, int success)
{
char *demangled = NULL;
@@ -1331,10 +1256,8 @@ DESCRIPTION
argument list. */
static int
-demangle_signature (work, mangled, declp)
- struct work_stuff *work;
- const char **mangled;
- string *declp;
+demangle_signature (struct work_stuff *work,
+ const char **mangled, string *declp)
{
int success = 1;
int func_done = 0;
@@ -1624,10 +1547,8 @@ demangle_signature (work, mangled, declp)
#if 0
static int
-demangle_method_args (work, mangled, declp)
- struct work_stuff *work;
- const char **mangled;
- string *declp;
+demangle_method_args (struct work_stuff *work, const char **mangled,
+ string *declp)
{
int success = 0;
@@ -1647,10 +1568,8 @@ demangle_method_args (work, mangled, declp)
#endif
static int
-demangle_template_template_parm (work, mangled, tname)
- struct work_stuff *work;
- const char **mangled;
- string *tname;
+demangle_template_template_parm (struct work_stuff *work,
+ const char **mangled, string *tname)
{
int i;
int r;
@@ -1711,11 +1630,8 @@ demangle_template_template_parm (work, mangled, tname)
}
static int
-demangle_expression (work, mangled, s, tk)
- struct work_stuff *work;
- const char** mangled;
- string* s;
- type_kind_t tk;
+demangle_expression (struct work_stuff *work, const char **mangled,
+ string *s, type_kind_t tk)
{
int need_operator = 0;
int success;
@@ -1771,10 +1687,8 @@ demangle_expression (work, mangled, s, tk)
}
static int
-demangle_integral_value (work, mangled, s)
- struct work_stuff *work;
- const char** mangled;
- string* s;
+demangle_integral_value (struct work_stuff *work,
+ const char **mangled, string *s)
{
int success;
@@ -1869,10 +1783,8 @@ demangle_integral_value (work, mangled, s)
/* Demangle the real value in MANGLED. */
static int
-demangle_real_value (work, mangled, s)
- struct work_stuff *work;
- const char **mangled;
- string* s;
+demangle_real_value (struct work_stuff *work,
+ const char **mangled, string *s)
{
if (**mangled == 'E')
return demangle_expression (work, mangled, s, tk_real);
@@ -1912,11 +1824,8 @@ demangle_real_value (work, mangled, s)
}
static int
-demangle_template_value_parm (work, mangled, s, tk)
- struct work_stuff *work;
- const char **mangled;
- string* s;
- type_kind_t tk;
+demangle_template_value_parm (struct work_stuff *work, const char **mangled,
+ string *s, type_kind_t tk)
{
int success = 1;
@@ -2024,13 +1933,9 @@ demangle_template_value_parm (work, mangled, s, tk)
types. */
static int
-demangle_template (work, mangled, tname, trawname, is_type, remember)
- struct work_stuff *work;
- const char **mangled;
- string *tname;
- string *trawname;
- int is_type;
- int remember;
+demangle_template (struct work_stuff *work, const char **mangled,
+ string *tname, string *trawname,
+ int is_type, int remember)
{
int i;
int r;
@@ -2239,11 +2144,8 @@ demangle_template (work, mangled, tname, trawname, is_type, remember)
}
static int
-arm_pt (work, mangled, n, anchor, args)
- struct work_stuff *work;
- const char *mangled;
- int n;
- const char **anchor, **args;
+arm_pt (struct work_stuff *work, const char *mangled,
+ int n, const char **anchor, const char **args)
{
/* Check if ARM template with "__pt__" in it ("parameterized type") */
/* Allow HP also here, because HP's cfront compiler follows ARM to some extent */
@@ -2296,11 +2198,8 @@ arm_pt (work, mangled, n, anchor, args)
}
static void
-demangle_arm_hp_template (work, mangled, n, declp)
- struct work_stuff *work;
- const char **mangled;
- int n;
- string *declp;
+demangle_arm_hp_template (struct work_stuff *work, const char **mangled,
+ int n, string *declp)
{
const char *p;
const char *args;
@@ -2477,10 +2376,8 @@ demangle_arm_hp_template (work, mangled, n, declp)
already been dealt with */
static int
-demangle_class_name (work, mangled, declp)
- struct work_stuff *work;
- const char **mangled;
- string *declp;
+demangle_class_name (struct work_stuff *work, const char **mangled,
+ string *declp)
{
int n;
int success = 0;
@@ -2533,10 +2430,7 @@ DESCRIPTION
*/
static int
-demangle_class (work, mangled, declp)
- struct work_stuff *work;
- const char **mangled;
- string *declp;
+demangle_class (struct work_stuff *work, const char **mangled, string *declp)
{
int success = 0;
int btype;
@@ -2588,11 +2482,8 @@ demangle_class (work, mangled, declp)
demangle_signature. */
static int
-iterate_demangle_function (work, mangled, declp, scan)
- struct work_stuff *work;
- const char **mangled;
- string *declp;
- const char *scan;
+iterate_demangle_function (struct work_stuff *work, const char **mangled,
+ string *declp, const char *scan)
{
const char *mangle_init = *mangled;
int success = 0;
@@ -2691,10 +2582,8 @@ DESCRIPTION
*/
static int
-demangle_prefix (work, mangled, declp)
- struct work_stuff *work;
- const char **mangled;
- string *declp;
+demangle_prefix (struct work_stuff *work, const char **mangled,
+ string *declp)
{
int success = 1;
const char *scan;
@@ -2902,10 +2791,7 @@ DESCRIPTION
*/
static int
-gnu_special (work, mangled, declp)
- struct work_stuff *work;
- const char **mangled;
- string *declp;
+gnu_special (struct work_stuff *work, const char **mangled, string *declp)
{
int n;
int success = 1;
@@ -3106,11 +2992,8 @@ gnu_special (work, mangled, declp)
}
static void
-recursively_demangle(work, mangled, result, namelength)
- struct work_stuff *work;
- const char **mangled;
- string *result;
- int namelength;
+recursively_demangle(struct work_stuff *work, const char **mangled,
+ string *result, int namelength)
{
char * recurse = (char *)NULL;
char * recurse_dem = (char *)NULL;
@@ -3158,9 +3041,7 @@ DESCRIPTION
*/
static int
-arm_special (mangled, declp)
- const char **mangled;
- string *declp;
+arm_special (const char **mangled, string *declp)
{
int n;
int success = 1;
@@ -3243,12 +3124,8 @@ BUGS
*/
static int
-demangle_qualified (work, mangled, result, isfuncname, append)
- struct work_stuff *work;
- const char **mangled;
- string *result;
- int isfuncname;
- int append;
+demangle_qualified (struct work_stuff *work, const char **mangled,
+ string *result, int isfuncname, int append)
{
int qualifiers = 0;
int success = 1;
@@ -3470,9 +3347,7 @@ DESCRIPTION
*/
static int
-get_count (type, count)
- const char **type;
- int *count;
+get_count (const char **type, int *count)
{
const char *p;
int n;
@@ -3508,10 +3383,7 @@ get_count (type, count)
value returned is really a type_kind_t. */
static int
-do_type (work, mangled, result)
- struct work_stuff *work;
- const char **mangled;
- string *result;
+do_type (struct work_stuff *work, const char **mangled, string *result)
{
int n;
int done;
@@ -3820,10 +3692,8 @@ do_type (work, mangled, result)
The value returned is really a type_kind_t. */
static int
-demangle_fund_type (work, mangled, result)
- struct work_stuff *work;
- const char **mangled;
- string *result;
+demangle_fund_type (struct work_stuff *work,
+ const char **mangled, string *result)
{
int done = 0;
int success = 1;
@@ -4022,10 +3892,8 @@ demangle_fund_type (work, mangled, result)
**mangled points to 'S' or 'U' */
static int
-do_hpacc_template_const_value (work, mangled, result)
- struct work_stuff *work ATTRIBUTE_UNUSED;
- const char **mangled;
- string *result;
+do_hpacc_template_const_value (struct work_stuff *work ATTRIBUTE_UNUSED,
+ const char **mangled, string *result)
{
int unsigned_const;
@@ -4079,10 +3947,8 @@ do_hpacc_template_const_value (work, mangled, result)
**mangled is pointing to the 'A' */
static int
-do_hpacc_template_literal (work, mangled, result)
- struct work_stuff *work;
- const char **mangled;
- string *result;
+do_hpacc_template_literal (struct work_stuff *work, const char **mangled,
+ string *result)
{
int literal_len = 0;
char * recurse;
@@ -4125,9 +3991,7 @@ do_hpacc_template_literal (work, mangled, result)
}
static int
-snarf_numeric_literal (args, arg)
- const char ** args;
- string * arg;
+snarf_numeric_literal (const char **args, string *arg)
{
if (**args == '-')
{
@@ -4156,10 +4020,7 @@ snarf_numeric_literal (args, arg)
and free'd should anything go wrong. */
static int
-do_arg (work, mangled, result)
- struct work_stuff *work;
- const char **mangled;
- string *result;
+do_arg (struct work_stuff *work, const char **mangled, string *result)
{
/* Remember where we started so that we can record the type, for
non-squangling type remembering. */
@@ -4222,10 +4083,7 @@ do_arg (work, mangled, result)
}
static void
-remember_type (work, start, len)
- struct work_stuff *work;
- const char *start;
- int len;
+remember_type (struct work_stuff *work, const char *start, int len)
{
char *tem;
@@ -4257,10 +4115,7 @@ remember_type (work, start, len)
/* Remember a K type class qualifier. */
static void
-remember_Ktype (work, start, len)
- struct work_stuff *work;
- const char *start;
- int len;
+remember_Ktype (struct work_stuff *work, const char *start, int len)
{
char *tem;
@@ -4291,8 +4146,7 @@ remember_Ktype (work, start, len)
registers map<temp<char> > as B0, and temp<char> as B1 */
static int
-register_Btype (work)
- struct work_stuff *work;
+register_Btype (struct work_stuff *work)
{
int ret;
@@ -4320,10 +4174,8 @@ register_Btype (work)
/* Store a value into a previously registered B code type. */
static void
-remember_Btype (work, start, len, index)
- struct work_stuff *work;
- const char *start;
- int len, index;
+remember_Btype (struct work_stuff *work, const char *start,
+ int len, int index)
{
char *tem;
@@ -4335,8 +4187,7 @@ remember_Btype (work, start, len, index)
/* Lose all the info related to B and K type codes. */
static void
-forget_B_and_K_types (work)
- struct work_stuff *work;
+forget_B_and_K_types (struct work_stuff *work)
{
int i;
@@ -4363,8 +4214,7 @@ forget_B_and_K_types (work)
/* Forget the remembered types, but not the type vector itself. */
static void
-forget_types (work)
- struct work_stuff *work;
+forget_types (struct work_stuff *work)
{
int i;
@@ -4422,10 +4272,8 @@ forget_types (work)
*/
static int
-demangle_args (work, mangled, declp)
- struct work_stuff *work;
- const char **mangled;
- string *declp;
+demangle_args (struct work_stuff *work, const char **mangled,
+ string *declp)
{
string arg;
int need_comma = 0;
@@ -4547,10 +4395,8 @@ demangle_args (work, mangled, declp)
and method pointers or references, not top-level declarations. */
static int
-demangle_nested_args (work, mangled, declp)
- struct work_stuff *work;
- const char **mangled;
- string *declp;
+demangle_nested_args (struct work_stuff *work, const char **mangled,
+ string *declp)
{
string* saved_previous_argument;
int result;
@@ -4586,11 +4432,8 @@ demangle_nested_args (work, mangled, declp)
}
static void
-demangle_function_name (work, mangled, declp, scan)
- struct work_stuff *work;
- const char **mangled;
- string *declp;
- const char *scan;
+demangle_function_name (struct work_stuff *work, const char **mangled,
+ string *declp, const char *scan)
{
size_t i;
string type;
@@ -4747,9 +4590,7 @@ demangle_function_name (work, mangled, declp, scan)
/* a mini string-handling package */
static void
-string_need (s, n)
- string *s;
- int n;
+string_need (string *s, int n)
{
int tem;
@@ -4774,8 +4615,7 @@ string_need (s, n)
}
static void
-string_delete (s)
- string *s;
+string_delete (string *s)
{
if (s->b != NULL)
{
@@ -4785,15 +4625,13 @@ string_delete (s)
}
static void
-string_init (s)
- string *s;
+string_init (string *s)
{
s->b = s->p = s->e = NULL;
}
static void
-string_clear (s)
- string *s;
+string_clear (string *s)
{
s->p = s->b;
}
@@ -4801,8 +4639,7 @@ string_clear (s)
#if 0
static int
-string_empty (s)
- string *s;
+string_empty (string *s)
{
return (s->b == s->p);
}
@@ -4810,9 +4647,7 @@ string_empty (s)
#endif
static void
-string_append (p, s)
- string *p;
- const char *s;
+string_append (string *p, const char *s)
{
int n;
if (s == NULL || *s == '\0')
@@ -4824,8 +4659,7 @@ string_append (p, s)
}
static void
-string_appends (p, s)
- string *p, *s;
+string_appends (string *p, string *s)
{
int n;
@@ -4839,10 +4673,7 @@ string_appends (p, s)
}
static void
-string_appendn (p, s, n)
- string *p;
- const char *s;
- int n;
+string_appendn (string *p, const char *s, int n)
{
if (n != 0)
{
@@ -4853,9 +4684,7 @@ string_appendn (p, s, n)
}
static void
-string_prepend (p, s)
- string *p;
- const char *s;
+string_prepend (string *p, const char *s)
{
if (s != NULL && *s != '\0')
{
@@ -4864,8 +4693,7 @@ string_prepend (p, s)
}
static void
-string_prepends (p, s)
- string *p, *s;
+string_prepends (string *p, string *s)
{
if (s->b != s->p)
{
@@ -4874,10 +4702,7 @@ string_prepends (p, s)
}
static void
-string_prependn (p, s, n)
- string *p;
- const char *s;
- int n;
+string_prependn (string *p, const char *s, int n)
{
char *q;
@@ -4894,9 +4719,7 @@ string_prependn (p, s, n)
}
static void
-string_append_template_idx (s, idx)
- string *s;
- int idx;
+string_append_template_idx (string *s, int idx)
{
char buf[INTBUF_SIZE + 1 /* 'T' */];
sprintf(buf, "T%d", idx);
diff --git a/libiberty/dyn-string.c b/libiberty/dyn-string.c
index 5d48cdc6955..b6f5d4b0bf4 100644
--- a/libiberty/dyn-string.c
+++ b/libiberty/dyn-string.c
@@ -56,9 +56,7 @@ Boston, MA 02111-1307, USA. */
fails, returns 0. Otherwise returns 1. */
int
-dyn_string_init (ds_struct_ptr, space)
- struct dyn_string *ds_struct_ptr;
- int space;
+dyn_string_init (struct dyn_string *ds_struct_ptr, int space)
{
/* We need at least one byte in which to store the terminating NUL. */
if (space == 0)
@@ -85,8 +83,7 @@ dyn_string_init (ds_struct_ptr, space)
returns the newly allocated string. */
dyn_string_t
-dyn_string_new (space)
- int space;
+dyn_string_new (int space)
{
dyn_string_t result;
#ifdef RETURN_ON_ALLOCATION_FAILURE
@@ -108,8 +105,7 @@ dyn_string_new (space)
/* Free the memory used by DS. */
void
-dyn_string_delete (ds)
- dyn_string_t ds;
+dyn_string_delete (dyn_string_t ds)
{
free (ds->s);
free (ds);
@@ -120,8 +116,7 @@ dyn_string_delete (ds)
DS is then set to the empty string. Deletes DS itself. */
char*
-dyn_string_release (ds)
- dyn_string_t ds;
+dyn_string_release (dyn_string_t ds)
{
/* Store the old buffer. */
char* result = ds->s;
@@ -141,9 +136,7 @@ dyn_string_release (ds)
operation fails, deletes DS and returns NULL. */
dyn_string_t
-dyn_string_resize (ds, space)
- dyn_string_t ds;
- int space;
+dyn_string_resize (dyn_string_t ds, int space)
{
int new_allocated = ds->allocated;
@@ -176,8 +169,7 @@ dyn_string_resize (ds, space)
/* Sets the contents of DS to the empty string. */
void
-dyn_string_clear (ds)
- dyn_string_t ds;
+dyn_string_clear (dyn_string_t ds)
{
/* A dyn_string always has room for at least the NUL terminator. */
ds->s[0] = '\0';
@@ -189,9 +181,7 @@ dyn_string_clear (ds)
RETURN_ON_ALLOCATION_FAILURE, deletes DEST and returns 0. */
int
-dyn_string_copy (dest, src)
- dyn_string_t dest;
- dyn_string_t src;
+dyn_string_copy (dyn_string_t dest, dyn_string_t src)
{
if (dest == src)
abort ();
@@ -211,9 +201,7 @@ dyn_string_copy (dest, src)
and returns 0. */
int
-dyn_string_copy_cstr (dest, src)
- dyn_string_t dest;
- const char *src;
+dyn_string_copy_cstr (dyn_string_t dest, const char *src)
{
int length = strlen (src);
/* Make room in DEST. */
@@ -232,9 +220,7 @@ dyn_string_copy_cstr (dest, src)
returns 0. */
int
-dyn_string_prepend (dest, src)
- dyn_string_t dest;
- dyn_string_t src;
+dyn_string_prepend (dyn_string_t dest, dyn_string_t src)
{
return dyn_string_insert (dest, 0, src);
}
@@ -244,9 +230,7 @@ dyn_string_prepend (dest, src)
if RETURN_ON_ALLOCATION_FAILURE, deletes DEST and returns 0. */
int
-dyn_string_prepend_cstr (dest, src)
- dyn_string_t dest;
- const char *src;
+dyn_string_prepend_cstr (dyn_string_t dest, const char *src)
{
return dyn_string_insert_cstr (dest, 0, src);
}
@@ -257,10 +241,7 @@ dyn_string_prepend_cstr (dest, src)
and returns 0. */
int
-dyn_string_insert (dest, pos, src)
- dyn_string_t dest;
- int pos;
- dyn_string_t src;
+dyn_string_insert (dyn_string_t dest, int pos, dyn_string_t src)
{
int i;
@@ -285,10 +266,7 @@ dyn_string_insert (dest, pos, src)
and returns 0. */
int
-dyn_string_insert_cstr (dest, pos, src)
- dyn_string_t dest;
- int pos;
- const char *src;
+dyn_string_insert_cstr (dyn_string_t dest, int pos, const char *src)
{
int i;
int length = strlen (src);
@@ -310,10 +288,7 @@ dyn_string_insert_cstr (dest, pos, src)
RETURN_ON_ALLOCATION_FAILURE, deletes DEST and returns 0. */
int
-dyn_string_insert_char (dest, pos, c)
- dyn_string_t dest;
- int pos;
- int c;
+dyn_string_insert_char (dyn_string_t dest, int pos, int c)
{
int i;
@@ -334,9 +309,7 @@ dyn_string_insert_char (dest, pos, c)
returns 0. */
int
-dyn_string_append (dest, s)
- dyn_string_t dest;
- dyn_string_t s;
+dyn_string_append (dyn_string_t dest, dyn_string_t s)
{
if (dyn_string_resize (dest, dest->length + s->length) == 0)
return 0;
@@ -350,9 +323,7 @@ dyn_string_append (dest, s)
deletes DEST and returns 0. */
int
-dyn_string_append_cstr (dest, s)
- dyn_string_t dest;
- const char *s;
+dyn_string_append_cstr (dyn_string_t dest, const char *s)
{
int len = strlen (s);
@@ -369,9 +340,7 @@ dyn_string_append_cstr (dest, s)
if RETURN_ON_ALLOCATION_FAILURE, deletes DEST and returns 0. */
int
-dyn_string_append_char (dest, c)
- dyn_string_t dest;
- int c;
+dyn_string_append_char (dyn_string_t dest, int c)
{
/* Make room for the extra character. */
if (dyn_string_resize (dest, dest->length + 1) == NULL)
@@ -392,11 +361,8 @@ dyn_string_append_char (dest, c)
deletes DEST and returns 0. */
int
-dyn_string_substring (dest, src, start, end)
- dyn_string_t dest;
- dyn_string_t src;
- int start;
- int end;
+dyn_string_substring (dyn_string_t dest, dyn_string_t src,
+ int start, int end)
{
int i;
int length = end - start;
@@ -421,9 +387,7 @@ dyn_string_substring (dest, src, start, end)
/* Returns non-zero if DS1 and DS2 have the same contents. */
int
-dyn_string_eq (ds1, ds2)
- dyn_string_t ds1;
- dyn_string_t ds2;
+dyn_string_eq (dyn_string_t ds1, dyn_string_t ds2)
{
/* If DS1 and DS2 have different lengths, they must not be the same. */
if (ds1->length != ds2->length)
diff --git a/libiberty/fdmatch.c b/libiberty/fdmatch.c
index 979c214d5d4..76ad36f1de8 100644
--- a/libiberty/fdmatch.c
+++ b/libiberty/fdmatch.c
@@ -46,9 +46,7 @@ BUGS
#include <sys/types.h>
#include <sys/stat.h>
-int fdmatch (fd1, fd2)
- int fd1;
- int fd2;
+int fdmatch (int fd1, int fd2)
{
struct stat sbuf1;
struct stat sbuf2;
diff --git a/libiberty/ffs.c b/libiberty/ffs.c
index de047e217eb..603cbe8ed99 100644
--- a/libiberty/ffs.c
+++ b/libiberty/ffs.c
@@ -11,8 +11,7 @@ value 1). If @var{valu} is zero, zero is returned.
*/
int
-ffs (valu)
- register int valu;
+ffs (register int valu)
{
register int bit;
diff --git a/libiberty/fibheap.c b/libiberty/fibheap.c
index bcecf80251f..e1d818c2893 100644
--- a/libiberty/fibheap.c
+++ b/libiberty/fibheap.c
@@ -37,32 +37,31 @@ Boston, MA 02111-1307, USA. */
#define FIBHEAPKEY_MIN LONG_MIN
-static void fibheap_ins_root PARAMS ((fibheap_t, fibnode_t));
-static void fibheap_rem_root PARAMS ((fibheap_t, fibnode_t));
-static void fibheap_consolidate PARAMS ((fibheap_t));
-static void fibheap_link PARAMS ((fibheap_t, fibnode_t, fibnode_t));
-static void fibheap_cut PARAMS ((fibheap_t, fibnode_t, fibnode_t));
-static void fibheap_cascading_cut PARAMS ((fibheap_t, fibnode_t));
-static fibnode_t fibheap_extr_min_node PARAMS ((fibheap_t));
-static int fibheap_compare PARAMS ((fibheap_t, fibnode_t, fibnode_t));
-static int fibheap_comp_data PARAMS ((fibheap_t, fibheapkey_t, void *,
- fibnode_t));
-static fibnode_t fibnode_new PARAMS ((void));
-static void fibnode_insert_after PARAMS ((fibnode_t, fibnode_t));
+static void fibheap_ins_root (fibheap_t, fibnode_t);
+static void fibheap_rem_root (fibheap_t, fibnode_t);
+static void fibheap_consolidate (fibheap_t);
+static void fibheap_link (fibheap_t, fibnode_t, fibnode_t);
+static void fibheap_cut (fibheap_t, fibnode_t, fibnode_t);
+static void fibheap_cascading_cut (fibheap_t, fibnode_t);
+static fibnode_t fibheap_extr_min_node (fibheap_t);
+static int fibheap_compare (fibheap_t, fibnode_t, fibnode_t);
+static int fibheap_comp_data (fibheap_t, fibheapkey_t, void *, fibnode_t);
+static fibnode_t fibnode_new (void);
+static void fibnode_insert_after (fibnode_t, fibnode_t);
#define fibnode_insert_before(a, b) fibnode_insert_after (a->left, b)
-static fibnode_t fibnode_remove PARAMS ((fibnode_t));
+static fibnode_t fibnode_remove (fibnode_t);
/* Create a new fibonacci heap. */
fibheap_t
-fibheap_new ()
+fibheap_new (void)
{
return (fibheap_t) xcalloc (1, sizeof (struct fibheap));
}
/* Create a new fibonacci heap node. */
static fibnode_t
-fibnode_new ()
+fibnode_new (void)
{
fibnode_t node;
@@ -74,10 +73,7 @@ fibnode_new ()
}
static inline int
-fibheap_compare (heap, a, b)
- fibheap_t heap ATTRIBUTE_UNUSED;
- fibnode_t a;
- fibnode_t b;
+fibheap_compare (fibheap_t heap ATTRIBUTE_UNUSED, fibnode_t a, fibnode_t b)
{
if (a->key < b->key)
return -1;
@@ -87,11 +83,7 @@ fibheap_compare (heap, a, b)
}
static inline int
-fibheap_comp_data (heap, key, data, b)
- fibheap_t heap;
- fibheapkey_t key;
- void *data;
- fibnode_t b;
+fibheap_comp_data (fibheap_t heap, fibheapkey_t key, void *data, fibnode_t b)
{
struct fibnode a;
@@ -103,10 +95,7 @@ fibheap_comp_data (heap, key, data, b)
/* Insert DATA, with priority KEY, into HEAP. */
fibnode_t
-fibheap_insert (heap, key, data)
- fibheap_t heap;
- fibheapkey_t key;
- void *data;
+fibheap_insert (fibheap_t heap, fibheapkey_t key, void *data)
{
fibnode_t node;
@@ -132,8 +121,7 @@ fibheap_insert (heap, key, data)
/* Return the data of the minimum node (if we know it). */
void *
-fibheap_min (heap)
- fibheap_t heap;
+fibheap_min (fibheap_t heap)
{
/* If there is no min, we can't easily return it. */
if (heap->min == NULL)
@@ -143,8 +131,7 @@ fibheap_min (heap)
/* Return the key of the minimum node (if we know it). */
fibheapkey_t
-fibheap_min_key (heap)
- fibheap_t heap;
+fibheap_min_key (fibheap_t heap)
{
/* If there is no min, we can't easily return it. */
if (heap->min == NULL)
@@ -154,9 +141,7 @@ fibheap_min_key (heap)
/* Union HEAPA and HEAPB into a new heap. */
fibheap_t
-fibheap_union (heapa, heapb)
- fibheap_t heapa;
- fibheap_t heapb;
+fibheap_union (fibheap_t heapa, fibheap_t heapb)
{
fibnode_t a_root, b_root, temp;
@@ -190,8 +175,7 @@ fibheap_union (heapa, heapb)
/* Extract the data of the minimum node from HEAP. */
void *
-fibheap_extract_min (heap)
- fibheap_t heap;
+fibheap_extract_min (fibheap_t heap)
{
fibnode_t z;
void *ret = NULL;
@@ -211,11 +195,8 @@ fibheap_extract_min (heap)
/* Replace both the KEY and the DATA associated with NODE. */
void *
-fibheap_replace_key_data (heap, node, key, data)
- fibheap_t heap;
- fibnode_t node;
- fibheapkey_t key;
- void *data;
+fibheap_replace_key_data (fibheap_t heap, fibnode_t node,
+ fibheapkey_t key, void *data)
{
void *odata;
fibheapkey_t okey;
@@ -253,20 +234,14 @@ fibheap_replace_key_data (heap, node, key, data)
/* Replace the DATA associated with NODE. */
void *
-fibheap_replace_data (heap, node, data)
- fibheap_t heap;
- fibnode_t node;
- void *data;
+fibheap_replace_data (fibheap_t heap, fibnode_t node, void *data)
{
return fibheap_replace_key_data (heap, node, node->key, data);
}
/* Replace the KEY associated with NODE. */
fibheapkey_t
-fibheap_replace_key (heap, node, key)
- fibheap_t heap;
- fibnode_t node;
- fibheapkey_t key;
+fibheap_replace_key (fibheap_t heap, fibnode_t node, fibheapkey_t key)
{
int okey = node->key;
fibheap_replace_key_data (heap, node, key, node->data);
@@ -275,9 +250,7 @@ fibheap_replace_key (heap, node, key)
/* Delete NODE from HEAP. */
void *
-fibheap_delete_node (heap, node)
- fibheap_t heap;
- fibnode_t node;
+fibheap_delete_node (fibheap_t heap, fibnode_t node)
{
void *ret = node->data;
@@ -290,8 +263,7 @@ fibheap_delete_node (heap, node)
/* Delete HEAP. */
void
-fibheap_delete (heap)
- fibheap_t heap;
+fibheap_delete (fibheap_t heap)
{
while (heap->min != NULL)
free (fibheap_extr_min_node (heap));
@@ -301,16 +273,14 @@ fibheap_delete (heap)
/* Determine if HEAP is empty. */
int
-fibheap_empty (heap)
- fibheap_t heap;
+fibheap_empty (fibheap_t heap)
{
return heap->nodes == 0;
}
/* Extract the minimum node of the heap. */
static fibnode_t
-fibheap_extr_min_node (heap)
- fibheap_t heap;
+fibheap_extr_min_node (fibheap_t heap)
{
fibnode_t ret = heap->min;
fibnode_t x, y, orig;
@@ -346,9 +316,7 @@ fibheap_extr_min_node (heap)
/* Insert NODE into the root list of HEAP. */
static void
-fibheap_ins_root (heap, node)
- fibheap_t heap;
- fibnode_t node;
+fibheap_ins_root (fibheap_t heap, fibnode_t node)
{
/* If the heap is currently empty, the new node becomes the singleton
circular root list. */
@@ -367,9 +335,7 @@ fibheap_ins_root (heap, node)
/* Remove NODE from the rootlist of HEAP. */
static void
-fibheap_rem_root (heap, node)
- fibheap_t heap;
- fibnode_t node;
+fibheap_rem_root (fibheap_t heap, fibnode_t node)
{
if (node->left == node)
heap->root = NULL;
@@ -379,8 +345,7 @@ fibheap_rem_root (heap, node)
/* Consolidate the heap. */
static void
-fibheap_consolidate (heap)
- fibheap_t heap;
+fibheap_consolidate (fibheap_t heap)
{
fibnode_t a[1 + 8 * sizeof (long)];
fibnode_t w;
@@ -427,10 +392,8 @@ fibheap_consolidate (heap)
/* Make NODE a child of PARENT. */
static void
-fibheap_link (heap, node, parent)
- fibheap_t heap ATTRIBUTE_UNUSED;
- fibnode_t node;
- fibnode_t parent;
+fibheap_link (fibheap_t heap ATTRIBUTE_UNUSED,
+ fibnode_t node, fibnode_t parent)
{
if (parent->child == NULL)
parent->child = node;
@@ -443,10 +406,7 @@ fibheap_link (heap, node, parent)
/* Remove NODE from PARENT's child list. */
static void
-fibheap_cut (heap, node, parent)
- fibheap_t heap;
- fibnode_t node;
- fibnode_t parent;
+fibheap_cut (fibheap_t heap, fibnode_t node, fibnode_t parent)
{
fibnode_remove (node);
parent->degree--;
@@ -456,9 +416,7 @@ fibheap_cut (heap, node, parent)
}
static void
-fibheap_cascading_cut (heap, y)
- fibheap_t heap;
- fibnode_t y;
+fibheap_cascading_cut (fibheap_t heap, fibnode_t y)
{
fibnode_t z;
@@ -478,9 +436,7 @@ fibheap_cascading_cut (heap, y)
}
static void
-fibnode_insert_after (a, b)
- fibnode_t a;
- fibnode_t b;
+fibnode_insert_after (fibnode_t a, fibnode_t b)
{
if (a == a->right)
{
@@ -499,8 +455,7 @@ fibnode_insert_after (a, b)
}
static fibnode_t
-fibnode_remove (node)
- fibnode_t node;
+fibnode_remove (fibnode_t node)
{
fibnode_t ret;
diff --git a/libiberty/floatformat.c b/libiberty/floatformat.c
index a0f65354e48..c950b79f7e4 100644
--- a/libiberty/floatformat.c
+++ b/libiberty/floatformat.c
@@ -46,18 +46,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define NAN (0.0 / 0.0)
#endif
-static unsigned long get_field PARAMS ((const unsigned char *,
- enum floatformat_byteorders,
- unsigned int,
- unsigned int,
- unsigned int));
-static int floatformat_always_valid PARAMS ((const struct floatformat *fmt,
- const char *from));
+static unsigned long get_field (const unsigned char *,
+ enum floatformat_byteorders,
+ unsigned int,
+ unsigned int,
+ unsigned int);
+static int floatformat_always_valid (const struct floatformat *fmt,
+ const char *from);
static int
-floatformat_always_valid (fmt, from)
- const struct floatformat *fmt ATTRIBUTE_UNUSED;
- const char *from ATTRIBUTE_UNUSED;
+floatformat_always_valid (const struct floatformat *fmt ATTRIBUTE_UNUSED,
+ const char *from ATTRIBUTE_UNUSED)
{
return 1;
}
@@ -108,12 +107,10 @@ const struct floatformat floatformat_ieee_double_littlebyte_bigword =
floatformat_always_valid
};
-static int floatformat_i387_ext_is_valid PARAMS ((const struct floatformat *fmt, const char *from));
+static int floatformat_i387_ext_is_valid (const struct floatformat *fmt, const char *from);
static int
-floatformat_i387_ext_is_valid (fmt, from)
- const struct floatformat *fmt;
- const char *from;
+floatformat_i387_ext_is_valid (const struct floatformat *fmt, const char *from)
{
/* In the i387 double-extended format, if the exponent is all ones,
then the integer bit must be set. If the exponent is neither 0
@@ -220,12 +217,8 @@ const struct floatformat floatformat_ia64_quad_little =
/* Extract a field which starts at START and is LEN bits long. DATA and
TOTAL_LEN are the thing we are extracting it from, in byteorder ORDER. */
static unsigned long
-get_field (data, order, total_len, start, len)
- const unsigned char *data;
- enum floatformat_byteorders order;
- unsigned int total_len;
- unsigned int start;
- unsigned int len;
+get_field (const unsigned char *data, enum floatformat_byteorders order,
+ unsigned int total_len, unsigned int start, unsigned int len)
{
unsigned long result;
unsigned int cur_byte;
@@ -273,10 +266,8 @@ get_field (data, order, total_len, start, len)
Store the double in *TO. */
void
-floatformat_to_double (fmt, from, to)
- const struct floatformat *fmt;
- const char *from;
- double *to;
+floatformat_to_double (const struct floatformat *fmt,
+ const char *from, double *to)
{
const unsigned char *ufrom = (const unsigned char *)from;
double dto;
@@ -381,22 +372,18 @@ floatformat_to_double (fmt, from, to)
*to = dto;
}
-static void put_field PARAMS ((unsigned char *, enum floatformat_byteorders,
- unsigned int,
- unsigned int,
- unsigned int,
- unsigned long));
+static void put_field (unsigned char *, enum floatformat_byteorders,
+ unsigned int,
+ unsigned int,
+ unsigned int,
+ unsigned long);
/* Set a field which starts at START and is LEN bits long. DATA and
TOTAL_LEN are the thing we are extracting it from, in byteorder ORDER. */
static void
-put_field (data, order, total_len, start, len, stuff_to_put)
- unsigned char *data;
- enum floatformat_byteorders order;
- unsigned int total_len;
- unsigned int start;
- unsigned int len;
- unsigned long stuff_to_put;
+put_field (unsigned char *data, enum floatformat_byteorders order,
+ unsigned int total_len, unsigned int start, unsigned int len,
+ unsigned long stuff_to_put)
{
unsigned int cur_byte;
int cur_bitshift;
@@ -443,10 +430,8 @@ put_field (data, order, total_len, start, len, stuff_to_put)
restrictions. */
void
-floatformat_from_double (fmt, from, to)
- const struct floatformat *fmt;
- const double *from;
- char *to;
+floatformat_from_double (const struct floatformat *fmt,
+ const double *from, char *to)
{
double dfrom;
int exponent;
@@ -541,9 +526,7 @@ floatformat_from_double (fmt, from, to)
/* Return non-zero iff the data at FROM is a valid number in format FMT. */
int
-floatformat_is_valid (fmt, from)
- const struct floatformat *fmt;
- const char *from;
+floatformat_is_valid (const struct floatformat *fmt, const char *from)
{
return fmt->is_valid (fmt, from);
}
@@ -556,8 +539,7 @@ floatformat_is_valid (fmt, from)
/* This is to be run on a host which uses IEEE floating point. */
void
-ieee_test (n)
- double n;
+ieee_test (double n)
{
double result;
@@ -597,7 +579,7 @@ ieee_test (n)
}
int
-main ()
+main (void)
{
ieee_test (0.0);
ieee_test (0.5);
diff --git a/libiberty/fnmatch.c b/libiberty/fnmatch.c
index eb898ee14d8..7424f91a374 100644
--- a/libiberty/fnmatch.c
+++ b/libiberty/fnmatch.c
@@ -65,10 +65,7 @@ extern int errno;
/* Match STRING against the filename pattern PATTERN, returning zero if
it matches, nonzero if not. */
int
-fnmatch (pattern, string, flags)
- const char *pattern;
- const char *string;
- int flags;
+fnmatch (const char *pattern, const char *string, int flags)
{
register const char *p = pattern, *n = string;
register unsigned char c;
diff --git a/libiberty/functions.texi b/libiberty/functions.texi
index b6e8e7acb81..a886b885704 100644
--- a/libiberty/functions.texi
+++ b/libiberty/functions.texi
@@ -3,7 +3,7 @@
@c Edit the *.c files, configure with --enable-maintainer-mode,
@c and let gather-docs build you a new copy.
-@c safe-ctype.c:24
+@c safe-ctype.c:25
@defvr Extension HOST_CHARSET
This macro indicates the basic character set and encoding used by the
host: more precisely, the encoding used for character constants in
@@ -25,6 +25,139 @@ nineteen EBCDIC varying characters is tested; exercise caution.)
@end ftable
@end defvr
+@c pexecute.txh:1
+@deftypefn Extension struct pex_obj *pex_init (int @var{flags}, const char *@var{pname}, const char *@var{tempbase})
+
+Prepare to execute one or more programs, with standard output of each
+program fed to standard input of the next. This is a system
+independent interface to execute a pipeline.
+
+@var{flags} is a bitwise combination of the following:
+
+@table @code
+
+@vindex PEX_RECORD_TIMES
+@item PEX_RECORD_TIMES
+Record subprocess times if possible.
+
+@vindex PEX_USE_PIPES
+@item PEX_USE_PIPES
+Use pipes for communication between processes, if possible.
+
+@vindex PEX_SAVE_TEMPS
+@item PEX_SAVE_TEMPS
+Don't delete temporary files used for communication between
+processes.
+
+@end table
+
+@var{pname} is the name of program to be executed, used in error
+messages. @var{tempbase} is a base name to use for any required
+temporary files; it may be @code{NULL} to use a randomly chosen name.
+
+@end deftypefn
+
+@c pexecute.txh:161
+@deftypefn Extension const char *pex_one (int @var{flags}, const char *@var{executable}, char * const *@var{argv}, const char *@var{pname}, const char *@var{outname}, const char *@var{errname}, int *@var{status}, int *@var{err})
+
+An interface to @code{pex_init} to permit the easy execution of a
+single program. The return value and most of the parameters are as
+for a call to @code{pex_run}. @var{flags} is restricted to a
+combination of @code{PEX_SEARCH}, @code{PEX_STDERR_TO_STDOUT}, and
+@code{PEX_BINARY_OUTPUT}. @var{outname} is interpreted as if
+@code{PEX_LAST} were set. On a successful return, *@var{status} will
+be set to the exit status of the program.
+
+@end deftypefn
+
+@c pexecute.txh:32
+@deftypefn Extension const char *pex_run (struct pex_obj *@var{obj}, int @var{flags}, const char *@var{executable}, char * const *@var{argv}, const char *@var{outname}, const char *@var{errname}, int *@var{err})
+
+Execute one program in a pipeline. On success this returns
+@code{NULL}. On failure it returns an error message, a statically
+allocated string.
+
+@var{obj} is returned by a previous call to @code{pex_init}.
+
+@var{flags} is a bitwise combination of the following:
+
+@table @code
+
+@vindex PEX_LAST
+@item PEX_LAST
+This must be set on the last program in the pipeline. In particular,
+it should be set when executing a single program. The standard output
+of the program will be sent to @var{outname}, or, if @var{outname} is
+@code{NULL}, to the standard output of the calling program. This
+should not be set if you want to call @code{pex_read_output}
+(described below). After a call to @code{pex_run} with this bit set,
+@var{pex_run} may no longer be called with the same @var{obj}.
+
+@vindex PEX_SEARCH
+@item PEX_SEARCH
+Search for the program using the user's executable search path.
+
+@vindex PEX_SUFFIX
+@item PEX_SUFFIX
+@var{outname} is a suffix. See the description of @var{outname},
+below.
+
+@vindex PEX_STDERR_TO_STDOUT
+@item PEX_STDERR_TO_STDOUT
+Send the program's standard error to standard output, if possible.
+
+@vindex PEX_BINARY_INPUT
+@vindex PEX_BINARY_OUTPUT
+@item PEX_BINARY_INPUT
+@itemx PEX_BINARY_OUTPUT
+The standard input (output) of the program should be read (written) in
+binary mode rather than text mode. These flags are ignored on systems
+which do not distinguish binary mode and text mode, such as Unix. For
+proper behavior these flags should match appropriately--a call to
+@code{pex_run} using @code{PEX_BINARY_OUTPUT} should be followed by a
+call using @code{PEX_BINARY_INPUT}.
+@end table
+
+@var{executable} is the program to execute. @var{argv} is the set of
+arguments to pass to the program; normally @code{@var{argv}[0]} will
+be a copy of @var{executable}.
+
+@var{outname} is used to set the name of the file to use for standard
+output. There are two cases in which no output file will be used: 1)
+if @code{PEX_LAST} is not set in @var{flags}, and @code{PEX_USE_PIPES}
+was set in the call to @code{pex_init}, and the system supports pipes;
+2) if @code{PEX_LAST} is set in @var{flags}, and @var{outname} is
+@code{NULL}. Otherwise the code will use a file to hold standard
+output. If @code{PEX_LAST} is not set, this file is considered to be
+a temporary file, and it will be removed when no longer needed, unless
+@code{PEX_SAVE_TEMPS} was set in the call to @code{pex_init}.
+
+There are two cases to consider when setting the name of the file to
+hold standard output.
+
+First case: @code{PEX_SUFFIX} is set in @var{flags}. In this case
+@var{outname} may not be @code{NULL}. If the @var{tempbase} parameter
+to @code{pex_init} was not @code{NULL}, then the output file name is
+the concatenation of @var{tempbase} and @var{outname}. If
+@var{tempbase} was @code{NULL}, then the output file name is a random
+file name ending in @var{outname}.
+
+Second case: @code{PEX_SUFFIX} was not set in @var{flags}. In this
+case, if @var{outname} is not @code{NULL}, it is used as the output
+file name. If @var{outname} is @code{NULL}, and @var{tempbase} was
+not NULL, the output file name is randomly chosen using
+@var{tempbase}. Otherwise the output file name is chosen completely
+at random.
+
+@var{errname} is the file name to use for standard error output. If
+it is @code{NULL}, standard error is the same as the caller.
+Otherwise, standard error is written to the named file.
+
+On an error return, the code sets @code{*@var{err}} to an @code{errno}
+value, or to 0 if there is no relevant @code{errno}.
+
+@end deftypefn
+
@c alloca.c:26
@deftypefn Replacement void* alloca (size_t @var{size})
@@ -43,7 +176,7 @@ the possibility of a GCC built-in function.
@end deftypefn
-@c asprintf.c:33
+@c asprintf.c:29
@deftypefn Extension int asprintf (char **@var{resptr}, const char *@var{format}, ...)
Like @code{sprintf}, but instead of passing a pointer to a buffer, you
@@ -104,7 +237,7 @@ is respectively less than, matching, or greater than the array member.
@end deftypefn
-@c argv.c:139
+@c argv.c:121
@deftypefn Extension char** buildargv (char *@var{sp})
Given a pointer to a string, parse the string extracting fields
@@ -158,7 +291,7 @@ not recommended.
@end deftypefn
-@c make-temp-file.c:88
+@c make-temp-file.c:87
@deftypefn Replacement char* choose_tmpdir ()
Returns a pointer to a directory path suitable for creating temporary
@@ -185,7 +318,7 @@ pointer encountered. Pointers to empty strings are ignored.
@end deftypefn
-@c argv.c:65
+@c argv.c:49
@deftypefn Extension char** dupargv (char **@var{vector})
Duplicate an argument vector. Simply scans through @var{vector},
@@ -288,7 +421,7 @@ Ignores case when performing the comparison.
@end deftypefn
-@c argv.c:111
+@c argv.c:94
@deftypefn Extension void freeargv (char **@var{vector})
Free an argument vector that was built using @code{buildargv}. Simply
@@ -339,6 +472,14 @@ between calls to @code{getpwd}.
@end deftypefn
+@c gettimeofday.c:12
+@deftypefn int gettimeofday (struct timeval *@var{tp}, void *@var{tz})
+
+Writes the current time to @var{tp}. This implementation requires
+that @var{tz} be NULL. Returns 0 on success, -1 on failure.
+
+@end deftypefn
+
@c hex.c:30
@deftypefn Extension void hex_init (void)
@@ -404,7 +545,7 @@ struct qelem @{
@end deftypefn
-@c safe-ctype.c:45
+@c safe-ctype.c:46
@deffn Extension ISALPHA (@var{c})
@deffnx Extension ISALNUM (@var{c})
@deffnx Extension ISBLANK (@var{c})
@@ -454,7 +595,7 @@ false for characters with numeric values from 128 to 255.
@end itemize
@end deffn
-@c safe-ctype.c:94
+@c safe-ctype.c:95
@deffn Extension ISIDNUM (@var{c})
@deffnx Extension ISIDST (@var{c})
@deffnx Extension IS_VSPACE (@var{c})
@@ -527,7 +668,7 @@ relative prefix can be found, return @code{NULL}.
@end deftypefn
-@c make-temp-file.c:138
+@c make-temp-file.c:137
@deftypefn Replacement char* make_temp_file (const char *@var{suffix})
Return a temporary file name (as a string) or @code{NULL} if unable to
@@ -610,46 +751,62 @@ reading and writing.
@end deftypefn
-@c pexecute.txh:1
-@deftypefn Extension int pexecute (const char *@var{program}, char * const *@var{argv}, const char *@var{this_pname}, const char *@var{temp_base}, char **@var{errmsg_fmt}, char **@var{errmsg_arg}, int flags)
+@c pexecute.txh:155
+@deftypefn Extension void pex_free (struct pex_obj @var{obj})
-Executes a program.
+Clean up and free all data associated with @var{obj}.
-@var{program} and @var{argv} are the arguments to
-@code{execv}/@code{execvp}.
+@end deftypefn
-@var{this_pname} is name of the calling program (i.e., @code{argv[0]}).
+@c pexecute.txh:131
+@deftypefn Extension int pex_get_status (struct pex_obj *@var{obj}, int @var{count}, int *@var{vector})
-@var{temp_base} is the path name, sans suffix, of a temporary file to
-use if needed. This is currently only needed for MS-DOS ports that
-don't use @code{go32} (do any still exist?). Ports that don't need it
-can pass @code{NULL}.
+Returns the exit status of all programs run using @var{obj}.
+@var{count} is the number of results expected. The results will be
+placed into @var{vector}. The results are in the order of the calls
+to @code{pex_run}. Returns 0 on error, 1 on success.
-(@code{@var{flags} & PEXECUTE_SEARCH}) is non-zero if @env{PATH}
-should be searched (??? It's not clear that GCC passes this flag
-correctly). (@code{@var{flags} & PEXECUTE_FIRST}) is nonzero for the
-first process in chain. (@code{@var{flags} & PEXECUTE_FIRST}) is
-nonzero for the last process in chain. The first/last flags could be
-simplified to only mark the last of a chain of processes but that
-requires the caller to always mark the last one (and not give up
-early if some error occurs). It's more robust to require the caller
-to mark both ends of the chain.
+@end deftypefn
-The result is the pid on systems like Unix where we
-@code{fork}/@code{exec} and on systems like WIN32 and OS/2 where we
-use @code{spawn}. It is up to the caller to wait for the child.
+@c pexecute.txh:140
+@deftypefn Extension int pex_get_times (struct pex_obj *@var{obj}, int @var{count}, struct pex_time *@var{vector})
-The result is the @code{WEXITSTATUS} on systems like MS-DOS where we
-@code{spawn} and wait for the child here.
+Returns the process execution times of all programs run using
+@var{obj}. @var{count} is the number of results expected. The
+results will be placed into @var{vector}. The results are in the
+order of the calls to @code{pex_run}. Returns 0 on error, 1 on
+success.
-Upon failure, @var{errmsg_fmt} and @var{errmsg_arg} are set to the
-text of the error message with an optional argument (if not needed,
-@var{errmsg_arg} is set to @code{NULL}), and @minus{}1 is returned.
-@code{errno} is available to the caller to use.
+@code{struct pex_time} has the following fields: @code{user_seconds},
+@code{user_microseconds}, @code{system_seconds},
+@code{system_microseconds}. On systems which do not support reporting
+process times, all the fields will be set to @code{0}.
@end deftypefn
-@c strsignal.c:546
+@c pexecute.txh:119
+@deftypefn Extension FILE * pex_read_output (struct pex_obj *@var{obj}, int @var{binary})
+
+Returns a @code{FILE} pointer which may be used to read the standard
+output of the last program in the pipeline. When this is used,
+@code{PEX_LAST} should not be used in a call to @code{pex_run}. After
+this is called, @code{pex_run} may no longer be called with the same
+@var{obj}. @var{binary} should be non-zero if the file should be
+opened in binary mode. Don't call @code{fclose} on the returned file;
+it will be closed by @code{pex_free}.
+
+@end deftypefn
+
+@c pexecute.txh:173
+@deftypefn Extension int pexecute (const char *@var{program}, char * const *@var{argv}, const char *@var{this_pname}, const char *@var{temp_base}, char **@var{errmsg_fmt}, char **@var{errmsg_arg}, int flags)
+
+This is the old interface to execute one or more programs. It is
+still supported for compatibility purposes, but is no longer
+documented.
+
+@end deftypefn
+
+@c strsignal.c:539
@deftypefn Supplemental void psignal (unsigned @var{signo}, char *@var{message})
Print @var{message} to the standard error, followed by a colon,
@@ -668,23 +825,10 @@ name is unset/removed.
@end deftypefn
-@c pexecute.txh:39
+@c pexecute.txh:181
@deftypefn Extension int pwait (int @var{pid}, int *@var{status}, int @var{flags})
-Waits for a program started by @code{pexecute} to finish.
-
-@var{pid} is the process id of the task to wait for. @var{status} is
-the `status' argument to wait. @var{flags} is currently unused
-(allows future enhancement without breaking upward compatibility).
-Pass 0 for now.
-
-The result is the pid of the child reaped, or -1 for failure
-(@code{errno} says why).
-
-On systems that don't support waiting for a particular child,
-@var{pid} is ignored. On systems like MS-DOS that don't really
-multitask @code{pwait} is just a mechanism to provide a consistent
-interface for the caller.
+Another part of the old execution interface.
@end deftypefn
@@ -703,7 +847,7 @@ control over the state of the random number generator.
@end deftypefn
-@c concat.c:177
+@c concat.c:167
@deftypefn Extension char* reconcat (char *@var{optr}, const char *@var{s1}, @dots{}, @code{NULL})
Same as @code{concat}, except that if @var{optr} is not @code{NULL} it
@@ -746,7 +890,7 @@ environment. This implementation is not safe for multithreaded code.
@end deftypefn
-@c strsignal.c:352
+@c strsignal.c:348
@deftypefn Extension int signo_max (void)
Returns the maximum signal value for which a corresponding symbolic
@@ -837,7 +981,7 @@ Returns a pointer to a copy of @var{s} in memory obtained from
@end deftypefn
-@c strerror.c:671
+@c strerror.c:670
@deftypefn Replacement {const char*} strerrno (int @var{errnum})
Given an error number returned from a system call (typically returned
@@ -893,6 +1037,15 @@ Compares the first @var{n} bytes of two strings, returning a value as
@end deftypefn
+@c strndup.c:23
+@deftypefn Extension char* strndup (const char *@var{s}, size_t @var{n})
+
+Returns a pointer to a copy of @var{s} with at most @var{n} characters
+in memory obtained from @code{malloc}, or @code{NULL} if insufficient
+memory was available. The result is always NUL terminated.
+
+@end deftypefn
+
@c strrchr.c:6
@deftypefn Supplemental char* strrchr (const char *@var{s}, int @var{c})
@@ -902,7 +1055,7 @@ null character, the results are undefined.
@end deftypefn
-@c strsignal.c:387
+@c strsignal.c:383
@deftypefn Supplemental {const char *} strsignal (int @var{signo})
Maps an signal number to an signal message string, the contents of
@@ -923,7 +1076,7 @@ call to @code{strsignal}.
@end deftypefn
-@c strsignal.c:451
+@c strsignal.c:446
@deftypefn Extension {const char*} strsigno (int @var{signo})
Given an signal number, returns a pointer to a string containing the
@@ -965,7 +1118,7 @@ the location referenced by @var{endptr}.
@end deftypefn
-@c strerror.c:731
+@c strerror.c:729
@deftypefn Extension int strtoerrno (const char *@var{name})
Given the symbolic name of a error number (e.g., @code{EACCES}), map it
@@ -989,7 +1142,7 @@ that the converted value is unsigned.
@end deftypefn
-@c strsignal.c:506
+@c strsignal.c:500
@deftypefn Extension int strtosigno (const char *@var{name})
Given the symbolic name of a signal, map it to a signal number. If no
@@ -1008,7 +1161,17 @@ not be used in new projects. Use @code{mkstemp} instead.
@end deftypefn
-@c vasprintf.c:51
+@c unlink-if-ordinary.c:27
+@deftypefn Supplemental int unlink_if_ordinary (const char*)
+
+Unlinks the named file, unless it is special (e.g. a device file).
+Returns 0 when the file was unlinked, a negative value (and errno set) when
+there was an error deleting the file, and a positive value if no attempt
+was made to unlink the file because it is special.
+
+@end deftypefn
+
+@c vasprintf.c:47
@deftypefn Extension int vasprintf (char **@var{resptr}, const char *@var{format}, va_list @var{args})
Like @code{vsprintf}, but instead of passing a pointer to a buffer,
@@ -1153,4 +1316,13 @@ will never return a @code{NULL} pointer.
@end deftypefn
+@c xstrndup.c:23
+@deftypefn Replacement char* xstrndup (const char *@var{s}, size_t @var{n})
+
+Returns a pointer to a copy of @var{s} with at most @var{n} characters
+without fail, using @code{xmalloc} to obtain memory. The result is
+always NUL terminated.
+
+@end deftypefn
+
diff --git a/libiberty/getcwd.c b/libiberty/getcwd.c
index a19d26796d5..28f26eb179f 100644
--- a/libiberty/getcwd.c
+++ b/libiberty/getcwd.c
@@ -38,9 +38,7 @@ extern int errno;
#endif
char *
-getcwd (buf, len)
- char *buf;
- size_t len;
+getcwd (char *buf, size_t len)
{
char ourbuf[MAXPATHLEN];
char *result;
diff --git a/libiberty/getopt.c b/libiberty/getopt.c
index a1e482763c1..785c7aad2fc 100644
--- a/libiberty/getopt.c
+++ b/libiberty/getopt.c
@@ -217,9 +217,7 @@ extern char *getenv ();
#endif
static char *
-my_index (str, chr)
- const char *str;
- int chr;
+my_index (const char *str, int chr)
{
while (*str)
{
@@ -307,8 +305,7 @@ static void exchange (char **);
#endif
static void
-exchange (argv)
- char **argv;
+exchange (char **argv)
{
int bottom = first_nonopt;
int middle = last_nonopt;
@@ -392,10 +389,7 @@ exchange (argv)
static const char *_getopt_initialize (int, char *const *, const char *);
#endif
static const char *
-_getopt_initialize (argc, argv, optstring)
- int argc;
- char *const *argv;
- const char *optstring;
+_getopt_initialize (int argc, char *const *argv, const char *optstring)
{
/* Start processing options with ARGV-element 1 (since ARGV-element 0
is the program name); the sequence of previously skipped
@@ -514,13 +508,9 @@ _getopt_initialize (argc, argv, optstring)
long-named options. */
int
-_getopt_internal (argc, argv, optstring, longopts, longind, long_only)
- int argc;
- char *const *argv;
- const char *optstring;
- const struct option *longopts;
- int *longind;
- int long_only;
+_getopt_internal (int argc, char *const *argv, const char *optstring,
+ const struct option *longopts,
+ int *longind, int long_only)
{
optarg = NULL;
@@ -970,10 +960,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
}
int
-getopt (argc, argv, optstring)
- int argc;
- char *const *argv;
- const char *optstring;
+getopt (int argc, char *const *argv, const char *optstring)
{
return _getopt_internal (argc, argv, optstring,
(const struct option *) 0,
@@ -989,9 +976,7 @@ getopt (argc, argv, optstring)
the above definition of `getopt'. */
int
-main (argc, argv)
- int argc;
- char **argv;
+main (int argc, char **argv)
{
int c;
int digit_optind = 0;
diff --git a/libiberty/getopt1.c b/libiberty/getopt1.c
index a3637c2d0e0..81371d52b4d 100644
--- a/libiberty/getopt1.c
+++ b/libiberty/getopt1.c
@@ -66,12 +66,8 @@
#endif
int
-getopt_long (argc, argv, options, long_options, opt_index)
- int argc;
- char *const *argv;
- const char *options;
- const struct option *long_options;
- int *opt_index;
+getopt_long (int argc, char *const *argv, const char *options,
+ const struct option *long_options, int *opt_index)
{
return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
}
@@ -82,12 +78,8 @@ getopt_long (argc, argv, options, long_options, opt_index)
instead. */
int
-getopt_long_only (argc, argv, options, long_options, opt_index)
- int argc;
- char *const *argv;
- const char *options;
- const struct option *long_options;
- int *opt_index;
+getopt_long_only (int argc, char *const *argv, const char *options,
+ const struct option *long_options, int *opt_index)
{
return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
}
@@ -100,9 +92,7 @@ getopt_long_only (argc, argv, options, long_options, opt_index)
#include <stdio.h>
int
-main (argc, argv)
- int argc;
- char **argv;
+main (int argc, char **argv)
{
int c;
int digit_optind = 0;
diff --git a/libiberty/getpagesize.c b/libiberty/getpagesize.c
index eed9680378a..1c3a26304ea 100644
--- a/libiberty/getpagesize.c
+++ b/libiberty/getpagesize.c
@@ -61,7 +61,7 @@ BUGS
#endif /* GNU_OUR_PAGESIZE */
int
-getpagesize ()
+getpagesize (void)
{
return (GNU_OUR_PAGESIZE);
}
@@ -76,7 +76,7 @@ getpagesize ()
#endif
extern unsigned long lib$getsyi(const unsigned short *,...);
-int getpagesize ()
+int getpagesize (void)
{
long pagsiz = 0L;
unsigned short itmcod = SYI$_PAGE_SIZE;
diff --git a/libiberty/getpwd.c b/libiberty/getpwd.c
index 31c7d20f307..e57ef47e947 100644
--- a/libiberty/getpwd.c
+++ b/libiberty/getpwd.c
@@ -67,7 +67,7 @@ extern char *getwd ();
yield 0 and set errno. */
char *
-getpwd ()
+getpwd (void)
{
static char *pwd;
static int failure_errno;
@@ -114,7 +114,7 @@ getpwd ()
#endif
char *
-getpwd ()
+getpwd (void)
{
static char *pwd = 0;
diff --git a/libiberty/getruntime.c b/libiberty/getruntime.c
index 3f7dc0d117a..c5aa018d2cc 100644
--- a/libiberty/getruntime.c
+++ b/libiberty/getruntime.c
@@ -90,7 +90,7 @@ process started.
*/
long
-get_run_time ()
+get_run_time (void)
{
#if defined (HAVE_GETRUSAGE) && defined (HAVE_SYS_RESOURCE_H)
struct rusage rusage;
diff --git a/libiberty/gettimeofday.c b/libiberty/gettimeofday.c
index f7e6c5dd377..a7f7836d24e 100644
--- a/libiberty/gettimeofday.c
+++ b/libiberty/gettimeofday.c
@@ -19,9 +19,7 @@ that @var{tz} be NULL. Returns 0 on success, -1 on failure.
*/
int
-gettimeofday (tp, tz)
- struct timeval *tp;
- void *tz;
+gettimeofday (struct timeval *tp, void *tz)
{
if (tz)
abort ();
diff --git a/libiberty/hashtab.c b/libiberty/hashtab.c
index 5882c1f3dad..d2b9c748157 100644
--- a/libiberty/hashtab.c
+++ b/libiberty/hashtab.c
@@ -73,14 +73,14 @@ Boston, MA 02111-1307, USA. */
#define DELETED_ENTRY ((PTR) 1)
-static unsigned int higher_prime_index PARAMS ((unsigned long));
-static hashval_t htab_mod_1 PARAMS ((hashval_t, hashval_t, hashval_t, int));
-static hashval_t htab_mod PARAMS ((hashval_t, htab_t));
-static hashval_t htab_mod_m2 PARAMS ((hashval_t, htab_t));
-static hashval_t hash_pointer PARAMS ((const void *));
-static int eq_pointer PARAMS ((const void *, const void *));
-static int htab_expand PARAMS ((htab_t));
-static PTR *find_empty_slot_for_expand PARAMS ((htab_t, hashval_t));
+static unsigned int higher_prime_index (unsigned long);
+static hashval_t htab_mod_1 (hashval_t, hashval_t, hashval_t, int);
+static hashval_t htab_mod (hashval_t, htab_t);
+static hashval_t htab_mod_m2 (hashval_t, htab_t);
+static hashval_t hash_pointer (const void *);
+static int eq_pointer (const void *, const void *);
+static int htab_expand (htab_t);
+static PTR *find_empty_slot_for_expand (htab_t, hashval_t);
/* At some point, we could make these be NULL, and modify the
hash-table routines to handle NULL specially; that would avoid
@@ -176,8 +176,7 @@ static struct prime_ent const prime_tab[] = {
nearest prime number which is greater than N, and near a power of two. */
static unsigned int
-higher_prime_index (n)
- unsigned long n;
+higher_prime_index (unsigned long n)
{
unsigned int low = 0;
unsigned int high = sizeof(prime_tab) / sizeof(prime_tab[0]);
@@ -204,8 +203,7 @@ higher_prime_index (n)
/* Returns a hash code for P. */
static hashval_t
-hash_pointer (p)
- const PTR p;
+hash_pointer (const PTR p)
{
return (hashval_t) ((long)p >> 3);
}
@@ -213,9 +211,7 @@ hash_pointer (p)
/* Returns non-zero if P1 and P2 are equal. */
static int
-eq_pointer (p1, p2)
- const PTR p1;
- const PTR p2;
+eq_pointer (const PTR p1, const PTR p2)
{
return p1 == p2;
}
@@ -223,8 +219,7 @@ eq_pointer (p1, p2)
/* Return the current size of given hash table. */
inline size_t
-htab_size (htab)
- htab_t htab;
+htab_size (htab_t htab)
{
return htab->size;
}
@@ -232,8 +227,7 @@ htab_size (htab)
/* Return the current number of elements in given hash table. */
inline size_t
-htab_elements (htab)
- htab_t htab;
+htab_elements (htab_t htab)
{
return htab->n_elements - htab->n_deleted;
}
@@ -241,9 +235,7 @@ htab_elements (htab)
/* Return X % Y. */
static inline hashval_t
-htab_mod_1 (x, y, inv, shift)
- hashval_t x, y, inv;
- int shift;
+htab_mod_1 (hashval_t x, hashval_t y, hashval_t inv, int shift)
{
/* The multiplicative inverses computed above are for 32-bit types, and
requires that we be able to compute a highpart multiply. */
@@ -271,9 +263,7 @@ htab_mod_1 (x, y, inv, shift)
/* Compute the primary hash for HASH given HTAB's current size. */
static inline hashval_t
-htab_mod (hash, htab)
- hashval_t hash;
- htab_t htab;
+htab_mod (hashval_t hash, htab_t htab)
{
const struct prime_ent *p = &prime_tab[htab->size_prime_index];
return htab_mod_1 (hash, p->prime, p->inv, p->shift);
@@ -282,9 +272,7 @@ htab_mod (hash, htab)
/* Compute the secondary hash for HASH given HTAB's current size. */
static inline hashval_t
-htab_mod_m2 (hash, htab)
- hashval_t hash;
- htab_t htab;
+htab_mod_m2 (hashval_t hash, htab_t htab)
{
const struct prime_ent *p = &prime_tab[htab->size_prime_index];
return 1 + htab_mod_1 (hash, p->prime - 2, p->inv_m2, p->shift);
@@ -296,13 +284,8 @@ htab_mod_m2 (hash, htab)
created hash table, or NULL if memory allocation fails. */
htab_t
-htab_create_alloc (size, hash_f, eq_f, del_f, alloc_f, free_f)
- size_t size;
- htab_hash hash_f;
- htab_eq eq_f;
- htab_del del_f;
- htab_alloc alloc_f;
- htab_free free_f;
+htab_create_alloc (size_t size, htab_hash hash_f, htab_eq eq_f,
+ htab_del del_f, htab_alloc alloc_f, htab_free free_f)
{
htab_t result;
unsigned int size_prime_index;
@@ -374,14 +357,9 @@ htab_create_alloc_ex (size, hash_f, eq_f, del_f, alloc_arg, alloc_f,
/* Update the function pointers and allocation parameter in the htab_t. */
void
-htab_set_functions_ex (htab, hash_f, eq_f, del_f, alloc_arg, alloc_f, free_f)
- htab_t htab;
- htab_hash hash_f;
- htab_eq eq_f;
- htab_del del_f;
- PTR alloc_arg;
- htab_alloc_with_arg alloc_f;
- htab_free_with_arg free_f;
+htab_set_functions_ex (htab_t htab, htab_hash hash_f, htab_eq eq_f,
+ htab_del del_f, PTR alloc_arg,
+ htab_alloc_with_arg alloc_f, htab_free_with_arg free_f)
{
htab->hash_f = hash_f;
htab->eq_f = eq_f;
@@ -395,21 +373,13 @@ htab_set_functions_ex (htab, hash_f, eq_f, del_f, alloc_arg, alloc_f, free_f)
#undef htab_create
htab_t
-htab_create (size, hash_f, eq_f, del_f)
- size_t size;
- htab_hash hash_f;
- htab_eq eq_f;
- htab_del del_f;
+htab_create (size_t size, htab_hash hash_f, htab_eq eq_f, htab_del del_f)
{
return htab_create_alloc (size, hash_f, eq_f, del_f, xcalloc, free);
}
htab_t
-htab_try_create (size, hash_f, eq_f, del_f)
- size_t size;
- htab_hash hash_f;
- htab_eq eq_f;
- htab_del del_f;
+htab_try_create (size_t size, htab_hash hash_f, htab_eq eq_f, htab_del del_f)
{
return htab_create_alloc (size, hash_f, eq_f, del_f, calloc, free);
}
@@ -418,8 +388,7 @@ htab_try_create (size, hash_f, eq_f, del_f)
Naturally the hash table must already exist. */
void
-htab_delete (htab)
- htab_t htab;
+htab_delete (htab_t htab)
{
size_t size = htab_size (htab);
PTR *entries = htab->entries;
@@ -445,8 +414,7 @@ htab_delete (htab)
/* This function clears all entries in the given hash table. */
void
-htab_empty (htab)
- htab_t htab;
+htab_empty (htab_t htab)
{
size_t size = htab_size (htab);
PTR *entries = htab->entries;
@@ -468,9 +436,7 @@ htab_empty (htab)
HASH is the hash value for the element to be inserted. */
static PTR *
-find_empty_slot_for_expand (htab, hash)
- htab_t htab;
- hashval_t hash;
+find_empty_slot_for_expand (htab_t htab, hashval_t hash)
{
hashval_t index = htab_mod (hash, htab);
size_t size = htab_size (htab);
@@ -506,8 +472,7 @@ find_empty_slot_for_expand (htab, hash)
expanded. If all goes well, it will return a non-zero value. */
static int
-htab_expand (htab)
- htab_t htab;
+htab_expand (htab_t htab)
{
PTR *oentries;
PTR *olimit;
@@ -575,10 +540,7 @@ htab_expand (htab)
element. It cannot be used to insert or delete an element. */
PTR
-htab_find_with_hash (htab, element, hash)
- htab_t htab;
- const PTR element;
- hashval_t hash;
+htab_find_with_hash (htab_t htab, const PTR element, hashval_t hash)
{
hashval_t index, hash2;
size_t size;
@@ -612,9 +574,7 @@ htab_find_with_hash (htab, element, hash)
element. */
PTR
-htab_find (htab, element)
- htab_t htab;
- const PTR element;
+htab_find (htab_t htab, const PTR element)
{
return htab_find_with_hash (htab, element, (*htab->hash_f) (element));
}
@@ -628,11 +588,8 @@ htab_find (htab, element)
allocation fails. */
PTR *
-htab_find_slot_with_hash (htab, element, hash, insert)
- htab_t htab;
- const PTR element;
- hashval_t hash;
- enum insert_option insert;
+htab_find_slot_with_hash (htab_t htab, const PTR element,
+ hashval_t hash, enum insert_option insert)
{
PTR *first_deleted_slot;
hashval_t index, hash2;
@@ -699,10 +656,7 @@ htab_find_slot_with_hash (htab, element, hash, insert)
element. */
PTR *
-htab_find_slot (htab, element, insert)
- htab_t htab;
- const PTR element;
- enum insert_option insert;
+htab_find_slot (htab_t htab, const PTR element, enum insert_option insert)
{
return htab_find_slot_with_hash (htab, element, (*htab->hash_f) (element),
insert);
@@ -713,9 +667,7 @@ htab_find_slot (htab, element, insert)
element in the hash table, this function does nothing. */
void
-htab_remove_elt (htab, element)
- htab_t htab;
- PTR element;
+htab_remove_elt (htab_t htab, PTR element)
{
htab_remove_elt_with_hash (htab, element, (*htab->hash_f) (element));
}
@@ -726,10 +678,7 @@ htab_remove_elt (htab, element)
function does nothing. */
void
-htab_remove_elt_with_hash (htab, element, hash)
- htab_t htab;
- PTR element;
- hashval_t hash;
+htab_remove_elt_with_hash (htab_t htab, PTR element, hashval_t hash)
{
PTR *slot;
@@ -749,9 +698,7 @@ htab_remove_elt_with_hash (htab, element, hash)
again. */
void
-htab_clear_slot (htab, slot)
- htab_t htab;
- PTR *slot;
+htab_clear_slot (htab_t htab, PTR *slot)
{
if (slot < htab->entries || slot >= htab->entries + htab_size (htab)
|| *slot == EMPTY_ENTRY || *slot == DELETED_ENTRY)
@@ -770,10 +717,7 @@ htab_clear_slot (htab, slot)
argument. */
void
-htab_traverse_noresize (htab, callback, info)
- htab_t htab;
- htab_trav callback;
- PTR info;
+htab_traverse_noresize (htab_t htab, htab_trav callback, PTR info)
{
PTR *slot;
PTR *limit;
@@ -796,10 +740,7 @@ htab_traverse_noresize (htab, callback, info)
too empty to improve effectivity of subsequent calls. */
void
-htab_traverse (htab, callback, info)
- htab_t htab;
- htab_trav callback;
- PTR info;
+htab_traverse (htab_t htab, htab_trav callback, PTR info)
{
if (htab_elements (htab) * 8 < htab_size (htab))
htab_expand (htab);
@@ -811,8 +752,7 @@ htab_traverse (htab, callback, info)
hash table. */
double
-htab_collisions (htab)
- htab_t htab;
+htab_collisions (htab_t htab)
{
if (htab->searches == 0)
return 0.0;
@@ -846,8 +786,7 @@ htab_collisions (htab)
function they just started using for Perl's hashes. */
hashval_t
-htab_hash_string (p)
- const PTR p;
+htab_hash_string (const PTR p)
{
const unsigned char *str = (const unsigned char *) p;
hashval_t r = 0;
@@ -936,10 +875,11 @@ acceptable. Do NOT use for cryptographic purposes.
--------------------------------------------------------------------
*/
-hashval_t iterative_hash (k_in, length, initval)
- const PTR k_in; /* the key */
- register size_t length; /* the length of the key */
- register hashval_t initval; /* the previous hash, or an arbitrary value */
+hashval_t
+iterative_hash (const PTR k_in /* the key */,
+ register size_t length /* the length of the key */,
+ register hashval_t initval /* the previous hash, or
+ an arbitrary value */)
{
register const unsigned char *k = (const unsigned char *)k_in;
register hashval_t a,b,c,len;
diff --git a/libiberty/hex.c b/libiberty/hex.c
index d30f199224e..9e4e306a7d4 100644
--- a/libiberty/hex.c
+++ b/libiberty/hex.c
@@ -153,7 +153,7 @@ unsigned char _hex_value[_hex_array_size];
#endif /* not ASCII */
void
-hex_init ()
+hex_init (void)
{
#ifndef HEX_TABLE_INITIALIZED
int i;
diff --git a/libiberty/index.c b/libiberty/index.c
index a2e272783b9..c37edca024e 100644
--- a/libiberty/index.c
+++ b/libiberty/index.c
@@ -12,12 +12,10 @@ deprecated in new programs in favor of @code{strchr}.
*/
-extern char * strchr();
+extern char * strchr(const char *, int);
char *
-index (s, c)
- char *s;
- int c;
+index (char *s, int c)
{
return strchr (s, c);
}
diff --git a/libiberty/insque.c b/libiberty/insque.c
index c0c1180d421..3473bb92b31 100644
--- a/libiberty/insque.c
+++ b/libiberty/insque.c
@@ -33,9 +33,7 @@ struct qelem {
void
-insque (elem, pred)
- struct qelem *elem;
- struct qelem *pred;
+insque (struct qelem *elem, struct qelem *pred)
{
elem -> q_forw = pred -> q_forw;
pred -> q_forw -> q_back = elem;
@@ -45,8 +43,7 @@ insque (elem, pred)
void
-remque (elem)
- struct qelem *elem;
+remque (struct qelem *elem)
{
elem -> q_forw -> q_back = elem -> q_back;
elem -> q_back -> q_forw = elem -> q_forw;
diff --git a/libiberty/lbasename.c b/libiberty/lbasename.c
index 200a87f2387..4afe890013e 100644
--- a/libiberty/lbasename.c
+++ b/libiberty/lbasename.c
@@ -43,8 +43,7 @@ and a path ending in @code{/} returns the empty string after it.
#include "filenames.h"
const char *
-lbasename (name)
- const char *name;
+lbasename (const char *name)
{
const char *base;
diff --git a/libiberty/lrealpath.c b/libiberty/lrealpath.c
index 4877753cd66..24795fa99e7 100644
--- a/libiberty/lrealpath.c
+++ b/libiberty/lrealpath.c
@@ -73,8 +73,7 @@ extern char *canonicalize_file_name (const char *);
#endif
char *
-lrealpath (filename)
- const char *filename;
+lrealpath (const char *filename)
{
/* Method 1: The system has a compile time upper bound on a filename
path. Use that and realpath() to canonicalize the name. This is
diff --git a/libiberty/make-relative-prefix.c b/libiberty/make-relative-prefix.c
index dc4f8d5259d..3d40c5f2220 100644
--- a/libiberty/make-relative-prefix.c
+++ b/libiberty/make-relative-prefix.c
@@ -95,14 +95,12 @@ relative prefix can be found, return @code{NULL}.
#define DIR_UP ".."
-static char *save_string PARAMS ((const char *, int));
-static char **split_directories PARAMS ((const char *, int *));
-static void free_split_directories PARAMS ((char **));
+static char *save_string (const char *, int);
+static char **split_directories (const char *, int *);
+static void free_split_directories (char **);
static char *
-save_string (s, len)
- const char *s;
- int len;
+save_string (const char *s, int len)
{
char *result = malloc (len + 1);
@@ -114,9 +112,7 @@ save_string (s, len)
/* Split a filename into component directories. */
static char **
-split_directories (name, ptr_num_dirs)
- const char *name;
- int *ptr_num_dirs;
+split_directories (const char *name, int *ptr_num_dirs)
{
int num_dirs = 0;
char **dirs;
@@ -201,8 +197,7 @@ split_directories (name, ptr_num_dirs)
/* Release storage held by split directories. */
static void
-free_split_directories (dirs)
- char **dirs;
+free_split_directories (char **dirs)
{
int i = 0;
@@ -223,10 +218,8 @@ free_split_directories (dirs)
If no relative prefix can be found, return NULL. */
char *
-make_relative_prefix (progname, bin_prefix, prefix)
- const char *progname;
- const char *bin_prefix;
- const char *prefix;
+make_relative_prefix (const char *progname,
+ const char *bin_prefix, const char *prefix)
{
char **prog_dirs, **bin_dirs, **prefix_dirs;
int prog_num, bin_num, prefix_num;
diff --git a/libiberty/make-temp-file.c b/libiberty/make-temp-file.c
index 883350479fc..71fb7037f46 100644
--- a/libiberty/make-temp-file.c
+++ b/libiberty/make-temp-file.c
@@ -43,7 +43,7 @@ Boston, MA 02111-1307, USA. */
#endif
#include "libiberty.h"
-extern int mkstemps PARAMS ((char *, int));
+extern int mkstemps (char *, int);
/* '/' works just fine on MS-DOS based systems. */
#ifndef DIR_SEPARATOR
@@ -61,11 +61,10 @@ extern int mkstemps PARAMS ((char *, int));
If success, DIR is returned.
Otherwise NULL is returned. */
-static inline const char *try PARAMS ((const char *, const char *));
+static inline const char *try (const char *, const char *);
static inline const char *
-try (dir, base)
- const char *dir, *base;
+try (const char *dir, const char *base)
{
if (base != 0)
return base;
@@ -95,7 +94,7 @@ files in.
*/
char *
-choose_tmpdir ()
+choose_tmpdir (void)
{
const char *base = 0;
char *tmpdir;
@@ -146,8 +145,7 @@ string is @code{malloc}ed, and the temporary file has been created.
*/
char *
-make_temp_file (suffix)
- const char *suffix;
+make_temp_file (const char *suffix)
{
const char *base = choose_tmpdir ();
char *temp_filename;
diff --git a/libiberty/md5.c b/libiberty/md5.c
index e458f2a6a64..4468c7742c1 100644
--- a/libiberty/md5.c
+++ b/libiberty/md5.c
@@ -62,8 +62,7 @@ static const unsigned char fillbuf[64] = { 0x80, 0 /* , 0, 0, ... */ };
/* Initialize structure containing state of computation.
(RFC 1321, 3.3: Step 3) */
void
-md5_init_ctx (ctx)
- struct md5_ctx *ctx;
+md5_init_ctx (struct md5_ctx *ctx)
{
ctx->A = (md5_uint32) 0x67452301;
ctx->B = (md5_uint32) 0xefcdab89;
@@ -80,9 +79,7 @@ md5_init_ctx (ctx)
IMPORTANT: On some systems it is required that RESBUF is correctly
aligned for a 32 bits value. */
void *
-md5_read_ctx (ctx, resbuf)
- const struct md5_ctx *ctx;
- void *resbuf;
+md5_read_ctx (const struct md5_ctx *ctx, void *resbuf)
{
((md5_uint32 *) resbuf)[0] = SWAP (ctx->A);
((md5_uint32 *) resbuf)[1] = SWAP (ctx->B);
@@ -98,9 +95,7 @@ md5_read_ctx (ctx, resbuf)
IMPORTANT: On some systems it is required that RESBUF is correctly
aligned for a 32 bits value. */
void *
-md5_finish_ctx (ctx, resbuf)
- struct md5_ctx *ctx;
- void *resbuf;
+md5_finish_ctx (struct md5_ctx *ctx, void *resbuf)
{
/* Take yet unprocessed bytes into account. */
md5_uint32 bytes = ctx->buflen;
@@ -129,9 +124,7 @@ md5_finish_ctx (ctx, resbuf)
resulting message digest number will be written into the 16 bytes
beginning at RESBLOCK. */
int
-md5_stream (stream, resblock)
- FILE *stream;
- void *resblock;
+md5_stream (FILE *stream, void *resblock)
{
/* Important: BLOCKSIZE must be a multiple of 64. */
#define BLOCKSIZE 4096
@@ -186,10 +179,7 @@ md5_stream (stream, resblock)
output yields to the wanted ASCII representation of the message
digest. */
void *
-md5_buffer (buffer, len, resblock)
- const char *buffer;
- size_t len;
- void *resblock;
+md5_buffer (const char *buffer, size_t len, void *resblock)
{
struct md5_ctx ctx;
@@ -205,10 +195,7 @@ md5_buffer (buffer, len, resblock)
void
-md5_process_bytes (buffer, len, ctx)
- const void *buffer;
- size_t len;
- struct md5_ctx *ctx;
+md5_process_bytes (const void *buffer, size_t len, struct md5_ctx *ctx)
{
/* When we already have some bits in our internal buffer concatenate
both inputs first. */
@@ -263,10 +250,7 @@ md5_process_bytes (buffer, len, ctx)
It is assumed that LEN % 64 == 0. */
void
-md5_process_block (buffer, len, ctx)
- const void *buffer;
- size_t len;
- struct md5_ctx *ctx;
+md5_process_block (const void *buffer, size_t len, struct md5_ctx *ctx)
{
md5_uint32 correct_words[16];
const md5_uint32 *words = (const md5_uint32 *) buffer;
diff --git a/libiberty/memchr.c b/libiberty/memchr.c
index 3948125963d..451f817d320 100644
--- a/libiberty/memchr.c
+++ b/libiberty/memchr.c
@@ -15,17 +15,10 @@ returned.
*/
#include <ansidecl.h>
-#ifdef ANSI_PROTOTYPES
#include <stddef.h>
-#else
-#define size_t unsigned long
-#endif
PTR
-memchr (src_void, c, length)
- register const PTR src_void;
- int c;
- size_t length;
+memchr (register const PTR src_void, int c, size_t length)
{
const unsigned char *src = (const unsigned char *)src_void;
diff --git a/libiberty/memcmp.c b/libiberty/memcmp.c
index 92f2b6e6425..39edfca98a6 100644
--- a/libiberty/memcmp.c
+++ b/libiberty/memcmp.c
@@ -16,17 +16,10 @@ as if comparing unsigned char arrays.
*/
#include <ansidecl.h>
-#ifdef ANSI_PROTOTYPES
#include <stddef.h>
-#else
-#define size_t unsigned long
-#endif
int
-memcmp (str1, str2, count)
- const PTR str1;
- const PTR str2;
- size_t count;
+memcmp (const PTR str1, const PTR str2, size_t count)
{
register const unsigned char *s1 = (const unsigned char*)str1;
register const unsigned char *s2 = (const unsigned char*)str2;
diff --git a/libiberty/memcpy.c b/libiberty/memcpy.c
index 5eece7a0a00..8a97b85b06a 100644
--- a/libiberty/memcpy.c
+++ b/libiberty/memcpy.c
@@ -19,13 +19,10 @@ Copies @var{length} bytes from memory region @var{in} to region
#define size_t unsigned long
#endif
-void bcopy PARAMS((const void*, void*, size_t));
+void bcopy (const void*, void*, size_t);
PTR
-memcpy (out, in, length)
- PTR out;
- const PTR in;
- size_t length;
+memcpy (PTR out, const PTR in, size_t length)
{
bcopy(in, out, length);
return out;
diff --git a/libiberty/memmove.c b/libiberty/memmove.c
index 00ac053401b..30801f2d1c4 100644
--- a/libiberty/memmove.c
+++ b/libiberty/memmove.c
@@ -19,13 +19,10 @@ Copies @var{count} bytes from memory area @var{from} to memory area
#define size_t unsigned long
#endif
-void bcopy PARAMS ((const void*, void*, size_t));
+void bcopy (const void*, void*, size_t);
PTR
-memmove (s1, s2, n)
- PTR s1;
- const PTR s2;
- size_t n;
+memmove (PTR s1, const PTR s2, size_t n)
{
bcopy (s2, s1, n);
return s1;
diff --git a/libiberty/mempcpy.c b/libiberty/mempcpy.c
index b0dccfa6167..ebd105c3e44 100644
--- a/libiberty/mempcpy.c
+++ b/libiberty/mempcpy.c
@@ -1,5 +1,5 @@
/* Implement the mempcpy function.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
Written by Kaveh R. Ghazi <ghazi@caip.rutgers.edu>.
This file is part of the libiberty library.
@@ -30,19 +30,12 @@ Copies @var{length} bytes from memory region @var{in} to region
*/
#include <ansidecl.h>
-#ifdef ANSI_PROTOTYPES
#include <stddef.h>
-#else
-#define size_t unsigned long
-#endif
-extern PTR memcpy PARAMS ((PTR, const PTR, size_t));
+extern PTR memcpy (PTR, const PTR, size_t);
PTR
-mempcpy (dst, src, len)
- PTR dst;
- const PTR src;
- size_t len;
+mempcpy (PTR dst, const PTR src, size_t len)
{
return (char *) memcpy (dst, src, len) + len;
}
diff --git a/libiberty/memset.c b/libiberty/memset.c
index 5119f858ad0..1951ad6bd61 100644
--- a/libiberty/memset.c
+++ b/libiberty/memset.c
@@ -13,17 +13,10 @@ Sets the first @var{count} bytes of @var{s} to the constant byte
*/
#include <ansidecl.h>
-#ifdef ANSI_PROTOTYPES
#include <stddef.h>
-#else
-#define size_t unsigned long
-#endif
PTR
-memset (dest, val, len)
- PTR dest;
- register int val;
- register size_t len;
+memset (PTR dest, register int val, register size_t len)
{
register unsigned char *ptr = (unsigned char*)dest;
while (len-- > 0)
diff --git a/libiberty/mkstemps.c b/libiberty/mkstemps.c
index 94edf78755b..5963f58baf4 100644
--- a/libiberty/mkstemps.c
+++ b/libiberty/mkstemps.c
@@ -71,9 +71,7 @@ reading and writing.
*/
int
-mkstemps (template, suffix_len)
- char *template;
- int suffix_len;
+mkstemps (char *template, int suffix_len)
{
static const char letters[]
= "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
diff --git a/libiberty/objalloc.c b/libiberty/objalloc.c
index 1cda7b98619..a06047d00f6 100644
--- a/libiberty/objalloc.c
+++ b/libiberty/objalloc.c
@@ -39,8 +39,8 @@ Boston, MA 02111-1307, USA. */
#include <stdlib.h>
#else
/* For systems with larger pointers than ints, this must be declared. */
-extern PTR malloc PARAMS ((size_t));
-extern void free PARAMS ((PTR));
+extern PTR malloc (size_t);
+extern void free (PTR);
#endif
#endif
@@ -85,7 +85,7 @@ struct objalloc_chunk
/* Create an objalloc structure. */
struct objalloc *
-objalloc_create ()
+objalloc_create (void)
{
struct objalloc *ret;
struct objalloc_chunk *chunk;
@@ -114,9 +114,7 @@ objalloc_create ()
/* Allocate space from an objalloc structure. */
PTR
-_objalloc_alloc (o, len)
- struct objalloc *o;
- unsigned long len;
+_objalloc_alloc (struct objalloc *o, unsigned long len)
{
/* We avoid confusion from zero sized objects by always allocating
at least 1 byte. */
@@ -171,8 +169,7 @@ _objalloc_alloc (o, len)
/* Free an entire objalloc structure. */
void
-objalloc_free (o)
- struct objalloc *o;
+objalloc_free (struct objalloc *o)
{
struct objalloc_chunk *l;
@@ -193,9 +190,7 @@ objalloc_free (o)
recently allocated blocks. */
void
-objalloc_free_block (o, block)
- struct objalloc *o;
- PTR block;
+objalloc_free_block (struct objalloc *o, PTR block)
{
struct objalloc_chunk *p, *small;
char *b = (char *) block;
diff --git a/libiberty/obstack.c b/libiberty/obstack.c
index 02560c9e032..1e12a8716e0 100644
--- a/libiberty/obstack.c
+++ b/libiberty/obstack.c
@@ -52,11 +52,7 @@
#ifndef ELIDE_CODE
-#if defined (__STDC__) && __STDC__
#define POINTER void *
-#else
-#define POINTER char *
-#endif
/* Determine default alignment. */
struct fooalign {char x; double d;};
@@ -81,13 +77,8 @@ union fooround {long x; double d;};
jump to the handler pointed to by `obstack_alloc_failed_handler'.
This variable by default points to the internal function
`print_and_abort'. */
-#if defined (__STDC__) && __STDC__
static void print_and_abort (void);
void (*obstack_alloc_failed_handler) (void) = print_and_abort;
-#else
-static void print_and_abort ();
-void (*obstack_alloc_failed_handler) () = print_and_abort;
-#endif
/* Exit value used when `print_and_abort' is used. */
#if defined __GNU_LIBRARY__ || defined HAVE_STDLIB_H
@@ -148,17 +139,8 @@ struct obstack *_obstack;
free up some memory, then call this again. */
int
-_obstack_begin (h, size, alignment, chunkfun, freefun)
- struct obstack *h;
- int size;
- int alignment;
-#if defined (__STDC__) && __STDC__
- POINTER (*chunkfun) (long);
- void (*freefun) (void *);
-#else
- POINTER (*chunkfun) ();
- void (*freefun) ();
-#endif
+_obstack_begin (struct obstack *h, int size, int alignment,
+ POINTER (*chunkfun) (long), void (*freefun) (void *))
{
register struct _obstack_chunk *chunk; /* points to new chunk */
@@ -181,13 +163,8 @@ _obstack_begin (h, size, alignment, chunkfun, freefun)
size = 4096 - extra;
}
-#if defined (__STDC__) && __STDC__
h->chunkfun = (struct _obstack_chunk * (*)(void *, long)) chunkfun;
h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun;
-#else
- h->chunkfun = (struct _obstack_chunk * (*)()) chunkfun;
- h->freefun = freefun;
-#endif
h->chunk_size = size;
h->alignment_mask = alignment - 1;
h->use_extra_arg = 0;
@@ -206,18 +183,9 @@ _obstack_begin (h, size, alignment, chunkfun, freefun)
}
int
-_obstack_begin_1 (h, size, alignment, chunkfun, freefun, arg)
- struct obstack *h;
- int size;
- int alignment;
-#if defined (__STDC__) && __STDC__
- POINTER (*chunkfun) (POINTER, long);
- void (*freefun) (POINTER, POINTER);
-#else
- POINTER (*chunkfun) ();
- void (*freefun) ();
-#endif
- POINTER arg;
+_obstack_begin_1 (struct obstack *h, int size, int alignment,
+ POINTER (*chunkfun) (POINTER, long),
+ void (*freefun) (POINTER, POINTER), POINTER arg)
{
register struct _obstack_chunk *chunk; /* points to new chunk */
@@ -240,13 +208,8 @@ _obstack_begin_1 (h, size, alignment, chunkfun, freefun, arg)
size = 4096 - extra;
}
-#if defined(__STDC__) && __STDC__
h->chunkfun = (struct _obstack_chunk * (*)(void *,long)) chunkfun;
h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun;
-#else
- h->chunkfun = (struct _obstack_chunk * (*)()) chunkfun;
- h->freefun = freefun;
-#endif
h->chunk_size = size;
h->alignment_mask = alignment - 1;
h->extra_arg = arg;
@@ -272,9 +235,7 @@ _obstack_begin_1 (h, size, alignment, chunkfun, freefun, arg)
to the beginning of the new one. */
void
-_obstack_newchunk (h, length)
- struct obstack *h;
- int length;
+_obstack_newchunk (struct obstack *h, int length)
{
register struct _obstack_chunk *old_chunk = h->chunk;
register struct _obstack_chunk *new_chunk;
@@ -335,16 +296,12 @@ _obstack_newchunk (h, length)
This is here for debugging.
If you use it in a program, you are probably losing. */
-#if defined (__STDC__) && __STDC__
/* Suppress -Wmissing-prototypes warning. We don't want to declare this in
obstack.h because it is just for debugging. */
int _obstack_allocated_p (struct obstack *h, POINTER obj);
-#endif
int
-_obstack_allocated_p (h, obj)
- struct obstack *h;
- POINTER obj;
+_obstack_allocated_p (struct obstack *h, POINTER obj)
{
register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
register struct _obstack_chunk *plp; /* point to previous chunk if any */
@@ -370,9 +327,7 @@ _obstack_allocated_p (h, obj)
This is the first one, called from non-ANSI code. */
void
-_obstack_free (h, obj)
- struct obstack *h;
- POINTER obj;
+_obstack_free (struct obstack *h, POINTER obj)
{
register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
register struct _obstack_chunk *plp; /* point to previous chunk if any */
@@ -404,9 +359,7 @@ _obstack_free (h, obj)
/* This function is used from ANSI code. */
void
-obstack_free (h, obj)
- struct obstack *h;
- POINTER obj;
+obstack_free (struct obstack *h, POINTER obj)
{
register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
register struct _obstack_chunk *plp; /* point to previous chunk if any */
@@ -436,8 +389,7 @@ obstack_free (h, obj)
}
int
-_obstack_memory_used (h)
- struct obstack *h;
+_obstack_memory_used (struct obstack *h)
{
register struct _obstack_chunk* lp;
register int nbytes = 0;
@@ -462,7 +414,7 @@ _obstack_memory_used (h)
#endif
static void
-print_and_abort ()
+print_and_abort (void)
{
fputs (_("memory exhausted\n"), stderr);
exit (obstack_exit_failure);
@@ -475,119 +427,84 @@ print_and_abort ()
/* Now define the functional versions of the obstack macros.
Define them to simply use the corresponding macros to do the job. */
-#if defined (__STDC__) && __STDC__
-/* These function definitions do not work with non-ANSI preprocessors;
- they won't pass through the macro names in parentheses. */
-
/* The function names appear in parentheses in order to prevent
the macro-definitions of the names from being expanded there. */
-POINTER (obstack_base) (obstack)
- struct obstack *obstack;
+POINTER (obstack_base) (struct obstack *obstack)
{
return obstack_base (obstack);
}
-POINTER (obstack_next_free) (obstack)
- struct obstack *obstack;
+POINTER (obstack_next_free) (struct obstack *obstack)
{
return obstack_next_free (obstack);
}
-int (obstack_object_size) (obstack)
- struct obstack *obstack;
+int (obstack_object_size) (struct obstack *obstack)
{
return obstack_object_size (obstack);
}
-int (obstack_room) (obstack)
- struct obstack *obstack;
+int (obstack_room) (struct obstack *obstack)
{
return obstack_room (obstack);
}
-int (obstack_make_room) (obstack, length)
- struct obstack *obstack;
- int length;
+int (obstack_make_room) (struct obstack *obstack, int length)
{
return obstack_make_room (obstack, length);
}
-void (obstack_grow) (obstack, pointer, length)
- struct obstack *obstack;
- POINTER pointer;
- int length;
+void (obstack_grow) (struct obstack *obstack, POINTER pointer, int length)
{
obstack_grow (obstack, pointer, length);
}
-void (obstack_grow0) (obstack, pointer, length)
- struct obstack *obstack;
- POINTER pointer;
- int length;
+void (obstack_grow0) (struct obstack *obstack, POINTER pointer, int length)
{
obstack_grow0 (obstack, pointer, length);
}
-void (obstack_1grow) (obstack, character)
- struct obstack *obstack;
- int character;
+void (obstack_1grow) (struct obstack *obstack, int character)
{
obstack_1grow (obstack, character);
}
-void (obstack_blank) (obstack, length)
- struct obstack *obstack;
- int length;
+void (obstack_blank) (struct obstack *obstack, int length)
{
obstack_blank (obstack, length);
}
-void (obstack_1grow_fast) (obstack, character)
- struct obstack *obstack;
- int character;
+void (obstack_1grow_fast) (struct obstack *obstack, int character)
{
obstack_1grow_fast (obstack, character);
}
-void (obstack_blank_fast) (obstack, length)
- struct obstack *obstack;
- int length;
+void (obstack_blank_fast) (struct obstack *obstack, int length)
{
obstack_blank_fast (obstack, length);
}
-POINTER (obstack_finish) (obstack)
- struct obstack *obstack;
+POINTER (obstack_finish) (struct obstack *obstack)
{
return obstack_finish (obstack);
}
-POINTER (obstack_alloc) (obstack, length)
- struct obstack *obstack;
- int length;
+POINTER (obstack_alloc) (struct obstack *obstack, int length)
{
return obstack_alloc (obstack, length);
}
-POINTER (obstack_copy) (obstack, pointer, length)
- struct obstack *obstack;
- POINTER pointer;
- int length;
+POINTER (obstack_copy) (struct obstack *obstack, POINTER pointer, int length)
{
return obstack_copy (obstack, pointer, length);
}
-POINTER (obstack_copy0) (obstack, pointer, length)
- struct obstack *obstack;
- POINTER pointer;
- int length;
+POINTER (obstack_copy0) (struct obstack *obstack, POINTER pointer, int length)
{
return obstack_copy0 (obstack, pointer, length);
}
-#endif /* __STDC__ */
-
#endif /* 0 */
#endif /* !ELIDE_CODE */
diff --git a/libiberty/partition.c b/libiberty/partition.c
index 07154722079..24a99122d55 100644
--- a/libiberty/partition.c
+++ b/libiberty/partition.c
@@ -34,14 +34,13 @@
#include "libiberty.h"
#include "partition.h"
-static int elem_compare PARAMS ((const void *, const void *));
+static int elem_compare (const void *, const void *);
/* Creates a partition of NUM_ELEMENTS elements. Initially each
element is in a class by itself. */
partition
-partition_new (num_elements)
- int num_elements;
+partition_new (int num_elements)
{
int e;
@@ -62,8 +61,7 @@ partition_new (num_elements)
/* Freeds a partition. */
void
-partition_delete (part)
- partition part;
+partition_delete (partition part)
{
free (part);
}
@@ -74,10 +72,7 @@ partition_delete (part)
resulting union class. */
int
-partition_union (part, elem1, elem2)
- partition part;
- int elem1;
- int elem2;
+partition_union (partition part, int elem1, int elem2)
{
struct partition_elem *elements = part->elements;
struct partition_elem *e1;
@@ -126,9 +121,7 @@ partition_union (part, elem1, elem2)
pointer to each. Used to qsort such an array. */
static int
-elem_compare (elem1, elem2)
- const void *elem1;
- const void *elem2;
+elem_compare (const void *elem1, const void *elem2)
{
int e1 = * (const int *) elem1;
int e2 = * (const int *) elem2;
@@ -144,9 +137,7 @@ elem_compare (elem1, elem2)
class are sorted. */
void
-partition_print (part, fp)
- partition part;
- FILE *fp;
+partition_print (partition part, FILE *fp)
{
char *done;
int num_elements = part->num_elements;
diff --git a/libiberty/pex-common.h b/libiberty/pex-common.h
index df3c0f6519c..c0b47fe348e 100644
--- a/libiberty/pex-common.h
+++ b/libiberty/pex-common.h
@@ -24,6 +24,7 @@ Boston, MA 02111-1307, USA. */
#include "config.h"
#include "libiberty.h"
+#include <stdio.h>
#define install_error_msg "installation problem, cannot exec `%s'"
@@ -42,4 +43,87 @@ Boston, MA 02111-1307, USA. */
/* value of `pipe': port index for writing. */
#define WRITE_PORT 1
+/* The structure used by pex_init and friends. */
+
+struct pex_obj
+{
+ /* Flags. */
+ int flags;
+ /* Name of calling program, for error messages. */
+ const char *pname;
+ /* Base name to use for temporary files. */
+ const char *tempbase;
+ /* Pipe to use as stdin for next process. */
+ int next_input;
+ /* File name to use as stdin for next process. */
+ char *next_input_name;
+ /* Whether next_input_name was allocated using malloc. */
+ int next_input_name_allocated;
+ /* Number of child processes. */
+ int count;
+ /* PIDs of child processes; array allocated using maloc. */
+ long *children;
+ /* Exit statuses of child processes; array allocated using malloc. */
+ int *status;
+ /* Time used by child processes; array allocated using malloc. */
+ struct pex_time *time;
+ /* Number of children we have already waited for. */
+ int number_waited;
+ /* FILE created by pex_read_output. */
+ FILE *read_output;
+ /* Number of temporary files to remove. */
+ int remove_count;
+ /* List of temporary files to remove; array allocated using malloc
+ of strings allocated using malloc. */
+ char **remove;
+ /* Pointers to system dependent functions. */
+ const struct pex_funcs *funcs;
+ /* For use by system dependent code. */
+ void *sysdep;
+};
+
+/* Functions passed to pex_run_common. */
+
+struct pex_funcs
+{
+ /* Open file NAME for reading. If BINARY is non-zero, open in
+ binary mode. Return >= 0 on success, -1 on error. */
+ int (*open_read) (struct pex_obj *, const char *name, int binary);
+ /* Open file NAME for writing. If BINARY is non-zero, open in
+ binary mode. Return >= 0 on success, -1 on error. */
+ int (*open_write) (struct pex_obj *, const char *name, int binary);
+ /* Execute a child process. FLAGS, EXECUTABLE, ARGV, ERR are from
+ pex_run. IN, OUT, ERRDES are each a descriptor, from open_read,
+ open_write, or pipe, or they are one of STDIN_FILE_NO,
+ STDOUT_FILE_NO or STDERR_FILE_NO; if not STD*_FILE_NO, they
+ should be closed. The function should handle the
+ PEX_STDERR_TO_STDOUT flag. Return >= 0 on success, or -1 on
+ error and set *ERRMSG and *ERR. */
+ long (*exec_child) (struct pex_obj *, int flags, const char *executable,
+ char * const * argv, int in, int out, int errdes,
+ const char **errmsg, int *err);
+ /* Close a descriptor. Return 0 on success, -1 on error. */
+ int (*close) (struct pex_obj *, int);
+ /* Wait for a child to complete, returning exit status in *STATUS
+ and time in *TIME (if it is not null). CHILD is from fork. DONE
+ is 1 if this is called via pex_free. ERRMSG and ERR are as in
+ fork. Return 0 on success, -1 on error. */
+ int (*wait) (struct pex_obj *, long, int *status, struct pex_time *time,
+ int done, const char **errmsg, int *err);
+ /* Create a pipe (only called if PEX_USE_PIPES is set) storing two
+ descriptin in *P. If BINARY is non-zero, open in binary mode.
+ Return 0 on success, -1 on error. */
+ int (*pipe) (struct pex_obj *, int *p, int binary);
+ /* Get a FILE pointer to read from a file descriptor (only called if
+ PEX_USE_PIPES is set). If BINARY is non-zero, open in binary
+ mode. Return pointer on success, NULL on error. */
+ FILE * (*fdopenr) (struct pex_obj *, int fd, int binary);
+ /* Free any system dependent data associated with OBJ. May be
+ NULL if there is nothing to do. */
+ void (*cleanup) (struct pex_obj *);
+};
+
+extern struct pex_obj *pex_init_common (int, const char *, const char *,
+ const struct pex_funcs *);
+
#endif
diff --git a/libiberty/pex-djgpp.c b/libiberty/pex-djgpp.c
index 968e7841215..c15f576f79a 100644
--- a/libiberty/pex-djgpp.c
+++ b/libiberty/pex-djgpp.c
@@ -1,6 +1,6 @@
/* Utilities to execute a program in a subprocess (possibly linked by pipes
with other subprocesses), and wait for it. DJGPP specialization.
- Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003
+ Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2005
Free Software Foundation, Inc.
This file is part of the libiberty library.
@@ -38,66 +38,246 @@ extern int errno;
#define PWAIT_ERROR EINVAL
#endif
-/* MSDOS doesn't multitask, but for the sake of a consistent interface
- the code behaves like it does. pexecute runs the program, tucks the
- exit code away, and returns a "pid". pwait must be called to fetch the
- exit code. */
-
-/* For communicating information from pexecute to pwait. */
-static int last_pid = 0;
-static int last_status = 0;
-static int last_reaped = 0;
-
-int
-pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags)
- const char *program;
- char * const *argv;
- const char *this_pname;
- const char *temp_base;
- char **errmsg_fmt, **errmsg_arg;
- int flags;
+static int pex_djgpp_open_read (struct pex_obj *, const char *, int);
+static int pex_djgpp_open_write (struct pex_obj *, const char *, int);
+static long pex_djgpp_exec_child (struct pex_obj *, int, const char *,
+ char * const *, int, int, int,
+ const char **, int *);
+static int pex_djgpp_close (struct pex_obj *, int);
+static int pex_djgpp_wait (struct pex_obj *, long, int *, struct pex_time *,
+ int, const char **, int *);
+
+/* The list of functions we pass to the common routines. */
+
+const struct pex_funcs funcs =
{
- int rc;
+ pex_djgpp_open_read,
+ pex_djgpp_open_write,
+ pex_djgpp_exec_child,
+ pex_djgpp_close,
+ pex_djgpp_wait,
+ NULL, /* pipe */
+ NULL, /* fdopenr */
+ NULL /* cleanup */
+};
- last_pid++;
- if (last_pid < 0)
- last_pid = 1;
+/* Return a newly initialized pex_obj structure. */
- if ((flags & PEXECUTE_ONE) != PEXECUTE_ONE)
- abort ();
+struct pex_obj *
+pex_init (int flags, const char *pname, const char *tempbase)
+{
+ /* DJGPP does not support pipes. */
+ flags &= ~ PEX_USE_PIPES;
+ return pex_init_common (flags, pname, tempbase, funcs);
+}
- /* ??? What are the possible return values from spawnv? */
- rc = (flags & PEXECUTE_SEARCH ? spawnvp : spawnv) (P_WAIT, program, argv);
+/* Open a file for reading. */
- if (rc == -1)
- {
- *errmsg_fmt = install_error_msg;
- *errmsg_arg = (char *)program;
- return -1;
- }
+static int
+pex_djgpp_open_read (struct pex_obj *obj ATTRIBUTE_UNUSED,
+ const char *name, int binary)
+{
+ return open (name, O_RDONLY | (binary ? O_BINARY : O_TEXT));
+}
+
+/* Open a file for writing. */
- /* Tuck the status away for pwait, and return a "pid". */
- last_status = rc << 8;
- return last_pid;
+static int
+pex_djgpp_open_write (struct pex_obj *obj ATTRIBUTE_UNUSED,
+ const char *name, int binary)
+{
+ /* Note that we can't use O_EXCL here because gcc may have already
+ created the temporary file via make_temp_file. */
+ return open (name,
+ (O_WRONLY | O_CREAT | O_TRUNC
+ | (binary ? O_BINARY : O_TEXT)),
+ S_IRUSR | S_IWUSR);
}
-int
-pwait (pid, status, flags)
- int pid;
- int *status;
- int flags;
+/* Close a file. */
+
+static int
+pex_djgpp_close (struct pex_obj *obj ATTRIBUTE_UNUSED, int fd)
{
- /* On MSDOS each pexecute must be followed by its associated pwait. */
- if (pid != last_pid
- /* Called twice for the same child? */
- || pid == last_reaped)
+ return close (fd);
+}
+
+/* Execute a child. */
+
+static long
+pex_djgpp_exec_child (struct pex_obj *obj, int flags, const char *executable,
+ char * const * argv, int in, int out, int errdes,
+ const char **errmsg, int *err)
+{
+ int org_in, org_out, org_errdes;
+ int status;
+ int *statuses;
+
+ org_in = -1;
+ org_out = -1;
+ org_errdes = -1;
+
+ if (in != STDIN_FILE_NO)
+ {
+ org_in = _dup (STDIN_FILE_NO);
+ if (org_in < 0)
+ {
+ *err = errno;
+ *errmsg = "_dup";
+ return -1;
+ }
+ if (_dup2 (in, STDIN_FILE_NO) < 0)
+ {
+ *err = errno;
+ *errmsg = "_dup2";
+ return -1;
+ }
+ if (_close (in) < 0)
+ {
+ *err = errno;
+ *errmsg = "_close";
+ return -1;
+ }
+ }
+
+ if (out != STDOUT_FILE_NO)
+ {
+ org_out = _dup (STDOUT_FILE_NO);
+ if (org_out < 0)
+ {
+ *err = errno;
+ *errmsg = "_dup";
+ return -1;
+ }
+ if (_dup2 (out, STDOUT_FILE_NO) < 0)
+ {
+ *err = errno;
+ *errmsg = "_dup2";
+ return -1;
+ }
+ if (_close (out) < 0)
+ {
+ *err = errno;
+ *errmsg = "_close";
+ return -1;
+ }
+ }
+
+ if (errdes != STDERR_FILE_NO
+ || (flags & PEX_STDERR_TO_STDOUT) != 0)
{
- errno = PWAIT_ERROR;
- return -1;
+ int e;
+
+ org_errdes = _dup (STDERR_FILE_NO);
+ if (org_errdes < 0)
+ {
+ *err = errno;
+ *errmsg = "_dup";
+ return -1;
+ }
+ if (_dup2 ((flags & PEX_STDERR_TO_STDOUT) != 0 ? STDOUT_FILE_NO : errdes,
+ STDERR_FILE_NO) < 0)
+ {
+ *err = errno;
+ *errmsg = "_dup2";
+ return -1;
+ }
+ if (errdes != STDERR_FILE_NO)
+ {
+ if (_close (errdes) < 0)
+ {
+ *err = errno;
+ *errmsg = "_close";
+ return -1;
+ }
+ }
+ }
+
+ status = (((flags & PEX_SEARCH) != 0 ? _spawnvp : _spawnv)
+ (P_WAIT, program, (const char **) argv));
+
+ if (status == -1)
+ {
+ *err = errno;
+ *errmsg = ((flags & PEX_SEARCH) != 0) ? "_spawnvp" : "_spawnv";
+ }
+
+ if (in != STDIN_FILE_NO)
+ {
+ if (_dup2 (org_in, STDIN_FILE_NO) < 0)
+ {
+ *err = errno;
+ *errmsg = "_dup2";
+ return -1;
+ }
+ if (_close (org_in) < 0)
+ {
+ *err = errno;
+ *errmsg = "_close";
+ return -1;
+ }
+ }
+
+ if (out != STDOUT_FILE_NO)
+ {
+ if (_dup2 (org_out, STDOUT_FILE_NO) < 0)
+ {
+ *err = errno;
+ *errmsg = "_dup2";
+ return -1;
+ }
+ if (_close (org_out) < 0)
+ {
+ *err = errno;
+ *errmsg = "_close";
+ return -1;
+ }
}
- /* ??? Here's an opportunity to canonicalize the values in STATUS.
- Needed? */
- *status = (last_status >> 8);
- last_reaped = last_pid;
- return last_pid;
+
+ if (errdes != STDERR_FILE_NO
+ || (flags & PEX_STDERR_TO_STDOUT) != 0)
+ {
+ if (_dup2 (org_errdes, STDERR_FILE_NO) < 0)
+ {
+ *err = errno;
+ *errmsg = "_dup2";
+ return -1;
+ }
+ if (_close (org_errdes) < 0)
+ {
+ *err = errno;
+ *errmsg = "_close";
+ return -1;
+ }
+ }
+
+ /* Save the exit status for later. When we are called, obj->count
+ is the number of children which have executed before this
+ one. */
+ statuses = (int *) obj->sysdep;
+ statuses = xrealloc (statuses, (obj->count + 1) * sizeof (int));
+ statuses[obj->count] = status;
+ obj->sysdep = (void *) statuses;
+
+ return obj->count;
+}
+
+/* Wait for a child process to complete. Actually the child process
+ has already completed, and we just need to return the exit
+ status. */
+
+static int
+pex_djgpp_wait (struct pex_obj *obj, long pid, int *status,
+ struct pex_time *time, int done, const char **errmsg,
+ int *err)
+{
+ int *statuses;
+
+ if (time != NULL)
+ memset (time, 0, sizeof *time);
+
+ statuses = (int *) obj->sysdep;
+ *status = statuses[pid];
+
+ return 0;
}
diff --git a/libiberty/pex-msdos.c b/libiberty/pex-msdos.c
index d61c129b97f..e2d76ee07a9 100644
--- a/libiberty/pex-msdos.c
+++ b/libiberty/pex-msdos.c
@@ -1,6 +1,6 @@
/* Utilities to execute a program in a subprocess (possibly linked by pipes
with other subprocesses), and wait for it. Generic MSDOS specialization.
- Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003
+ Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2005
Free Software Foundation, Inc.
This file is part of the libiberty library.
@@ -36,112 +36,281 @@ extern int errno;
#include "safe-ctype.h"
#include <process.h>
-/* MSDOS doesn't multitask, but for the sake of a consistent interface
- the code behaves like it does. pexecute runs the program, tucks the
- exit code away, and returns a "pid". pwait must be called to fetch the
- exit code. */
-
-/* For communicating information from pexecute to pwait. */
-static int last_pid = 0;
-static int last_status = 0;
-static int last_reaped = 0;
-
-int
-pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags)
- const char *program;
- char * const *argv;
- const char *this_pname;
- const char *temp_base;
- char **errmsg_fmt, **errmsg_arg;
- int flags;
+/* The structure we keep in obj->sysdep. */
+
+#define PEX_MSDOS_FILE_COUNT 3
+
+#define PEX_MSDOS_FD_OFFSET 10
+
+struct pex_msdos
{
- int rc;
- char *scmd, *rf;
- FILE *argfile;
- int i, el = flags & PEXECUTE_SEARCH ? 4 : 0;
+ /* An array of file names. We refer to these using file descriptors
+ of 10 + array index. */
+ const char *files[PEX_MSDOS_FILE_COUNT];
+ /* Exit statuses of programs which have been run. */
+ int *statuses;
+};
+
+static int pex_msdos_open (struct pex_obj *, const char *, int);
+static int pex_msdos_open (struct pex_obj *, const char *, int);
+static int pex_msdos_fdindex (struct pex_msdos *, int);
+static long pex_msdos_exec_child (struct pex_obj *, int, const char *,
+ char * const *, int, int, int,
+ const char **, int *);
+static int pex_msdos_close (struct pex_obj *, int);
+static int pex_msdos_wait (struct pex_obj *, long, int *, struct pex_time *,
+ int, const char **, int *);
+static void pex_msdos_cleanup (struct pex_obj *);
+
+/* The list of functions we pass to the common routines. */
+
+const struct pex_funcs funcs =
+{
+ pex_msdos_open,
+ pex_msdos_open,
+ pex_msdos_exec_child,
+ pex_msdos_close,
+ pex_msdos_wait,
+ NULL, /* pipe */
+ NULL, /* fdopenr */
+ pex_msdos_cleanup
+};
+
+/* Return a newly initialized pex_obj structure. */
+
+struct pex_obj *
+pex_init (int flags, const char *pname, const char *tempbase)
+{
+ struct pex_obj *ret;
+ int i;
+
+ /* MSDOS does not support pipes. */
+ flags &= ~ PEX_USE_PIPES;
+
+ ret = pex_init_common (flags, pname, tempbase, funcs);
+
+ ret->sysdep = xmalloc (sizeof (struct pex_msdos));
+ for (i = 0; i < PEX_MSDOS_FILE_COUNT; ++i)
+ ret->files[i] = NULL;
+ ret->statuses = NULL;
+
+ return ret;
+}
+
+/* Open a file. FIXME: We ignore the binary argument, since we have
+ no way to handle it. */
+
+static int
+pex_msdos_open (struct pex_obj *obj, const char *name,
+ int binary ATTRIBUTE_UNUSED)
+{
+ struct pex_msdos *ms;
+ int i;
- last_pid++;
- if (last_pid < 0)
- last_pid = 1;
+ ms = (struct pex_msdos *) obj->sysdep;
- if ((flags & PEXECUTE_ONE) != PEXECUTE_ONE)
+ for (i = 0; i < PEX_MSDOS_FILE_COUNT; ++i)
+ {
+ if (ms->files[i] == NULL)
+ {
+ ms->files[i] = xstrdup (name);
+ return i + PEX_MSDOS_FD_OFFSET;
+ }
+ }
+
+ abort ();
+}
+
+/* Get the index into msdos->files associated with an open file
+ descriptor. */
+
+static int
+pex_msdos_fdindex (struct pex_msdos *ms, int fd)
+{
+ fd -= PEX_MSDOS_FD_OFFSET;
+ if (fd < 0 || fd >= PEX_MSDOS_FILE_COUNT || ms->files[fd] == NULL)
abort ();
+ return fd;
+}
+
+
+/* Close a file. */
+
+static int
+pex_msdos_close (struct pex_obj *obj, int fd)
+{
+ struct pex_msdos *ms;
+ int fdinex;
+
+ ms = (struct pex_msdos *) obj->sysdep;
+ fdindex = pe_msdos_fdindex (ms, fd);
+ free (ms->files[fdindex]);
+ ms->files[fdindex] = NULL;
+}
+
+/* Execute a child. */
+
+static long
+pex_msdos_exec_child (struct pex_obj *obj, int flags, const char *executable,
+ char * const * argv, int in, int out,
+ int errdes ATTRIBUTE_UNUSED, const char **errmsg,
+ int *err)
+{
+ struct pex_msdos *ms;
+ char *temp_base;
+ int temp_base_allocated;
+ char *rf;
+ int inindex;
+ char *infile;
+ int outindex;
+ char *outfile;
+ char *scmd;
+ FILE *argfile;
+ int i;
+ int status;
+
+ ms = (struct pex_msdos *) obj->sysdep;
+
+ /* FIXME: I don't know how to redirect stderr, so we ignore ERRDES
+ and PEX_STDERR_TO_STDOUT. */
+
+ temp_base = obj->temp_base;
+ if (temp_base != NULL)
+ temp_base_allocated = 0;
+ else
+ {
+ temp_base = choose_temp_base ();
+ temp_base_allocated = 1;
+ }
+
+ rf = concat (temp_base, ".gp", NULL);
+
+ if (temp_base_allocated)
+ free (temp_base);
+
+ if (in == STDIN_FILE_NO)
+ {
+ inindex = -1;
+ infile = "";
+ }
+ else
+ {
+ inindex = pex_msdos_fdindex (ms, in);
+ infile = ms->files[inindex];
+ }
+
+ if (out == STDOUT_FILE_NO)
+ {
+ outindex = -1;
+ outfile = "";
+ }
+ else
+ {
+ outindex = pex_msdos_fdindex (ms, out);
+ outfile = ms->files[outindex];
+ }
+
+ scmd = xmalloc (strlen (program)
+ + ((flags & PEXECUTE_SEARCH) != 0 ? 4 : 0)
+ + strlen (rf)
+ + strlen (infile)
+ + strlen (outfile)
+ + 10);
+ sprintf (scmd, "%s%s @%s%s%s%s%s",
+ program,
+ (flags & PEXECUTE_SEARCH) != 0 ? ".exe" : "",
+ rf,
+ inindex != -1 ? " <" : "",
+ infile,
+ outindex != -1 ? " >" : "",
+ outfile);
- if (temp_base == 0)
- temp_base = choose_temp_base ();
- scmd = (char *) xmalloc (strlen (program) + strlen (temp_base) + 6 + el);
- rf = scmd + strlen(program) + 2 + el;
- sprintf (scmd, "%s%s @%s.gp", program,
- (flags & PEXECUTE_SEARCH ? ".exe" : ""), temp_base);
argfile = fopen (rf, "w");
- if (argfile == 0)
+ if (argfile == NULL)
{
- int errno_save = errno;
+ *err = errno;
free (scmd);
- errno = errno_save;
- *errmsg_fmt = "cannot open `%s.gp'";
- *errmsg_arg = temp_base;
+ free (rf);
+ *errmsg = "cannot open temporary command file";
return -1;
}
- for (i=1; argv[i]; i++)
+ for (i = 1; argv[i] != NULL; ++i)
{
- char *cp;
- for (cp = argv[i]; *cp; cp++)
+ char *p;
+
+ for (p = argv[i]; *p != '\0'; ++p)
{
- if (*cp == '"' || *cp == '\'' || *cp == '\\' || ISSPACE (*cp))
- fputc ('\\', argfile);
- fputc (*cp, argfile);
+ if (*p == '"' || *p == '\'' || *p == '\\' || ISSPACE (*p))
+ putc ('\\', argfile);
+ putc (*p, argfile);
}
- fputc ('\n', argfile);
+ putc ('\n', argfile);
}
- fclose (argfile);
- rc = system (scmd);
+ fclose (argfile);
- {
- int errno_save = errno;
- remove (rf);
- free (scmd);
- errno = errno_save;
- }
+ status = system (scmd);
- if (rc == -1)
+ if (status == -1)
{
- *errmsg_fmt = install_error_msg;
- *errmsg_arg = (char *)program;
+ *err = errno;
+ remove (rf);
+ free (scmd);
+ free (rf);
+ *errmsg = "system";
return -1;
}
- /* Tuck the status away for pwait, and return a "pid". */
- last_status = rc << 8;
- return last_pid;
+ remove (rf);
+ free (scmd);
+ free (rf);
+
+ /* Save the exit status for later. When we are called, obj->count
+ is the number of children which have executed before this
+ one. */
+ ms->statuses = xrealloc (ms->statuses, (obj->count + 1) * sizeof (int));
+ ms->statuses[obj->count] = status;
+
+ return obj->count;
}
-/* Use ECHILD if available, otherwise use EINVAL. */
-#ifdef ECHILD
-#define PWAIT_ERROR ECHILD
-#else
-#define PWAIT_ERROR EINVAL
-#endif
+/* Wait for a child process to complete. Actually the child process
+ has already completed, and we just need to return the exit
+ status. */
-int
-pwait (pid, status, flags)
- int pid;
- int *status;
- int flags;
+static int
+pex_msdos_wait (struct pex_obj *obj, long pid, int *status,
+ struct pex_time *time, int done ATTRIBUTE_UNUSED,
+ const char **errmsg ATTRIBUTE_UNUSED,
+ int *err ATTRIBUTE_UNUSED)
{
- /* On MSDOS each pexecute must be followed by its associated pwait. */
- if (pid != last_pid
- /* Called twice for the same child? */
- || pid == last_reaped)
- {
- errno = PWAIT_ERROR;
- return -1;
- }
- /* ??? Here's an opportunity to canonicalize the values in STATUS.
- Needed? */
- *status = last_status;
- last_reaped = last_pid;
- return last_pid;
+ struct pex_msdos *ms;
+
+ ms = (struct pex_msdos *) obj->sysdep;
+
+ if (time != NULL)
+ memset (time, 0, sizeof *time);
+
+ *status = ms->statuses[pid];
+
+ return 0;
+}
+
+/* Clean up the pex_msdos structure. */
+
+static void
+pex_msdos_cleanup (struct pex_obj *obj)
+{
+ struct pex_msdos *ms;
+ int i;
+
+ ms = (struct pex_msdos *) obj->sysdep;
+ for (i = 0; i < PEX_MSDOS_FILE_COUNT; ++i)
+ if (msdos->files[i] != NULL)
+ free (msdos->files[i]);
+ if (msdos->statuses != NULL)
+ free (msdos->statuses);
+ free (msdos);
+ obj->sysdep = NULL;
}
diff --git a/libiberty/pex-unix.c b/libiberty/pex-unix.c
index 55a055e4b7e..b9654fca9f8 100644
--- a/libiberty/pex-unix.c
+++ b/libiberty/pex-unix.c
@@ -1,7 +1,7 @@
/* Utilities to execute a program in a subprocess (possibly linked by pipes
with other subprocesses), and wait for it. Generic Unix version
(also used for UWIN and VMS).
- Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
+ Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of the libiberty library.
@@ -20,30 +20,43 @@ License along with libiberty; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#include "config.h"
+#include "libiberty.h"
#include "pex-common.h"
#include <stdio.h>
+#include <signal.h>
#include <errno.h>
#ifdef NEED_DECLARATION_ERRNO
extern int errno;
#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
+
+#include <sys/types.h>
+
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
#endif
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
-
-#ifndef HAVE_WAITPID
-#define waitpid(pid, status, flags) wait(status)
+#ifdef HAVE_GETRUSAGE
+#include <sys/time.h>
+#include <sys/resource.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
#endif
+
#ifdef vfork /* Autoconf may define this to fork for us. */
# define VFORK_STRING "fork"
#else
@@ -57,85 +70,300 @@ extern int errno;
lib$get_current_invo_context(decc$$get_vfork_jmpbuf()) : -1)
#endif /* VMS */
-/* Execute a program, possibly setting up pipes to programs executed
- via other calls to this function.
-
- This version of the function uses vfork. In general vfork is
- similar to setjmp/longjmp, in that any variable which is modified by
- the child process has an indeterminate value in the parent process.
- We follow a safe approach here by not modifying any variables at
- all in the child process (with the possible exception of variables
- modified by xstrerror if exec fails, but this is unlikely to be
- detectable).
-
- We work a little bit harder to avoid gcc warnings. gcc will warn
- about any automatic variable which is live at the time of the
- vfork, which is non-volatile, and which is either set more than
- once or is an argument to the function. This warning isn't quite
- right, since what we really care about is whether the variable is
- live at the time of the vfork and set afterward by the child
- process, but gcc only checks whether the variable is set more than
- once. To avoid this warning, we ensure that any variable which is
- live at the time of the vfork (i.e., used after the vfork) is set
- exactly once and is not an argument, or is marked volatile. */
-
-int
-pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg,
- flagsarg)
- const char *program;
- char * const *argv;
- const char *this_pname;
- const char *temp_base ATTRIBUTE_UNUSED;
- char **errmsg_fmt, **errmsg_arg;
- int flagsarg;
-{
- int pid;
- int pdes[2];
- int out;
- int input_desc, output_desc;
- int flags;
- /* We declare these to be volatile to avoid warnings from gcc about
- them being clobbered by vfork. */
- volatile int retries, sleep_interval;
- /* Pipe waiting from last process, to be used as input for the next one.
- Value is STDIN_FILE_NO if no pipe is waiting
- (i.e. the next command is the first of a group). */
- static int last_pipe_input;
- flags = flagsarg;
+/* File mode to use for private and world-readable files. */
+
+#if defined (S_IRUSR) && defined (S_IWUSR) && defined (S_IRGRP) && defined (S_IWGRP) && defined (S_IROTH) && defined (S_IWOTH)
+#define PUBLIC_MODE \
+ (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)
+#else
+#define PUBLIC_MODE 0666
+#endif
+
+/* Get the exit status of a particular process, and optionally get the
+ time that it took. This is simple if we have wait4, slightly
+ harder if we have waitpid, and is a pain if we only have wait. */
+
+static pid_t pex_wait (struct pex_obj *, pid_t, int *, struct pex_time *);
+
+#ifdef HAVE_WAIT4
+
+static pid_t
+pex_wait (struct pex_obj *obj ATTRIBUTE_UNUSED, pid_t pid, int *status,
+ struct pex_time *time)
+{
+ pid_t ret;
+ struct rusage r;
+
+#ifdef HAVE_WAITPID
+ if (time == NULL)
+ return waitpid (pid, status, 0);
+#endif
+
+ ret = wait4 (pid, status, 0, &r);
+
+ if (time != NULL)
+ {
+ time->user_seconds = r.ru_utime.tv_sec;
+ time->user_microseconds= r.ru_utime.tv_usec;
+ time->system_seconds = r.ru_stime.tv_sec;
+ time->system_microseconds= r.ru_stime.tv_usec;
+ }
+
+ return ret;
+}
+
+#else /* ! defined (HAVE_WAIT4) */
+
+#ifdef HAVE_WAITPID
+
+#ifndef HAVE_GETRUSAGE
+
+static pid_t
+pex_wait (struct pex_obj *obj ATTRIBUTE_UNUSED, pid_t pid, int *status,
+ struct pex_time *time)
+{
+ if (time != NULL)
+ memset (time, 0, sizeof (struct pex_time));
+ return waitpid (pid, status, 0);
+}
+
+#else /* defined (HAVE_GETRUSAGE) */
+
+static pid_t
+pex_wait (struct pex_obj *obj ATTRIBUTE_UNUSED, pid_t pid, int *status,
+ struct pex_time *time)
+{
+ struct rusage r1, r2;
+ pid_t ret;
+
+ if (time == NULL)
+ return waitpid (pid, status, 0);
+
+ getrusage (RUSAGE_CHILDREN, &r1);
+
+ ret = waitpid (pid, status, 0);
+ if (ret < 0)
+ return ret;
+
+ getrusage (RUSAGE_CHILDREN, &r2);
+
+ time->user_seconds = r2.ru_utime.tv_sec - r1.ru_utime.tv_sec;
+ time->user_microseconds = r2.ru_utime.tv_usec - r1.ru_utime.tv_usec;
+ if (r2.ru_utime.tv_usec < r1.ru_utime.tv_usec)
+ {
+ --time->user_seconds;
+ time->user_microseconds += 1000000;
+ }
+
+ time->system_seconds = r2.ru_stime.tv_sec - r1.ru_stime.tv_sec;
+ time->system_microseconds = r2.ru_stime.tv_usec - r1.ru_stime.tv_usec;
+ if (r2.ru_stime.tv_usec < r1.ru_stime.tv_usec)
+ {
+ --time->system_seconds;
+ time->system_microseconds += 1000000;
+ }
- /* If this is the first process, initialize. */
- if (flags & PEXECUTE_FIRST)
- last_pipe_input = STDIN_FILE_NO;
+ return ret;
+}
- input_desc = last_pipe_input;
+#endif /* defined (HAVE_GETRUSAGE) */
- /* If this isn't the last process, make a pipe for its output,
- and record it as waiting to be the input to the next process. */
- if (! (flags & PEXECUTE_LAST))
+#else /* ! defined (HAVE_WAITPID) */
+
+struct status_list
+{
+ struct status_list *next;
+ pid_t pid;
+ int status;
+ struct pex_time time;
+};
+
+static pid_t
+pex_wait (struct pex_obj *obj, pid_t pid, int *status, struct pex_time *time)
+{
+ struct status_list **pp;
+
+ for (pp = (struct status_list **) &obj->sysdep;
+ *pp != NULL;
+ pp = &(*pp)->next)
{
- if (pipe (pdes) < 0)
+ if ((*pp)->pid == pid)
{
- *errmsg_fmt = "pipe";
- *errmsg_arg = NULL;
- return -1;
+ struct status_list *p;
+
+ p = *pp;
+ *status = p->status;
+ if (time != NULL)
+ *time = p->time;
+ *pp = p->next;
+ free (p);
+ return pid;
}
- out = pdes[WRITE_PORT];
- last_pipe_input = pdes[READ_PORT];
}
- else
+
+ while (1)
{
- /* Last process. */
- out = STDOUT_FILE_NO;
- last_pipe_input = STDIN_FILE_NO;
+ pid_t cpid;
+ struct status_list *psl;
+ struct pex_time pt;
+#ifdef HAVE_GETRUSAGE
+ struct rusage r1, r2;
+#endif
+
+ if (time != NULL)
+ {
+#ifdef HAVE_GETRUSAGE
+ getrusage (RUSAGE_CHILDREN, &r1);
+#else
+ memset (&pt, 0, sizeof (struct pex_time));
+#endif
+ }
+
+ cpid = wait (status);
+
+#ifdef HAVE_GETRUSAGE
+ if (time != NULL && cpid >= 0)
+ {
+ getrusage (RUSAGE_CHILDREN, &r2);
+
+ pt.user_seconds = r2.ru_utime.tv_sec - r1.ru_utime.tv_sec;
+ pt.user_microseconds = r2.ru_utime.tv_usec - r1.ru_utime.tv_usec;
+ if (pt.user_microseconds < 0)
+ {
+ --pt.user_seconds;
+ pt.user_microseconds += 1000000;
+ }
+
+ pt.system_seconds = r2.ru_stime.tv_sec - r1.ru_stime.tv_sec;
+ pt.system_microseconds = r2.ru_stime.tv_usec - r1.ru_stime.tv_usec;
+ if (pt.system_microseconds < 0)
+ {
+ --pt.system_seconds;
+ pt.system_microseconds += 1000000;
+ }
+ }
+#endif
+
+ if (cpid < 0 || cpid == pid)
+ {
+ if (time != NULL)
+ *time = pt;
+ return cpid;
+ }
+
+ psl = xmalloc (sizeof (struct status_list));
+ psl->pid = cpid;
+ psl->status = *status;
+ if (time != NULL)
+ psl->time = pt;
+ psl->next = (struct status_list *) obj->sysdep;
+ obj->sysdep = (void *) psl;
}
+}
+
+#endif /* ! defined (HAVE_WAITPID) */
+#endif /* ! defined (HAVE_WAIT4) */
+
+static void pex_child_error (struct pex_obj *, const char *, const char *, int)
+ ATTRIBUTE_NORETURN;
+static int pex_unix_open_read (struct pex_obj *, const char *, int);
+static int pex_unix_open_write (struct pex_obj *, const char *, int);
+static long pex_unix_exec_child (struct pex_obj *, int, const char *,
+ char * const *, int, int, int,
+ const char **, int *);
+static int pex_unix_close (struct pex_obj *, int);
+static int pex_unix_wait (struct pex_obj *, long, int *, struct pex_time *,
+ int, const char **, int *);
+static int pex_unix_pipe (struct pex_obj *, int *, int);
+static FILE *pex_unix_fdopenr (struct pex_obj *, int, int);
+static void pex_unix_cleanup (struct pex_obj *);
+
+/* The list of functions we pass to the common routines. */
+
+const struct pex_funcs funcs =
+{
+ pex_unix_open_read,
+ pex_unix_open_write,
+ pex_unix_exec_child,
+ pex_unix_close,
+ pex_unix_wait,
+ pex_unix_pipe,
+ pex_unix_fdopenr,
+ pex_unix_cleanup
+};
+
+/* Return a newly initialized pex_obj structure. */
+
+struct pex_obj *
+pex_init (int flags, const char *pname, const char *tempbase)
+{
+ return pex_init_common (flags, pname, tempbase, &funcs);
+}
+
+/* Open a file for reading. */
+
+static int
+pex_unix_open_read (struct pex_obj *obj ATTRIBUTE_UNUSED, const char *name,
+ int binary ATTRIBUTE_UNUSED)
+{
+ return open (name, O_RDONLY);
+}
+
+/* Open a file for writing. */
+
+static int
+pex_unix_open_write (struct pex_obj *obj ATTRIBUTE_UNUSED, const char *name,
+ int binary ATTRIBUTE_UNUSED)
+{
+ /* Note that we can't use O_EXCL here because gcc may have already
+ created the temporary file via make_temp_file. */
+ return open (name, O_WRONLY | O_CREAT | O_TRUNC, PUBLIC_MODE);
+}
- output_desc = out;
+/* Close a file. */
+
+static int
+pex_unix_close (struct pex_obj *obj ATTRIBUTE_UNUSED, int fd)
+{
+ return close (fd);
+}
+
+/* Report an error from a child process. We don't use stdio routines,
+ because we might be here due to a vfork call. */
+
+static void
+pex_child_error (struct pex_obj *obj, const char *executable,
+ const char *errmsg, int err)
+{
+#define writeerr(s) write (STDERR_FILE_NO, s, strlen (s))
+ writeerr (obj->pname);
+ writeerr (": error trying to exec '");
+ writeerr (executable);
+ writeerr ("': ");
+ writeerr (errmsg);
+ writeerr (": ");
+ writeerr (xstrerror (err));
+ writeerr ("\n");
+ _exit (-1);
+}
+
+/* Execute a child. */
+
+static long
+pex_unix_exec_child (struct pex_obj *obj, int flags, const char *executable,
+ char * const * argv, int in, int out, int errdes,
+ const char **errmsg, int *err)
+{
+ pid_t pid;
+ /* We declare these to be volatile to avoid warnings from gcc about
+ them being clobbered by vfork. */
+ volatile int sleep_interval;
+ volatile int retries;
- /* Fork a subprocess; wait and retry if it fails. */
sleep_interval = 1;
pid = -1;
- for (retries = 0; retries < 4; retries++)
+ for (retries = 0; retries < 4; ++retries)
{
pid = vfork ();
if (pid >= 0)
@@ -147,69 +375,139 @@ pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg,
switch (pid)
{
case -1:
- *errmsg_fmt = "fork";
- *errmsg_arg = NULL;
+ *err = errno;
+ *errmsg = VFORK_STRING;
return -1;
- case 0: /* child */
- /* Move the input and output pipes into place, if necessary. */
- if (input_desc != STDIN_FILE_NO)
+ case 0:
+ /* Child process. */
+ if (in != STDIN_FILE_NO)
{
- close (STDIN_FILE_NO);
- dup (input_desc);
- close (input_desc);
+ if (dup2 (in, STDIN_FILE_NO) < 0)
+ pex_child_error (obj, executable, "dup2", errno);
+ if (close (in) < 0)
+ pex_child_error (obj, executable, "close", errno);
}
- if (output_desc != STDOUT_FILE_NO)
+ if (out != STDOUT_FILE_NO)
{
- close (STDOUT_FILE_NO);
- dup (output_desc);
- close (output_desc);
+ if (dup2 (out, STDOUT_FILE_NO) < 0)
+ pex_child_error (obj, executable, "dup2", errno);
+ if (close (out) < 0)
+ pex_child_error (obj, executable, "close", errno);
+ }
+ if (errdes != STDERR_FILE_NO)
+ {
+ if (dup2 (errdes, STDERR_FILE_NO) < 0)
+ pex_child_error (obj, executable, "dup2", errno);
+ if (close (errdes) < 0)
+ pex_child_error (obj, executable, "close", errno);
+ }
+ if ((flags & PEX_STDERR_TO_STDOUT) != 0)
+ {
+ if (dup2 (STDOUT_FILE_NO, STDERR_FILE_NO) < 0)
+ pex_child_error (obj, executable, "dup2", errno);
+ }
+ if ((flags & PEX_SEARCH) != 0)
+ {
+ execvp (executable, argv);
+ pex_child_error (obj, executable, "execvp", errno);
}
-
- /* Close the parent's descs that aren't wanted here. */
- if (last_pipe_input != STDIN_FILE_NO)
- close (last_pipe_input);
-
- /* Exec the program. */
- if (flags & PEXECUTE_SEARCH)
- execvp (program, argv);
else
- execv (program, argv);
+ {
+ execv (executable, argv);
+ pex_child_error (obj, executable, "execv", errno);
+ }
- /* We don't want to call fprintf after vfork. */
-#define writeerr(s) write (STDERR_FILE_NO, s, strlen (s))
- writeerr (this_pname);
- writeerr (": ");
- writeerr ("installation problem, cannot exec '");
- writeerr (program);
- writeerr ("': ");
- writeerr (xstrerror (errno));
- writeerr ("\n");
- _exit (-1);
/* NOTREACHED */
- return 0;
+ return -1;
default:
- /* In the parent, after forking.
- Close the descriptors that we made for this child. */
- if (input_desc != STDIN_FILE_NO)
- close (input_desc);
- if (output_desc != STDOUT_FILE_NO)
- close (output_desc);
-
- /* Return child's process number. */
- return pid;
+ /* Parent process. */
+ if (in != STDIN_FILE_NO)
+ {
+ if (close (in) < 0)
+ {
+ *err = errno;
+ *errmsg = "close";
+ return -1;
+ }
+ }
+ if (out != STDOUT_FILE_NO)
+ {
+ if (close (out) < 0)
+ {
+ *err = errno;
+ *errmsg = "close";
+ return -1;
+ }
+ }
+ if (errdes != STDERR_FILE_NO)
+ {
+ if (close (errdes) < 0)
+ {
+ *err = errno;
+ *errmsg = "close";
+ return -1;
+ }
+ }
+
+ return (long) pid;
}
}
-int
-pwait (pid, status, flags)
- int pid;
- int *status;
- int flags ATTRIBUTE_UNUSED;
+/* Wait for a child process to complete. */
+
+static int
+pex_unix_wait (struct pex_obj *obj, long pid, int *status,
+ struct pex_time *time, int done, const char **errmsg,
+ int *err)
{
- /* ??? Here's an opportunity to canonicalize the values in STATUS.
- Needed? */
- pid = waitpid (pid, status, 0);
- return pid;
+ /* If we are cleaning up when the caller didn't retrieve process
+ status for some reason, encourage the process to go away. */
+ if (done)
+ kill (pid, SIGTERM);
+
+ if (pex_wait (obj, pid, status, time) < 0)
+ {
+ *err = errno;
+ *errmsg = "wait";
+ return -1;
+ }
+
+ return 0;
+}
+
+/* Create a pipe. */
+
+static int
+pex_unix_pipe (struct pex_obj *obj ATTRIBUTE_UNUSED, int *p,
+ int binary ATTRIBUTE_UNUSED)
+{
+ return pipe (p);
+}
+
+/* Get a FILE pointer to read from a file descriptor. */
+
+static FILE *
+pex_unix_fdopenr (struct pex_obj *obj ATTRIBUTE_UNUSED, int fd,
+ int binary ATTRIBUTE_UNUSED)
+{
+ return fdopen (fd, "r");
+}
+
+static void
+pex_unix_cleanup (struct pex_obj *obj ATTRIBUTE_UNUSED)
+{
+#if !defined (HAVE_WAIT4) && !defined (HAVE_WAITPID)
+ while (obj->sysdep != NULL)
+ {
+ struct status_list *this;
+ struct status_list *next;
+
+ this = (struct status_list *) obj->sysdep;
+ next = this->next;
+ free (this);
+ obj->sysdep = (void *) next;
+ }
+#endif
}
diff --git a/libiberty/pex-win32.c b/libiberty/pex-win32.c
index 2b4abdffbf9..2a3607df792 100644
--- a/libiberty/pex-win32.c
+++ b/libiberty/pex-win32.c
@@ -1,6 +1,6 @@
/* Utilities to execute a program in a subprocess (possibly linked by pipes
with other subprocesses), and wait for it. Generic Win32 specialization.
- Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003
+ Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of the libiberty library.
@@ -21,6 +21,9 @@ Boston, MA 02111-1307, USA. */
#include "pex-common.h"
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
@@ -35,6 +38,7 @@ Boston, MA 02111-1307, USA. */
#include <io.h>
#include <fcntl.h>
#include <signal.h>
+#include <sys/stat.h>
/* mingw32 headers may not define the following. */
@@ -53,28 +57,49 @@ Boston, MA 02111-1307, USA. */
to remove the outermost set of double quotes from all arguments. */
static const char * const *
-fix_argv (argvec)
- char **argvec;
+fix_argv (char * const *argvec)
{
+ char **argv;
int i;
- char * command0 = argvec[0];
+ char *command0;
+
+ /* See whether we need to change anything. */
+ for (command0 = argvec[0]; *command0 != '\0'; command0++)
+ if (*command0 == '/')
+ break;
+ if (*command0 == '\0')
+ {
+ for (i = 1; argvec[i] != NULL; i++)
+ if (strpbrk (argvec[i], "\" \t") != NULL)
+ break;
+
+ if (argvec[i] == NULL)
+ return (const char * const *) argvec;
+ }
+
+ for (i = 0; argvec[i] != NULL; i++)
+ ;
+ argv = xmalloc ((i + 1) * sizeof (char *));
+ for (i = 0; argvec[i] != NULL; i++)
+ argv[i] = xstrdup (argvec[i]);
+ argv[i] = NULL;
/* Ensure that the executable pathname uses Win32 backslashes. This
- is not necessary on NT, but on W9x, forward slashes causes failure
- of spawn* and exec* functions (and probably any function that
- calls CreateProcess) *iff* the executable pathname (argvec[0]) is
- a quoted string. And quoting is necessary in case a pathname
- contains embedded white space. You can't win. */
- for (; *command0 != '\0'; command0++)
+ is not necessary on NT, but on W9x, forward slashes causes
+ failure of spawn* and exec* functions (and probably any function
+ that calls CreateProcess) *iff* the executable pathname (argv[0])
+ is a quoted string. And quoting is necessary in case a pathname
+ contains embedded white space. You can't win. */
+ for (command0 = argv[0]; *command0 != '\0'; command0++)
if (*command0 == '/')
*command0 = '\\';
-
- for (i = 1; argvec[i] != 0; i++)
+
+ for (i = 1; argv[i] != 0; i++)
{
int len, j;
char *temp, *newtemp;
- temp = argvec[i];
+ temp = argv[i];
len = strlen (temp);
for (j = 0; j < len; j++)
{
@@ -91,17 +116,21 @@ fix_argv (argvec)
}
}
- argvec[i] = temp;
- }
+ if (argv[i] != temp)
+ {
+ free (argv[i]);
+ argv[i] = temp;
+ }
+ }
- for (i = 0; argvec[i] != 0; i++)
+ for (i = 0; argv[i] != 0; i++)
{
- if (strpbrk (argvec[i], " \t"))
+ if (strpbrk (argv[i], " \t"))
{
int len, trailing_backslash;
char *temp;
- len = strlen (argvec[i]);
+ len = strlen (argv[i]);
trailing_backslash = 0;
/* There is an added complication when an arg with embedded white
@@ -112,8 +141,8 @@ fix_argv (argvec)
We handle this case by escaping the trailing backslash, provided
it was not escaped in the first place. */
if (len > 1
- && argvec[i][len-1] == '\\'
- && argvec[i][len-2] != '\\')
+ && argv[i][len-1] == '\\'
+ && argv[i][len-2] != '\\')
{
trailing_backslash = 1;
++len; /* to escape the final backslash. */
@@ -123,133 +152,289 @@ fix_argv (argvec)
temp = xmalloc (len + 1);
temp[0] = '"';
- strcpy (temp + 1, argvec[i]);
+ strcpy (temp + 1, argv[i]);
if (trailing_backslash)
- temp[len-2] = '\\';
- temp[len-1] = '"';
+ temp[len - 2] = '\\';
+ temp[len - 1] = '"';
temp[len] = '\0';
- argvec[i] = temp;
+ free (argv[i]);
+ argv[i] = temp;
}
}
- return (const char * const *) argvec;
+ return (const char * const *) argv;
+}
+
+static int pex_win32_open_read (struct pex_obj *, const char *, int);
+static int pex_win32_open_write (struct pex_obj *, const char *, int);
+static long pex_win32_exec_child (struct pex_obj *, int, const char *,
+ char * const *, int, int, int,
+ const char **, int *);
+static int pex_win32_close (struct pex_obj *, int);
+static int pex_win32_wait (struct pex_obj *, long, int *,
+ struct pex_time *, int, const char **, int *);
+static int pex_win32_pipe (struct pex_obj *, int *, int);
+static FILE *pex_win32_fdopenr (struct pex_obj *, int, int);
+
+/* The list of functions we pass to the common routines. */
+
+const struct pex_funcs funcs =
+{
+ pex_win32_open_read,
+ pex_win32_open_write,
+ pex_win32_exec_child,
+ pex_win32_close,
+ pex_win32_wait,
+ pex_win32_pipe,
+ pex_win32_fdopenr,
+ NULL /* cleanup */
+};
+
+/* Return a newly initialized pex_obj structure. */
+
+struct pex_obj *
+pex_init (int flags, const char *pname, const char *tempbase)
+{
+ return pex_init_common (flags, pname, tempbase, &funcs);
+}
+
+/* Open a file for reading. */
+
+static int
+pex_win32_open_read (struct pex_obj *obj ATTRIBUTE_UNUSED, const char *name,
+ int binary)
+{
+ return _open (name, _O_RDONLY | (binary ? _O_BINARY : _O_TEXT));
+}
+
+/* Open a file for writing. */
+
+static int
+pex_win32_open_write (struct pex_obj *obj ATTRIBUTE_UNUSED, const char *name,
+ int binary)
+{
+ /* Note that we can't use O_EXCL here because gcc may have already
+ created the temporary file via make_temp_file. */
+ return _open (name,
+ (_O_WRONLY | _O_CREAT | _O_TRUNC
+ | (binary ? _O_BINARY : _O_TEXT)),
+ _S_IREAD | _S_IWRITE);
+}
+
+/* Close a file. */
+
+static int
+pex_win32_close (struct pex_obj *obj ATTRIBUTE_UNUSED, int fd)
+{
+ return _close (fd);
}
-/* Win32 supports pipes */
-int
-pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags)
- const char *program;
- char * const *argv;
- const char *this_pname ATTRIBUTE_UNUSED;
- const char *temp_base ATTRIBUTE_UNUSED;
- char **errmsg_fmt, **errmsg_arg;
- int flags;
+/* Execute a child. */
+
+static long
+pex_win32_exec_child (struct pex_obj *obj ATTRIBUTE_UNUSED, int flags,
+ const char *executable, char * const * argv,
+ int in, int out, int errdes, const char **errmsg,
+ int *err)
{
- int pid;
- int pdes[2];
- int org_stdin = -1;
- int org_stdout = -1;
- int input_desc, output_desc;
-
- /* Pipe waiting from last process, to be used as input for the next one.
- Value is STDIN_FILE_NO if no pipe is waiting
- (i.e. the next command is the first of a group). */
- static int last_pipe_input;
-
- /* If this is the first process, initialize. */
- if (flags & PEXECUTE_FIRST)
- last_pipe_input = STDIN_FILE_NO;
-
- input_desc = last_pipe_input;
-
- /* If this isn't the last process, make a pipe for its output,
- and record it as waiting to be the input to the next process. */
- if (! (flags & PEXECUTE_LAST))
+ int org_in, org_out, org_errdes;
+ long pid;
+
+ org_in = -1;
+ org_out = -1;
+ org_errdes = -1;
+
+ if (in != STDIN_FILE_NO)
{
- if (_pipe (pdes, 256, O_BINARY) < 0)
+ org_in = _dup (STDIN_FILE_NO);
+ if (org_in < 0)
+ {
+ *err = errno;
+ *errmsg = "_dup";
+ return -1;
+ }
+ if (_dup2 (in, STDIN_FILE_NO) < 0)
+ {
+ *err = errno;
+ *errmsg = "_dup2";
+ return -1;
+ }
+ if (_close (in) < 0)
{
- *errmsg_fmt = "pipe";
- *errmsg_arg = NULL;
+ *err = errno;
+ *errmsg = "_close";
return -1;
}
- output_desc = pdes[WRITE_PORT];
- last_pipe_input = pdes[READ_PORT];
}
- else
+
+ if (out != STDOUT_FILE_NO)
{
- /* Last process. */
- output_desc = STDOUT_FILE_NO;
- last_pipe_input = STDIN_FILE_NO;
+ org_out = _dup (STDOUT_FILE_NO);
+ if (org_out < 0)
+ {
+ *err = errno;
+ *errmsg = "_dup";
+ return -1;
+ }
+ if (_dup2 (out, STDOUT_FILE_NO) < 0)
+ {
+ *err = errno;
+ *errmsg = "_dup2";
+ return -1;
+ }
+ if (_close (out) < 0)
+ {
+ *err = errno;
+ *errmsg = "_close";
+ return -1;
+ }
}
- if (input_desc != STDIN_FILE_NO)
+ if (errdes != STDERR_FILE_NO
+ || (flags & PEX_STDERR_TO_STDOUT) != 0)
{
- org_stdin = dup (STDIN_FILE_NO);
- dup2 (input_desc, STDIN_FILE_NO);
- close (input_desc);
+ org_errdes = _dup (STDERR_FILE_NO);
+ if (org_errdes < 0)
+ {
+ *err = errno;
+ *errmsg = "_dup";
+ return -1;
+ }
+ if (_dup2 ((flags & PEX_STDERR_TO_STDOUT) != 0 ? STDOUT_FILE_NO : errdes,
+ STDERR_FILE_NO) < 0)
+ {
+ *err = errno;
+ *errmsg = "_dup2";
+ return -1;
+ }
+ if (errdes != STDERR_FILE_NO)
+ {
+ if (_close (errdes) < 0)
+ {
+ *err = errno;
+ *errmsg = "_close";
+ return -1;
+ }
+ }
}
- if (output_desc != STDOUT_FILE_NO)
+ pid = (((flags & PEX_SEARCH) != 0 ? _spawnvp : _spawnv)
+ (_P_NOWAIT, executable, fix_argv (argv)));
+
+ if (pid == -1)
{
- org_stdout = dup (STDOUT_FILE_NO);
- dup2 (output_desc, STDOUT_FILE_NO);
- close (output_desc);
+ *err = errno;
+ *errmsg = ((flags & PEX_SEARCH) != 0) ? "_spawnvp" : "_spawnv";
}
- pid = (flags & PEXECUTE_SEARCH ? _spawnvp : _spawnv)
- (_P_NOWAIT, program, fix_argv(argv));
-
- if (input_desc != STDIN_FILE_NO)
+ if (in != STDIN_FILE_NO)
{
- dup2 (org_stdin, STDIN_FILE_NO);
- close (org_stdin);
+ if (_dup2 (org_in, STDIN_FILE_NO) < 0)
+ {
+ *err = errno;
+ *errmsg = "_dup2";
+ return -1;
+ }
+ if (_close (org_in) < 0)
+ {
+ *err = errno;
+ *errmsg = "_close";
+ return -1;
+ }
}
- if (output_desc != STDOUT_FILE_NO)
+ if (out != STDOUT_FILE_NO)
{
- dup2 (org_stdout, STDOUT_FILE_NO);
- close (org_stdout);
+ if (_dup2 (org_out, STDOUT_FILE_NO) < 0)
+ {
+ *err = errno;
+ *errmsg = "_dup2";
+ return -1;
+ }
+ if (_close (org_out) < 0)
+ {
+ *err = errno;
+ *errmsg = "_close";
+ return -1;
+ }
}
- if (pid == -1)
+ if (errdes != STDERR_FILE_NO
+ || (flags & PEX_STDERR_TO_STDOUT) != 0)
{
- *errmsg_fmt = install_error_msg;
- *errmsg_arg = (char*) program;
- return -1;
+ if (_dup2 (org_errdes, STDERR_FILE_NO) < 0)
+ {
+ *err = errno;
+ *errmsg = "_dup2";
+ return -1;
+ }
+ if (_close (org_errdes) < 0)
+ {
+ *err = errno;
+ *errmsg = "_close";
+ return -1;
+ }
}
return pid;
}
-/* MS CRTDLL doesn't return enough information in status to decide if the
- child exited due to a signal or not, rather it simply returns an
- integer with the exit code of the child; eg., if the child exited with
- an abort() call and didn't have a handler for SIGABRT, it simply returns
- with status = 3. We fix the status code to conform to the usual WIF*
- macros. Note that WIFSIGNALED will never be true under CRTDLL. */
-
-int
-pwait (pid, status, flags)
- int pid;
- int *status;
- int flags ATTRIBUTE_UNUSED;
+/* Wait for a child process to complete. MS CRTDLL doesn't return
+ enough information in status to decide if the child exited due to a
+ signal or not, rather it simply returns an integer with the exit
+ code of the child; eg., if the child exited with an abort() call
+ and didn't have a handler for SIGABRT, it simply returns with
+ status == 3. We fix the status code to conform to the usual WIF*
+ macros. Note that WIFSIGNALED will never be true under CRTDLL. */
+
+static int
+pex_win32_wait (struct pex_obj *obj ATTRIBUTE_UNUSED, long pid,
+ int *status, struct pex_time *time, int done ATTRIBUTE_UNUSED,
+ const char **errmsg, int *err)
{
int termstat;
- pid = _cwait (&termstat, pid, WAIT_CHILD);
+ if (time != NULL)
+ memset (time, 0, sizeof *time);
+
+ /* FIXME: If done is non-zero, we should probably try to kill the
+ process. */
+
+ if (_cwait (&termstat, pid, WAIT_CHILD) < 0)
+ {
+ *err = errno;
+ *errmsg = "_cwait";
+ return -1;
+ }
- /* ??? Here's an opportunity to canonicalize the values in STATUS.
- Needed? */
+ /* cwait returns the child process exit code in termstat. A value
+ of 3 indicates that the child caught a signal, but not which one.
+ Since only SIGABRT, SIGFPE and SIGINT do anything, we report
+ SIGABRT. */
- /* cwait returns the child process exit code in termstat.
- A value of 3 indicates that the child caught a signal, but not
- which one. Since only SIGABRT, SIGFPE and SIGINT do anything, we
- report SIGABRT. */
if (termstat == 3)
*status = SIGABRT;
else
- *status = (((termstat) & 0xff) << 8);
+ *status = ((termstat & 0xff) << 8);
- return pid;
+ return 0;
+}
+
+/* Create a pipe. */
+
+static int
+pex_win32_pipe (struct pex_obj *obj ATTRIBUTE_UNUSED, int *p,
+ int binary)
+{
+ return _pipe (p, 256, binary ? _O_BINARY : _O_TEXT);
+}
+
+/* Get a FILE pointer to read from a file descriptor. */
+
+static FILE *
+pex_win32_fdopenr (struct pex_obj *obj ATTRIBUTE_UNUSED, int fd,
+ int binary)
+{
+ return fdopen (fd, binary ? "rb" : "r");
}
diff --git a/libiberty/pexecute.txh b/libiberty/pexecute.txh
index 269f031cc72..c06d55cd315 100644
--- a/libiberty/pexecute.txh
+++ b/libiberty/pexecute.txh
@@ -1,63 +1,185 @@
-@deftypefn Extension int pexecute (const char *@var{program}, char * const *@var{argv}, const char *@var{this_pname}, const char *@var{temp_base}, char **@var{errmsg_fmt}, char **@var{errmsg_arg}, int flags)
+@deftypefn Extension struct pex_obj *pex_init (int @var{flags}, const char *@var{pname}, const char *@var{tempbase})
-Executes a program.
+Prepare to execute one or more programs, with standard output of each
+program fed to standard input of the next. This is a system
+independent interface to execute a pipeline.
-@var{program} and @var{argv} are the arguments to
-@code{execv}/@code{execvp}.
+@var{flags} is a bitwise combination of the following:
-@var{this_pname} is name of the calling program (i.e., @code{argv[0]}).
+@table @code
-@var{temp_base} is the path name, sans suffix, of a temporary file to
-use if needed. This is currently only needed for MS-DOS ports that
-don't use @code{go32} (do any still exist?). Ports that don't need it
-can pass @code{NULL}.
+@vindex PEX_RECORD_TIMES
+@item PEX_RECORD_TIMES
+Record subprocess times if possible.
-(@code{@var{flags} & PEXECUTE_SEARCH}) is non-zero if @env{PATH}
-should be searched (??? It's not clear that GCC passes this flag
-correctly). (@code{@var{flags} & PEXECUTE_FIRST}) is nonzero for the
-first process in chain. (@code{@var{flags} & PEXECUTE_FIRST}) is
-nonzero for the last process in chain. The first/last flags could be
-simplified to only mark the last of a chain of processes but that
-requires the caller to always mark the last one (and not give up
-early if some error occurs). It's more robust to require the caller
-to mark both ends of the chain.
+@vindex PEX_USE_PIPES
+@item PEX_USE_PIPES
+Use pipes for communication between processes, if possible.
-The result is the pid on systems like Unix where we
-@code{fork}/@code{exec} and on systems like WIN32 and OS/2 where we
-use @code{spawn}. It is up to the caller to wait for the child.
+@vindex PEX_SAVE_TEMPS
+@item PEX_SAVE_TEMPS
+Don't delete temporary files used for communication between
+processes.
-The result is the @code{WEXITSTATUS} on systems like MS-DOS where we
-@code{spawn} and wait for the child here.
+@end table
-Upon failure, @var{errmsg_fmt} and @var{errmsg_arg} are set to the
-text of the error message with an optional argument (if not needed,
-@var{errmsg_arg} is set to @code{NULL}), and @minus{}1 is returned.
-@code{errno} is available to the caller to use.
+@var{pname} is the name of program to be executed, used in error
+messages. @var{tempbase} is a base name to use for any required
+temporary files; it may be @code{NULL} to use a randomly chosen name.
@end deftypefn
-@deftypefn Extension int pwait (int @var{pid}, int *@var{status}, int @var{flags})
+@deftypefn Extension const char *pex_run (struct pex_obj *@var{obj}, int @var{flags}, const char *@var{executable}, char * const *@var{argv}, const char *@var{outname}, const char *@var{errname}, int *@var{err})
+
+Execute one program in a pipeline. On success this returns
+@code{NULL}. On failure it returns an error message, a statically
+allocated string.
+
+@var{obj} is returned by a previous call to @code{pex_init}.
+
+@var{flags} is a bitwise combination of the following:
+
+@table @code
+
+@vindex PEX_LAST
+@item PEX_LAST
+This must be set on the last program in the pipeline. In particular,
+it should be set when executing a single program. The standard output
+of the program will be sent to @var{outname}, or, if @var{outname} is
+@code{NULL}, to the standard output of the calling program. This
+should not be set if you want to call @code{pex_read_output}
+(described below). After a call to @code{pex_run} with this bit set,
+@var{pex_run} may no longer be called with the same @var{obj}.
+
+@vindex PEX_SEARCH
+@item PEX_SEARCH
+Search for the program using the user's executable search path.
+
+@vindex PEX_SUFFIX
+@item PEX_SUFFIX
+@var{outname} is a suffix. See the description of @var{outname},
+below.
+
+@vindex PEX_STDERR_TO_STDOUT
+@item PEX_STDERR_TO_STDOUT
+Send the program's standard error to standard output, if possible.
+
+@vindex PEX_BINARY_INPUT
+@vindex PEX_BINARY_OUTPUT
+@item PEX_BINARY_INPUT
+@itemx PEX_BINARY_OUTPUT
+The standard input (output) of the program should be read (written) in
+binary mode rather than text mode. These flags are ignored on systems
+which do not distinguish binary mode and text mode, such as Unix. For
+proper behavior these flags should match appropriately--a call to
+@code{pex_run} using @code{PEX_BINARY_OUTPUT} should be followed by a
+call using @code{PEX_BINARY_INPUT}.
+@end table
+
+@var{executable} is the program to execute. @var{argv} is the set of
+arguments to pass to the program; normally @code{@var{argv}[0]} will
+be a copy of @var{executable}.
+
+@var{outname} is used to set the name of the file to use for standard
+output. There are two cases in which no output file will be used: 1)
+if @code{PEX_LAST} is not set in @var{flags}, and @code{PEX_USE_PIPES}
+was set in the call to @code{pex_init}, and the system supports pipes;
+2) if @code{PEX_LAST} is set in @var{flags}, and @var{outname} is
+@code{NULL}. Otherwise the code will use a file to hold standard
+output. If @code{PEX_LAST} is not set, this file is considered to be
+a temporary file, and it will be removed when no longer needed, unless
+@code{PEX_SAVE_TEMPS} was set in the call to @code{pex_init}.
+
+There are two cases to consider when setting the name of the file to
+hold standard output.
+
+First case: @code{PEX_SUFFIX} is set in @var{flags}. In this case
+@var{outname} may not be @code{NULL}. If the @var{tempbase} parameter
+to @code{pex_init} was not @code{NULL}, then the output file name is
+the concatenation of @var{tempbase} and @var{outname}. If
+@var{tempbase} was @code{NULL}, then the output file name is a random
+file name ending in @var{outname}.
+
+Second case: @code{PEX_SUFFIX} was not set in @var{flags}. In this
+case, if @var{outname} is not @code{NULL}, it is used as the output
+file name. If @var{outname} is @code{NULL}, and @var{tempbase} was
+not NULL, the output file name is randomly chosen using
+@var{tempbase}. Otherwise the output file name is chosen completely
+at random.
+
+@var{errname} is the file name to use for standard error output. If
+it is @code{NULL}, standard error is the same as the caller.
+Otherwise, standard error is written to the named file.
+
+On an error return, the code sets @code{*@var{err}} to an @code{errno}
+value, or to 0 if there is no relevant @code{errno}.
+
+@end deftypefn
+
+@deftypefn Extension FILE * pex_read_output (struct pex_obj *@var{obj}, int @var{binary})
+
+Returns a @code{FILE} pointer which may be used to read the standard
+output of the last program in the pipeline. When this is used,
+@code{PEX_LAST} should not be used in a call to @code{pex_run}. After
+this is called, @code{pex_run} may no longer be called with the same
+@var{obj}. @var{binary} should be non-zero if the file should be
+opened in binary mode. Don't call @code{fclose} on the returned file;
+it will be closed by @code{pex_free}.
+
+@end deftypefn
+
+@deftypefn Extension int pex_get_status (struct pex_obj *@var{obj}, int @var{count}, int *@var{vector})
+
+Returns the exit status of all programs run using @var{obj}.
+@var{count} is the number of results expected. The results will be
+placed into @var{vector}. The results are in the order of the calls
+to @code{pex_run}. Returns 0 on error, 1 on success.
+
+@end deftypefn
+
+@deftypefn Extension int pex_get_times (struct pex_obj *@var{obj}, int @var{count}, struct pex_time *@var{vector})
-Waits for a program started by @code{pexecute} to finish.
+Returns the process execution times of all programs run using
+@var{obj}. @var{count} is the number of results expected. The
+results will be placed into @var{vector}. The results are in the
+order of the calls to @code{pex_run}. Returns 0 on error, 1 on
+success.
-@var{pid} is the process id of the task to wait for. @var{status} is
-the `status' argument to wait. @var{flags} is currently unused
-(allows future enhancement without breaking upward compatibility).
-Pass 0 for now.
+@code{struct pex_time} has the following fields: @code{user_seconds},
+@code{user_microseconds}, @code{system_seconds},
+@code{system_microseconds}. On systems which do not support reporting
+process times, all the fields will be set to @code{0}.
-The result is the pid of the child reaped, or -1 for failure
-(@code{errno} says why).
+@end deftypefn
+
+@deftypefn Extension void pex_free (struct pex_obj @var{obj})
-On systems that don't support waiting for a particular child,
-@var{pid} is ignored. On systems like MS-DOS that don't really
-multitask @code{pwait} is just a mechanism to provide a consistent
-interface for the caller.
+Clean up and free all data associated with @var{obj}.
@end deftypefn
-@undocumented pfinish
+@deftypefn Extension const char *pex_one (int @var{flags}, const char *@var{executable}, char * const *@var{argv}, const char *@var{pname}, const char *@var{outname}, const char *@var{errname}, int *@var{status}, int *@var{err})
+
+An interface to @code{pex_init} to permit the easy execution of a
+single program. The return value and most of the parameters are as
+for a call to @code{pex_run}. @var{flags} is restricted to a
+combination of @code{PEX_SEARCH}, @code{PEX_STDERR_TO_STDOUT}, and
+@code{PEX_BINARY_OUTPUT}. @var{outname} is interpreted as if
+@code{PEX_LAST} were set. On a successful return, *@var{status} will
+be set to the exit status of the program.
+
+@end deftypefn
+
+@deftypefn Extension int pexecute (const char *@var{program}, char * const *@var{argv}, const char *@var{this_pname}, const char *@var{temp_base}, char **@var{errmsg_fmt}, char **@var{errmsg_arg}, int flags)
-pfinish: finish generation of script
+This is the old interface to execute one or more programs. It is
+still supported for compatibility purposes, but is no longer
+documented.
-pfinish is necessary for systems like MPW where a script is generated
-that runs the requested programs.
+@end deftypefn
+
+@deftypefn Extension int pwait (int @var{pid}, int *@var{status}, int @var{flags})
+
+Another part of the old execution interface.
+
+@end deftypefn
diff --git a/libiberty/physmem.c b/libiberty/physmem.c
index f64e07c74d4..9c6d9cb8059 100644
--- a/libiberty/physmem.c
+++ b/libiberty/physmem.c
@@ -1,5 +1,5 @@
/* Calculate the size of physical memory.
- Copyright 2000, 2001, 2003 Free Software Foundation, Inc.
+ Copyright 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -80,7 +80,7 @@ typedef WINBOOL (WINAPI *PFN_MS_EX) (lMEMORYSTATUSEX*);
/* Return the total amount of physical memory. */
double
-physmem_total ()
+physmem_total (void)
{
#if defined _SC_PHYS_PAGES && defined _SC_PAGESIZE
{ /* This works on linux-gnu, solaris2 and cygwin. */
@@ -184,7 +184,7 @@ physmem_total ()
/* Return the amount of physical memory available. */
double
-physmem_available ()
+physmem_available (void)
{
#if defined _SC_AVPHYS_PAGES && defined _SC_PAGESIZE
{ /* This works on linux-gnu, solaris2 and cygwin. */
@@ -290,7 +290,7 @@ physmem_available ()
# include <stdlib.h>
int
-main ()
+main (void)
{
printf ("%12.f %12.f\n", physmem_total (), physmem_available ());
exit (0);
diff --git a/libiberty/putenv.c b/libiberty/putenv.c
index 6d027dc5aaa..e04b759104b 100644
--- a/libiberty/putenv.c
+++ b/libiberty/putenv.c
@@ -67,8 +67,7 @@ extern char *alloca ();
/* Put STRING, which is of the form "NAME=VALUE", in the environment. */
int
-putenv (string)
- const char *string;
+putenv (const char *string)
{
const char *const name_end = strchr (string, '=');
diff --git a/libiberty/random.c b/libiberty/random.c
index 48035f0821f..c306698a538 100644
--- a/libiberty/random.c
+++ b/libiberty/random.c
@@ -80,7 +80,7 @@ control over the state of the random number generator.
#endif
-long int random ();
+long int random (void);
/* An improved random number generation package. In addition to the standard
rand()/srand() like interface, this package also has a special state info
@@ -227,8 +227,7 @@ static long int *end_ptr = &randtbl[sizeof(randtbl) / sizeof(randtbl[0])];
introduced by the L.C.R.N.G. Note that the initialization of randtbl[]
for default usage relies on values produced by this routine. */
void
-srandom (x)
- unsigned int x;
+srandom (unsigned int x)
{
state[0] = x;
if (rand_type != TYPE_0)
@@ -255,10 +254,7 @@ srandom (x)
setstate so that it doesn't matter when initstate is called.
Returns a pointer to the old state. */
PTR
-initstate (seed, arg_state, n)
- unsigned int seed;
- PTR arg_state;
- unsigned long n;
+initstate (unsigned int seed, PTR arg_state, unsigned long n)
{
PTR ostate = (PTR) &state[-1];
@@ -324,8 +320,7 @@ initstate (seed, arg_state, n)
Returns a pointer to the old state information. */
PTR
-setstate (arg_state)
- PTR arg_state;
+setstate (PTR arg_state)
{
register long int *new_state = (long int *) arg_state;
register int type = new_state[0] % MAX_TYPES;
@@ -378,7 +373,7 @@ setstate (arg_state)
pointer if the front one has wrapped. Returns a 31-bit random number. */
long int
-random ()
+random (void)
{
if (rand_type == TYPE_0)
{
diff --git a/libiberty/regex.c b/libiberty/regex.c
index 3babf6cbe34..779998278b9 100644
--- a/libiberty/regex.c
+++ b/libiberty/regex.c
@@ -40,14 +40,6 @@
#include <ansidecl.h>
-#ifndef PARAMS
-# if defined __GNUC__ || (defined __STDC__ && __STDC__)
-# define PARAMS(args) args
-# else
-# define PARAMS(args) ()
-# endif /* GCC. */
-#endif /* Not PARAMS. */
-
#ifndef INSIDE_RECURSION
# if defined STDC_HEADERS && !defined emacs
@@ -277,10 +269,10 @@ extern char *re_syntax_table;
static char re_syntax_table[CHAR_SET_SIZE];
-static void init_syntax_once PARAMS ((void));
+static void init_syntax_once (void);
static void
-init_syntax_once ()
+init_syntax_once (void)
{
register int c;
static int done = 0;
@@ -411,44 +403,44 @@ typedef char boolean;
# define false 0
# define true 1
-static reg_errcode_t byte_regex_compile _RE_ARGS ((const char *pattern, size_t size,
- reg_syntax_t syntax,
- struct re_pattern_buffer *bufp));
-
-static int byte_re_match_2_internal PARAMS ((struct re_pattern_buffer *bufp,
- const char *string1, int size1,
- const char *string2, int size2,
- int pos,
- struct re_registers *regs,
- int stop));
-static int byte_re_search_2 PARAMS ((struct re_pattern_buffer *bufp,
- const char *string1, int size1,
- const char *string2, int size2,
- int startpos, int range,
- struct re_registers *regs, int stop));
-static int byte_re_compile_fastmap PARAMS ((struct re_pattern_buffer *bufp));
+static reg_errcode_t byte_regex_compile (const char *pattern, size_t size,
+ reg_syntax_t syntax,
+ struct re_pattern_buffer *bufp);
+
+static int byte_re_match_2_internal (struct re_pattern_buffer *bufp,
+ const char *string1, int size1,
+ const char *string2, int size2,
+ int pos,
+ struct re_registers *regs,
+ int stop);
+static int byte_re_search_2 (struct re_pattern_buffer *bufp,
+ const char *string1, int size1,
+ const char *string2, int size2,
+ int startpos, int range,
+ struct re_registers *regs, int stop);
+static int byte_re_compile_fastmap (struct re_pattern_buffer *bufp);
#ifdef MBS_SUPPORT
-static reg_errcode_t wcs_regex_compile _RE_ARGS ((const char *pattern, size_t size,
- reg_syntax_t syntax,
- struct re_pattern_buffer *bufp));
-
-
-static int wcs_re_match_2_internal PARAMS ((struct re_pattern_buffer *bufp,
- const char *cstring1, int csize1,
- const char *cstring2, int csize2,
- int pos,
- struct re_registers *regs,
- int stop,
- wchar_t *string1, int size1,
- wchar_t *string2, int size2,
- int *mbs_offset1, int *mbs_offset2));
-static int wcs_re_search_2 PARAMS ((struct re_pattern_buffer *bufp,
- const char *string1, int size1,
- const char *string2, int size2,
- int startpos, int range,
- struct re_registers *regs, int stop));
-static int wcs_re_compile_fastmap PARAMS ((struct re_pattern_buffer *bufp));
+static reg_errcode_t wcs_regex_compile (const char *pattern, size_t size,
+ reg_syntax_t syntax,
+ struct re_pattern_buffer *bufp);
+
+
+static int wcs_re_match_2_internal (struct re_pattern_buffer *bufp,
+ const char *cstring1, int csize1,
+ const char *cstring2, int csize2,
+ int pos,
+ struct re_registers *regs,
+ int stop,
+ wchar_t *string1, int size1,
+ wchar_t *string2, int size2,
+ int *mbs_offset1, int *mbs_offset2);
+static int wcs_re_search_2 (struct re_pattern_buffer *bufp,
+ const char *string1, int size1,
+ const char *string2, int size2,
+ int startpos, int range,
+ struct re_registers *regs, int stop);
+static int wcs_re_compile_fastmap (struct re_pattern_buffer *bufp);
#endif
/* These are the command codes that appear in compiled regular
@@ -616,11 +608,7 @@ typedef enum
# define UCHAR_T unsigned char
# define COMPILED_BUFFER_VAR bufp->buffer
# define OFFSET_ADDRESS_SIZE 2
-# if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
-# define PREFIX(name) byte_##name
-# else
-# define PREFIX(name) byte_/**/name
-# endif
+# define PREFIX(name) byte_##name
# define ARG_PREFIX(name) name
# define PUT_CHAR(c) putchar (c)
#else
@@ -630,13 +618,8 @@ typedef enum
# define COMPILED_BUFFER_VAR wc_buffer
# define OFFSET_ADDRESS_SIZE 1 /* the size which STORE_NUMBER macro use */
# define CHAR_CLASS_SIZE ((__alignof__(wctype_t)+sizeof(wctype_t))/sizeof(CHAR_T)+1)
-# if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
-# define PREFIX(name) wcs_##name
-# define ARG_PREFIX(name) c##name
-# else
-# define PREFIX(name) wcs_/**/name
-# define ARG_PREFIX(name) c/**/name
-# endif
+# define PREFIX(name) wcs_##name
+# define ARG_PREFIX(name) c##name
/* Should we use wide stream?? */
# define PUT_CHAR(c) printf ("%C", c);
# define TRUE 1
@@ -703,11 +686,9 @@ typedef enum
# endif
# ifdef DEBUG
-static void PREFIX(extract_number) _RE_ARGS ((int *dest, UCHAR_T *source));
+static void PREFIX(extract_number) (int *dest, UCHAR_T *source);
static void
-PREFIX(extract_number) (dest, source)
- int *dest;
- UCHAR_T *source;
+PREFIX(extract_number) (int *dest, UCHAR_T *source)
{
# ifdef WCHAR
*dest = *source;
@@ -735,12 +716,10 @@ PREFIX(extract_number) (dest, source)
} while (0)
# ifdef DEBUG
-static void PREFIX(extract_number_and_incr) _RE_ARGS ((int *destination,
- UCHAR_T **source));
+static void PREFIX(extract_number_and_incr) (int *destination,
+ UCHAR_T **source);
static void
-PREFIX(extract_number_and_incr) (destination, source)
- int *destination;
- UCHAR_T **source;
+PREFIX(extract_number_and_incr) (int *destination, UCHAR_T **source)
{
PREFIX(extract_number) (destination, *source);
*source += OFFSET_ADDRESS_SIZE;
@@ -791,8 +770,7 @@ static int debug;
# ifndef DEFINED_ONCE
void
-print_fastmap (fastmap)
- char *fastmap;
+print_fastmap (char *fastmap)
{
unsigned was_a_range = 0;
unsigned i = 0;
@@ -824,9 +802,7 @@ print_fastmap (fastmap)
the START pointer into it and ending just before the pointer END. */
void
-PREFIX(print_partial_compiled_pattern) (start, end)
- UCHAR_T *start;
- UCHAR_T *end;
+PREFIX(print_partial_compiled_pattern) (UCHAR_T *start, UCHAR_T *end)
{
int mcnt, mcnt2;
UCHAR_T *p1;
@@ -1159,8 +1135,7 @@ PREFIX(print_partial_compiled_pattern) (start, end)
void
-PREFIX(print_compiled_pattern) (bufp)
- struct re_pattern_buffer *bufp;
+PREFIX(print_compiled_pattern) (struct re_pattern_buffer *bufp)
{
UCHAR_T *buffer = (UCHAR_T*) bufp->buffer;
@@ -1192,12 +1167,8 @@ PREFIX(print_compiled_pattern) (bufp)
void
-PREFIX(print_double_string) (where, string1, size1, string2, size2)
- const CHAR_T *where;
- const CHAR_T *string1;
- const CHAR_T *string2;
- int size1;
- int size2;
+PREFIX(print_double_string) (const CHAR_T *where, const CHAR_T *string1,
+ int size1, const CHAR_T *string2, int size2)
{
int this_char;
@@ -1230,8 +1201,7 @@ PREFIX(print_double_string) (where, string1, size1, string2, size2)
# ifndef DEFINED_ONCE
void
-printchar (c)
- int c;
+printchar (int c)
{
putc (c, stderr);
}
@@ -1268,11 +1238,8 @@ static size_t convert_mbs_to_wcs (CHAR_T *dest, const unsigned char* src,
size_t len, int *offset_buffer,
char *is_binary);
static size_t
-convert_mbs_to_wcs (dest, src, len, offset_buffer, is_binary)
- CHAR_T *dest;
- const unsigned char* src;
- size_t len; /* the length of multibyte string. */
-
+convert_mbs_to_wcs (CHAR_T *dest, const unsigned char*src, size_t len,
+ int *offset_buffer, char *is_binary)
/* It hold correspondances between src(char string) and
dest(wchar_t string) for optimization.
e.g. src = "xxxyzz"
@@ -1282,8 +1249,6 @@ convert_mbs_to_wcs (dest, src, len, offset_buffer, is_binary)
offset_buffer = {0, 0+3("xxx"), 0+3+1("y"), 0+3+1+2("zz")}
= {0, 3, 4, 6}
*/
- int *offset_buffer;
- char *is_binary;
{
wchar_t *pdest = dest;
const unsigned char *psrc = src;
@@ -1354,8 +1319,7 @@ reg_syntax_t re_syntax_options;
defined in regex.h. We return the old syntax. */
reg_syntax_t
-re_set_syntax (syntax)
- reg_syntax_t syntax;
+re_set_syntax (reg_syntax_t syntax)
{
reg_syntax_t ret = re_syntax_options;
@@ -1874,35 +1838,35 @@ static CHAR_T PREFIX(reg_unset_dummy);
# define REG_UNSET(e) ((e) == REG_UNSET_VALUE)
/* Subroutine declarations and macros for regex_compile. */
-static void PREFIX(store_op1) _RE_ARGS ((re_opcode_t op, UCHAR_T *loc, int arg));
-static void PREFIX(store_op2) _RE_ARGS ((re_opcode_t op, UCHAR_T *loc,
- int arg1, int arg2));
-static void PREFIX(insert_op1) _RE_ARGS ((re_opcode_t op, UCHAR_T *loc,
- int arg, UCHAR_T *end));
-static void PREFIX(insert_op2) _RE_ARGS ((re_opcode_t op, UCHAR_T *loc,
- int arg1, int arg2, UCHAR_T *end));
-static boolean PREFIX(at_begline_loc_p) _RE_ARGS ((const CHAR_T *pattern,
- const CHAR_T *p,
- reg_syntax_t syntax));
-static boolean PREFIX(at_endline_loc_p) _RE_ARGS ((const CHAR_T *p,
- const CHAR_T *pend,
- reg_syntax_t syntax));
+static void PREFIX(store_op1) (re_opcode_t op, UCHAR_T *loc, int arg);
+static void PREFIX(store_op2) (re_opcode_t op, UCHAR_T *loc,
+ int arg1, int arg2);
+static void PREFIX(insert_op1) (re_opcode_t op, UCHAR_T *loc,
+ int arg, UCHAR_T *end);
+static void PREFIX(insert_op2) (re_opcode_t op, UCHAR_T *loc,
+ int arg1, int arg2, UCHAR_T *end);
+static boolean PREFIX(at_begline_loc_p) (const CHAR_T *pattern,
+ const CHAR_T *p,
+ reg_syntax_t syntax);
+static boolean PREFIX(at_endline_loc_p) (const CHAR_T *p,
+ const CHAR_T *pend,
+ reg_syntax_t syntax);
# ifdef WCHAR
-static reg_errcode_t wcs_compile_range _RE_ARGS ((CHAR_T range_start,
- const CHAR_T **p_ptr,
- const CHAR_T *pend,
- char *translate,
- reg_syntax_t syntax,
- UCHAR_T *b,
- CHAR_T *char_set));
-static void insert_space _RE_ARGS ((int num, CHAR_T *loc, CHAR_T *end));
+static reg_errcode_t wcs_compile_range (CHAR_T range_start,
+ const CHAR_T **p_ptr,
+ const CHAR_T *pend,
+ char *translate,
+ reg_syntax_t syntax,
+ UCHAR_T *b,
+ CHAR_T *char_set);
+static void insert_space (int num, CHAR_T *loc, CHAR_T *end);
# else /* BYTE */
-static reg_errcode_t byte_compile_range _RE_ARGS ((unsigned int range_start,
- const char **p_ptr,
- const char *pend,
- char *translate,
- reg_syntax_t syntax,
- unsigned char *b));
+static reg_errcode_t byte_compile_range (unsigned int range_start,
+ const char **p_ptr,
+ const char *pend,
+ char *translate,
+ reg_syntax_t syntax,
+ unsigned char *b);
# endif /* WCHAR */
/* Fetch the next character in the uncompiled pattern---translating it
@@ -2260,8 +2224,7 @@ static PREFIX(register_info_type) *PREFIX(reg_info_dummy);
but don't make them smaller. */
static void
-PREFIX(regex_grow_registers) (num_regs)
- int num_regs;
+PREFIX(regex_grow_registers) (int num_regs)
{
if (num_regs > regs_allocated_size)
{
@@ -2282,9 +2245,8 @@ PREFIX(regex_grow_registers) (num_regs)
# endif /* not MATCH_MAY_ALLOCATE */
# ifndef DEFINED_ONCE
-static boolean group_in_compile_stack _RE_ARGS ((compile_stack_type
- compile_stack,
- regnum_t regnum));
+static boolean group_in_compile_stack (compile_stack_type compile_stack,
+ regnum_t regnum);
# endif /* not DEFINED_ONCE */
/* `regex_compile' compiles PATTERN (of length SIZE) according to SYNTAX.
@@ -2315,11 +2277,9 @@ static boolean group_in_compile_stack _RE_ARGS ((compile_stack_type
# endif /* WCHAR */
static reg_errcode_t
-PREFIX(regex_compile) (ARG_PREFIX(pattern), ARG_PREFIX(size), syntax, bufp)
- const char *ARG_PREFIX(pattern);
- size_t ARG_PREFIX(size);
- reg_syntax_t syntax;
- struct re_pattern_buffer *bufp;
+PREFIX(regex_compile) (const char *ARG_PREFIX(pattern),
+ size_t ARG_PREFIX(size), reg_syntax_t syntax,
+ struct re_pattern_buffer *bufp)
{
/* We fetch characters from PATTERN here. Even though PATTERN is
`char *' (i.e., signed), we declare these variables as unsigned, so
@@ -4264,10 +4224,7 @@ PREFIX(regex_compile) (ARG_PREFIX(pattern), ARG_PREFIX(size), syntax, bufp)
/* ifdef WCHAR, integer parameter is 1 wchar_t. */
static void
-PREFIX(store_op1) (op, loc, arg)
- re_opcode_t op;
- UCHAR_T *loc;
- int arg;
+PREFIX(store_op1) (re_opcode_t op, UCHAR_T *loc, int arg)
{
*loc = (UCHAR_T) op;
STORE_NUMBER (loc + 1, arg);
@@ -4278,10 +4235,7 @@ PREFIX(store_op1) (op, loc, arg)
/* ifdef WCHAR, integer parameter is 1 wchar_t. */
static void
-PREFIX(store_op2) (op, loc, arg1, arg2)
- re_opcode_t op;
- UCHAR_T *loc;
- int arg1, arg2;
+PREFIX(store_op2) (re_opcode_t op, UCHAR_T *loc, int arg1, int arg2)
{
*loc = (UCHAR_T) op;
STORE_NUMBER (loc + 1, arg1);
@@ -4294,11 +4248,7 @@ PREFIX(store_op2) (op, loc, arg1, arg2)
/* ifdef WCHAR, integer parameter is 1 wchar_t. */
static void
-PREFIX(insert_op1) (op, loc, arg, end)
- re_opcode_t op;
- UCHAR_T *loc;
- int arg;
- UCHAR_T *end;
+PREFIX(insert_op1) (re_opcode_t op, UCHAR_T *loc, int arg, UCHAR_T *end)
{
register UCHAR_T *pfrom = end;
register UCHAR_T *pto = end + 1 + OFFSET_ADDRESS_SIZE;
@@ -4314,11 +4264,8 @@ PREFIX(insert_op1) (op, loc, arg, end)
/* ifdef WCHAR, integer parameter is 1 wchar_t. */
static void
-PREFIX(insert_op2) (op, loc, arg1, arg2, end)
- re_opcode_t op;
- UCHAR_T *loc;
- int arg1, arg2;
- UCHAR_T *end;
+PREFIX(insert_op2) (re_opcode_t op, UCHAR_T *loc, int arg1,
+ int arg2, UCHAR_T *end)
{
register UCHAR_T *pfrom = end;
register UCHAR_T *pto = end + 1 + 2 * OFFSET_ADDRESS_SIZE;
@@ -4335,9 +4282,8 @@ PREFIX(insert_op2) (op, loc, arg1, arg2, end)
least one character before the ^. */
static boolean
-PREFIX(at_begline_loc_p) (pattern, p, syntax)
- const CHAR_T *pattern, *p;
- reg_syntax_t syntax;
+PREFIX(at_begline_loc_p) (const CHAR_T *pattern, const CHAR_T *p,
+ reg_syntax_t syntax)
{
const CHAR_T *prev = p - 2;
boolean prev_prev_backslash = prev > pattern && prev[-1] == '\\';
@@ -4354,9 +4300,8 @@ PREFIX(at_begline_loc_p) (pattern, p, syntax)
at least one character after the $, i.e., `P < PEND'. */
static boolean
-PREFIX(at_endline_loc_p) (p, pend, syntax)
- const CHAR_T *p, *pend;
- reg_syntax_t syntax;
+PREFIX(at_endline_loc_p) (const CHAR_T *p, const CHAR_T *pend,
+ reg_syntax_t syntax)
{
const CHAR_T *next = p;
boolean next_backslash = *next == '\\';
@@ -4377,9 +4322,7 @@ PREFIX(at_endline_loc_p) (p, pend, syntax)
false if it's not. */
static boolean
-group_in_compile_stack (compile_stack, regnum)
- compile_stack_type compile_stack;
- regnum_t regnum;
+group_in_compile_stack (compile_stack_type compile_stack, regnum_t regnum)
{
int this_element;
@@ -4399,10 +4342,7 @@ group_in_compile_stack (compile_stack, regnum)
/* This insert space, which size is "num", into the pattern at "loc".
"end" must point the end of the allocated buffer. */
static void
-insert_space (num, loc, end)
- int num;
- CHAR_T *loc;
- CHAR_T *end;
+insert_space (int num, CHAR_T *loc, CHAR_T *end)
{
register CHAR_T *pto = end;
register CHAR_T *pfrom = end - num;
@@ -4414,13 +4354,9 @@ insert_space (num, loc, end)
#ifdef WCHAR
static reg_errcode_t
-wcs_compile_range (range_start_char, p_ptr, pend, translate, syntax, b,
- char_set)
- CHAR_T range_start_char;
- const CHAR_T **p_ptr, *pend;
- CHAR_T *char_set, *b;
- RE_TRANSLATE_TYPE translate;
- reg_syntax_t syntax;
+wcs_compile_range (CHAR_T range_start_char, const CHAR_T **p_ptr,
+ const CHAR_T *pend, RE_TRANSLATE_TYPE translate,
+ reg_syntax_t syntax, CHAR_T *b, CHAR_T *char_set)
{
const CHAR_T *p = *p_ptr;
CHAR_T range_start, range_end;
@@ -4501,12 +4437,9 @@ wcs_compile_range (range_start_char, p_ptr, pend, translate, syntax, b,
`regex_compile' itself. */
static reg_errcode_t
-byte_compile_range (range_start_char, p_ptr, pend, translate, syntax, b)
- unsigned int range_start_char;
- const char **p_ptr, *pend;
- RE_TRANSLATE_TYPE translate;
- reg_syntax_t syntax;
- unsigned char *b;
+byte_compile_range (unsigned int range_start_char, const char **p_ptr,
+ const char *pend, RE_TRANSLATE_TYPE translate,
+ reg_syntax_t syntax, unsigned char *b)
{
unsigned this_char;
const char *p = *p_ptr;
@@ -4587,8 +4520,7 @@ byte_compile_range (range_start_char, p_ptr, pend, translate, syntax, b)
static unsigned char truncate_wchar (CHAR_T c);
static unsigned char
-truncate_wchar (c)
- CHAR_T c;
+truncate_wchar (CHAR_T c)
{
unsigned char buf[MB_CUR_MAX];
mbstate_t state;
@@ -4604,8 +4536,7 @@ truncate_wchar (c)
#endif /* WCHAR */
static int
-PREFIX(re_compile_fastmap) (bufp)
- struct re_pattern_buffer *bufp;
+PREFIX(re_compile_fastmap) (struct re_pattern_buffer *bufp)
{
int j, k;
#ifdef MATCH_MAY_ALLOCATE
@@ -4924,8 +4855,7 @@ PREFIX(re_compile_fastmap) (bufp)
#else /* not INSIDE_RECURSION */
int
-re_compile_fastmap (bufp)
- struct re_pattern_buffer *bufp;
+re_compile_fastmap (struct re_pattern_buffer *bufp)
{
# ifdef MBS_SUPPORT
if (MB_CUR_MAX != 1)
@@ -4953,11 +4883,9 @@ weak_alias (__re_compile_fastmap, re_compile_fastmap)
freeing the old data. */
void
-re_set_registers (bufp, regs, num_regs, starts, ends)
- struct re_pattern_buffer *bufp;
- struct re_registers *regs;
- unsigned num_regs;
- regoff_t *starts, *ends;
+re_set_registers (struct re_pattern_buffer *bufp,
+ struct re_registers *regs, unsigned num_regs,
+ regoff_t *starts, regoff_t *ends)
{
if (num_regs)
{
@@ -4983,11 +4911,8 @@ weak_alias (__re_set_registers, re_set_registers)
doesn't let you say where to stop matching. */
int
-re_search (bufp, string, size, startpos, range, regs)
- struct re_pattern_buffer *bufp;
- const char *string;
- int size, startpos, range;
- struct re_registers *regs;
+re_search (struct re_pattern_buffer *bufp, const char *string, int size,
+ int startpos, int range, struct re_registers *regs)
{
return re_search_2 (bufp, NULL, 0, string, size, startpos, range,
regs, size);
@@ -5019,14 +4944,9 @@ weak_alias (__re_search, re_search)
stack overflow). */
int
-re_search_2 (bufp, string1, size1, string2, size2, startpos, range, regs, stop)
- struct re_pattern_buffer *bufp;
- const char *string1, *string2;
- int size1, size2;
- int startpos;
- int range;
- struct re_registers *regs;
- int stop;
+re_search_2 (struct re_pattern_buffer *bufp, const char *string1, int size1,
+ const char *string2, int size2, int startpos, int range,
+ struct re_registers *regs, int stop)
{
# ifdef MBS_SUPPORT
if (MB_CUR_MAX != 1)
@@ -5082,15 +5002,10 @@ weak_alias (__re_search_2, re_search_2)
static int
-PREFIX(re_search_2) (bufp, string1, size1, string2, size2, startpos, range,
- regs, stop)
- struct re_pattern_buffer *bufp;
- const char *string1, *string2;
- int size1, size2;
- int startpos;
- int range;
- struct re_registers *regs;
- int stop;
+PREFIX(re_search_2) (struct re_pattern_buffer *bufp, const char *string1,
+ int size1, const char *string2, int size2,
+ int startpos, int range,
+ struct re_registers *regs, int stop)
{
int val;
register char *fastmap = bufp->fastmap;
@@ -5473,11 +5388,8 @@ PREFIX(re_search_2) (bufp, string1, size1, string2, size2, startpos, range,
/* re_match is like re_match_2 except it takes only a single string. */
int
-re_match (bufp, string, size, pos, regs)
- struct re_pattern_buffer *bufp;
- const char *string;
- int size, pos;
- struct re_registers *regs;
+re_match (struct re_pattern_buffer *bufp, const char *string,
+ int size, int pos, struct re_registers *regs)
{
int result;
# ifdef MBS_SUPPORT
@@ -5504,17 +5416,17 @@ weak_alias (__re_match, re_match)
#endif /* not INSIDE_RECURSION */
#ifdef INSIDE_RECURSION
-static boolean PREFIX(group_match_null_string_p) _RE_ARGS ((UCHAR_T **p,
- UCHAR_T *end,
- PREFIX(register_info_type) *reg_info));
-static boolean PREFIX(alt_match_null_string_p) _RE_ARGS ((UCHAR_T *p,
- UCHAR_T *end,
- PREFIX(register_info_type) *reg_info));
-static boolean PREFIX(common_op_match_null_string_p) _RE_ARGS ((UCHAR_T **p,
- UCHAR_T *end,
- PREFIX(register_info_type) *reg_info));
-static int PREFIX(bcmp_translate) _RE_ARGS ((const CHAR_T *s1, const CHAR_T *s2,
- int len, char *translate));
+static boolean PREFIX(group_match_null_string_p) (UCHAR_T **p,
+ UCHAR_T *end,
+ PREFIX(register_info_type) *reg_info);
+static boolean PREFIX(alt_match_null_string_p) (UCHAR_T *p,
+ UCHAR_T *end,
+ PREFIX(register_info_type) *reg_info);
+static boolean PREFIX(common_op_match_null_string_p) (UCHAR_T **p,
+ UCHAR_T *end,
+ PREFIX(register_info_type) *reg_info);
+static int PREFIX(bcmp_translate) (const CHAR_T *s1, const CHAR_T *s2,
+ int len, char *translate);
#else /* not INSIDE_RECURSION */
/* re_match_2 matches the compiled pattern in BUFP against the
@@ -5531,13 +5443,9 @@ static int PREFIX(bcmp_translate) _RE_ARGS ((const CHAR_T *s1, const CHAR_T *s2,
matched substring. */
int
-re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop)
- struct re_pattern_buffer *bufp;
- const char *string1, *string2;
- int size1, size2;
- int pos;
- struct re_registers *regs;
- int stop;
+re_match_2 (struct re_pattern_buffer *bufp, const char *string1, int size1,
+ const char *string2, int size2, int pos,
+ struct re_registers *regs, int stop)
{
int result;
# ifdef MBS_SUPPORT
@@ -5566,7 +5474,7 @@ weak_alias (__re_match_2, re_match_2)
#ifdef INSIDE_RECURSION
#ifdef WCHAR
-static int count_mbs_length PARAMS ((int *, int));
+static int count_mbs_length (int *, int);
/* This check the substring (from 0, to length) of the multibyte string,
to which offset_buffer correspond. And count how many wchar_t_characters
@@ -5574,9 +5482,7 @@ static int count_mbs_length PARAMS ((int *, int));
See convert_mbs_to_wcs. */
static int
-count_mbs_length(offset_buffer, length)
- int *offset_buffer;
- int length;
+count_mbs_length(int *offset_buffer, int length)
{
int upper, lower;
@@ -5617,33 +5523,26 @@ count_mbs_length(offset_buffer, length)
afterwards. */
#ifdef WCHAR
static int
-wcs_re_match_2_internal (bufp, cstring1, csize1, cstring2, csize2, pos,
- regs, stop, string1, size1, string2, size2,
- mbs_offset1, mbs_offset2)
- struct re_pattern_buffer *bufp;
- const char *cstring1, *cstring2;
- int csize1, csize2;
- int pos;
- struct re_registers *regs;
- int stop;
+wcs_re_match_2_internal (struct re_pattern_buffer *bufp,
+ const char *cstring1, int csize1,
+ const char *cstring2, int csize2,
+ int pos,
+ struct re_registers *regs,
+ int stop,
/* string1 == string2 == NULL means string1/2, size1/2 and
mbs_offset1/2 need seting up in this function. */
/* We need wchar_t* buffers correspond to cstring1, cstring2. */
- wchar_t *string1, *string2;
- /* We need the size of wchar_t buffers correspond to csize1, csize2. */
- int size1, size2;
+ wchar_t *string1, int size1,
+ wchar_t *string2, int size2,
/* offset buffer for optimizatoin. See convert_mbs_to_wc. */
- int *mbs_offset1, *mbs_offset2;
+ int *mbs_offset1, int *mbs_offset2)
#else /* BYTE */
static int
-byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
- regs, stop)
- struct re_pattern_buffer *bufp;
- const char *string1, *string2;
- int size1, size2;
- int pos;
- struct re_registers *regs;
- int stop;
+byte_re_match_2_internal (struct re_pattern_buffer *bufp,
+ const char *string1, int size1,
+ const char *string2, int size2,
+ int pos,
+ struct re_registers *regs, int stop)
#endif /* BYTE */
{
/* General temporaries. */
@@ -7593,9 +7492,8 @@ byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
We don't handle duplicates properly (yet). */
static boolean
-PREFIX(group_match_null_string_p) (p, end, reg_info)
- UCHAR_T **p, *end;
- PREFIX(register_info_type) *reg_info;
+PREFIX(group_match_null_string_p) (UCHAR_T **p, UCHAR_T *end,
+ PREFIX(register_info_type) *reg_info)
{
int mcnt;
/* Point to after the args to the start_memory. */
@@ -7705,9 +7603,8 @@ PREFIX(group_match_null_string_p) (p, end, reg_info)
byte past the last. The alternative can contain groups. */
static boolean
-PREFIX(alt_match_null_string_p) (p, end, reg_info)
- UCHAR_T *p, *end;
- PREFIX(register_info_type) *reg_info;
+PREFIX(alt_match_null_string_p) (UCHAR_T *p, UCHAR_T *end,
+ PREFIX(register_info_type) *reg_info)
{
int mcnt;
UCHAR_T *p1 = p;
@@ -7742,9 +7639,8 @@ PREFIX(alt_match_null_string_p) (p, end, reg_info)
Sets P to one after the op and its arguments, if any. */
static boolean
-PREFIX(common_op_match_null_string_p) (p, end, reg_info)
- UCHAR_T **p, *end;
- PREFIX(register_info_type) *reg_info;
+PREFIX(common_op_match_null_string_p) (UCHAR_T **p, UCHAR_T *end,
+ PREFIX(register_info_type) *reg_info)
{
int mcnt;
boolean ret;
@@ -7830,10 +7726,8 @@ PREFIX(common_op_match_null_string_p) (p, end, reg_info)
bytes; nonzero otherwise. */
static int
-PREFIX(bcmp_translate) (s1, s2, len, translate)
- const CHAR_T *s1, *s2;
- register int len;
- RE_TRANSLATE_TYPE translate;
+PREFIX(bcmp_translate) (const CHAR_T *s1, const CHAR_T *s2, register int len,
+ RE_TRANSLATE_TYPE translate)
{
register const UCHAR_T *p1 = (const UCHAR_T *) s1;
register const UCHAR_T *p2 = (const UCHAR_T *) s2;
@@ -7866,10 +7760,8 @@ PREFIX(bcmp_translate) (s1, s2, len, translate)
We call regex_compile to do the actual compilation. */
const char *
-re_compile_pattern (pattern, length, bufp)
- const char *pattern;
- size_t length;
- struct re_pattern_buffer *bufp;
+re_compile_pattern (const char *pattern, size_t length,
+ struct re_pattern_buffer *bufp)
{
reg_errcode_t ret;
@@ -7915,8 +7807,7 @@ char *
regcomp/regexec below without link errors. */
weak_function
#endif
-re_comp (s)
- const char *s;
+re_comp (const char *s)
{
reg_errcode_t ret;
@@ -7964,8 +7855,7 @@ int
#ifdef _LIBC
weak_function
#endif
-re_exec (s)
- const char *s;
+re_exec (const char *s)
{
const int len = strlen (s);
return
@@ -8014,10 +7904,7 @@ re_exec (s)
the return codes and their meanings.) */
int
-regcomp (preg, pattern, cflags)
- regex_t *preg;
- const char *pattern;
- int cflags;
+regcomp (regex_t *preg, const char *pattern, int cflags)
{
reg_errcode_t ret;
reg_syntax_t syntax
@@ -8110,12 +7997,8 @@ weak_alias (__regcomp, regcomp)
We return 0 if we find a match and REG_NOMATCH if not. */
int
-regexec (preg, string, nmatch, pmatch, eflags)
- const regex_t *preg;
- const char *string;
- size_t nmatch;
- regmatch_t pmatch[];
- int eflags;
+regexec (const regex_t *preg, const char *string, size_t nmatch,
+ regmatch_t pmatch[], int eflags)
{
int ret;
struct re_registers regs;
@@ -8177,11 +8060,8 @@ weak_alias (__regexec, regexec)
from either regcomp or regexec. We don't use PREG here. */
size_t
-regerror (errcode, preg, errbuf, errbuf_size)
- int errcode;
- const regex_t *preg ATTRIBUTE_UNUSED;
- char *errbuf;
- size_t errbuf_size;
+regerror (int errcode, const regex_t *preg ATTRIBUTE_UNUSED,
+ char *errbuf, size_t errbuf_size)
{
const char *msg;
size_t msg_size;
@@ -8224,8 +8104,7 @@ weak_alias (__regerror, regerror)
/* Free dynamically allocated space used by PREG. */
void
-regfree (preg)
- regex_t *preg;
+regfree (regex_t *preg)
{
if (preg->buffer != NULL)
free (preg->buffer);
diff --git a/libiberty/rename.c b/libiberty/rename.c
index 399980ab7d7..ad342ffca65 100644
--- a/libiberty/rename.c
+++ b/libiberty/rename.c
@@ -22,9 +22,7 @@ exists, it is removed.
#endif
int
-rename (zfrom, zto)
- const char *zfrom;
- const char *zto;
+rename (const char *zfrom, const char *zto)
{
if (link (zfrom, zto) < 0)
{
diff --git a/libiberty/rindex.c b/libiberty/rindex.c
index ef9cdc59877..741fd8ecb7c 100644
--- a/libiberty/rindex.c
+++ b/libiberty/rindex.c
@@ -15,9 +15,7 @@ deprecated in new programs in favor of @code{strrchr}.
extern char *strrchr ();
char *
-rindex (s, c)
- char *s;
- int c;
+rindex (char *s, int c)
{
return strrchr (s, c);
}
diff --git a/libiberty/safe-ctype.c b/libiberty/safe-ctype.c
index 91a0e9a2589..44ef99f50b7 100644
--- a/libiberty/safe-ctype.c
+++ b/libiberty/safe-ctype.c
@@ -1,6 +1,7 @@
/* <ctype.h> replacement macros.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001, 2002, 2003, 2004,
+ 2005 Free Software Foundation, Inc.
Contributed by Zack Weinberg <zackw@stanford.edu>.
This file is part of the libiberty library.
diff --git a/libiberty/setenv.c b/libiberty/setenv.c
index 8394fafe4e1..35f2a314e87 100644
--- a/libiberty/setenv.c
+++ b/libiberty/setenv.c
@@ -80,10 +80,7 @@ static char **last_environ;
int
-setenv (name, value, replace)
- const char *name;
- const char *value;
- int replace;
+setenv (const char *name, const char *value, int replace)
{
register char **ep = 0;
register size_t size;
@@ -164,8 +161,7 @@ setenv (name, value, replace)
}
void
-unsetenv (name)
- const char *name;
+unsetenv (const char *name)
{
const size_t len = strlen (name);
char **ep;
diff --git a/libiberty/sigsetmask.c b/libiberty/sigsetmask.c
index 4de3e4b1eb8..2df96fca947 100644
--- a/libiberty/sigsetmask.c
+++ b/libiberty/sigsetmask.c
@@ -21,12 +21,11 @@ be the value @code{1}).
#include <sys/types.h>
#include <signal.h>
-extern void abort PARAMS ((void)) ATTRIBUTE_NORETURN;
+extern void abort (void) ATTRIBUTE_NORETURN;
#ifdef SIG_SETMASK
int
-sigsetmask (set)
- int set;
+sigsetmask (int set)
{
sigset_t new;
sigset_t old;
diff --git a/libiberty/snprintf.c b/libiberty/snprintf.c
index 89164695b50..d8eb5855ab5 100644
--- a/libiberty/snprintf.c
+++ b/libiberty/snprintf.c
@@ -41,18 +41,13 @@ this function is used.
#include "ansidecl.h"
-#ifdef ANSI_PROTOTYPES
#include <stdarg.h>
#include <stddef.h>
-#else
-#include <varargs.h>
-#define size_t unsigned long
-#endif
-int vsnprintf PARAMS ((char *, size_t, const char *, va_list));
+int vsnprintf (char *, size_t, const char *, va_list);
int
-snprintf VPARAMS ((char *s, size_t n, const char *format, ...))
+snprintf (char *s, size_t n, const char *format, ...)
{
int result;
VA_OPEN (ap, format);
diff --git a/libiberty/sort.c b/libiberty/sort.c
index 90c97e04e07..a525b81e382 100644
--- a/libiberty/sort.c
+++ b/libiberty/sort.c
@@ -44,10 +44,7 @@ Boston, MA 02111-1307, USA. */
/* POINTERS and WORK are both arrays of N pointers. When this
function returns POINTERS will be sorted in ascending order. */
-void sort_pointers (n, pointers, work)
- size_t n;
- void **pointers;
- void **work;
+void sort_pointers (size_t n, void **pointers, void **work)
{
/* The type of a single digit. This can be any unsigned integral
type. When changing this, DIGIT_MAX should be changed as
@@ -140,8 +137,7 @@ void sort_pointers (n, pointers, work)
#include <stdio.h>
-void *xmalloc (n)
- size_t n;
+void *xmalloc (size_t n)
{
return malloc (n);
}
diff --git a/libiberty/spaces.c b/libiberty/spaces.c
index bfead7ed7a4..6df0b13f0d2 100644
--- a/libiberty/spaces.c
+++ b/libiberty/spaces.c
@@ -37,13 +37,12 @@ valid until at least the next call.
#include <unixlib.h>
#else
/* For systems with larger pointers than ints, these must be declared. */
-extern PTR malloc PARAMS ((size_t));
-extern void free PARAMS ((PTR));
+extern PTR malloc (size_t);
+extern void free (PTR);
#endif
const char *
-spaces (count)
- int count;
+spaces (int count)
{
register char *t;
static char *buf;
diff --git a/libiberty/splay-tree.c b/libiberty/splay-tree.c
index b1410aa3005..29eaf16efb1 100644
--- a/libiberty/splay-tree.c
+++ b/libiberty/splay-tree.c
@@ -37,27 +37,20 @@ Boston, MA 02111-1307, USA. */
#include "libiberty.h"
#include "splay-tree.h"
-static void splay_tree_delete_helper PARAMS((splay_tree,
- splay_tree_node));
-static void splay_tree_splay PARAMS((splay_tree,
- splay_tree_key));
-static splay_tree_node splay_tree_splay_helper
- PARAMS((splay_tree,
+static void splay_tree_delete_helper (splay_tree, splay_tree_node);
+static void splay_tree_splay (splay_tree, splay_tree_key);
+static splay_tree_node splay_tree_splay_helper (splay_tree,
splay_tree_key,
splay_tree_node*,
splay_tree_node*,
- splay_tree_node*));
-static int splay_tree_foreach_helper PARAMS((splay_tree,
- splay_tree_node,
- splay_tree_foreach_fn,
- void*));
+ splay_tree_node*);
+static int splay_tree_foreach_helper (splay_tree, splay_tree_node,
+ splay_tree_foreach_fn, void*);
/* Deallocate NODE (a member of SP), and all its sub-trees. */
static void
-splay_tree_delete_helper (sp, node)
- splay_tree sp;
- splay_tree_node node;
+splay_tree_delete_helper (splay_tree sp, splay_tree_node node)
{
splay_tree_node pending = 0;
splay_tree_node active = 0;
@@ -118,12 +111,9 @@ splay_tree_delete_helper (sp, node)
and grandparent, respectively, of NODE. */
static splay_tree_node
-splay_tree_splay_helper (sp, key, node, parent, grandparent)
- splay_tree sp;
- splay_tree_key key;
- splay_tree_node *node;
- splay_tree_node *parent;
- splay_tree_node *grandparent;
+splay_tree_splay_helper (splay_tree sp, splay_tree_key key,
+ splay_tree_node *node, splay_tree_node *parent,
+ splay_tree_node *grandparent)
{
splay_tree_node *next;
splay_tree_node n;
@@ -229,9 +219,7 @@ splay_tree_splay_helper (sp, key, node, parent, grandparent)
/* Splay SP around KEY. */
static void
-splay_tree_splay (sp, key)
- splay_tree sp;
- splay_tree_key key;
+splay_tree_splay (splay_tree sp, splay_tree_key key)
{
if (sp->root == 0)
return;
@@ -246,11 +234,8 @@ splay_tree_splay (sp, key)
value is returned. Otherwise, this function returns 0. */
static int
-splay_tree_foreach_helper (sp, node, fn, data)
- splay_tree sp;
- splay_tree_node node;
- splay_tree_foreach_fn fn;
- void* data;
+splay_tree_foreach_helper (splay_tree sp, splay_tree_node node,
+ splay_tree_foreach_fn fn, void *data)
{
int val;
@@ -271,17 +256,13 @@ splay_tree_foreach_helper (sp, node, fn, data)
/* An allocator and deallocator based on xmalloc. */
static void *
-splay_tree_xmalloc_allocate (size, data)
- int size;
- void *data ATTRIBUTE_UNUSED;
+splay_tree_xmalloc_allocate (int size, void *data ATTRIBUTE_UNUSED)
{
return (void *) xmalloc (size);
}
static void
-splay_tree_xmalloc_deallocate (object, data)
- void *object;
- void *data ATTRIBUTE_UNUSED;
+splay_tree_xmalloc_deallocate (void *object, void *data ATTRIBUTE_UNUSED)
{
free (object);
}
@@ -293,10 +274,9 @@ splay_tree_xmalloc_deallocate (object, data)
nodes added. */
splay_tree
-splay_tree_new (compare_fn, delete_key_fn, delete_value_fn)
- splay_tree_compare_fn compare_fn;
- splay_tree_delete_key_fn delete_key_fn;
- splay_tree_delete_value_fn delete_value_fn;
+splay_tree_new (splay_tree_compare_fn compare_fn,
+ splay_tree_delete_key_fn delete_key_fn,
+ splay_tree_delete_value_fn delete_value_fn)
{
return (splay_tree_new_with_allocator
(compare_fn, delete_key_fn, delete_value_fn,
@@ -309,14 +289,12 @@ splay_tree_new (compare_fn, delete_key_fn, delete_value_fn)
values. */
splay_tree
-splay_tree_new_with_allocator (compare_fn, delete_key_fn, delete_value_fn,
- allocate_fn, deallocate_fn, allocate_data)
- splay_tree_compare_fn compare_fn;
- splay_tree_delete_key_fn delete_key_fn;
- splay_tree_delete_value_fn delete_value_fn;
- splay_tree_allocate_fn allocate_fn;
- splay_tree_deallocate_fn deallocate_fn;
- void *allocate_data;
+splay_tree_new_with_allocator (splay_tree_compare_fn compare_fn,
+ splay_tree_delete_key_fn delete_key_fn,
+ splay_tree_delete_value_fn delete_value_fn,
+ splay_tree_allocate_fn allocate_fn,
+ splay_tree_deallocate_fn deallocate_fn,
+ void *allocate_data)
{
splay_tree sp = (splay_tree) (*allocate_fn) (sizeof (struct splay_tree_s),
allocate_data);
@@ -334,8 +312,7 @@ splay_tree_new_with_allocator (compare_fn, delete_key_fn, delete_value_fn,
/* Deallocate SP. */
void
-splay_tree_delete (sp)
- splay_tree sp;
+splay_tree_delete (splay_tree sp)
{
splay_tree_delete_helper (sp, sp->root);
(*sp->deallocate) ((char*) sp, sp->allocate_data);
@@ -346,10 +323,7 @@ splay_tree_delete (sp)
with the new value. Returns the new node. */
splay_tree_node
-splay_tree_insert (sp, key, value)
- splay_tree sp;
- splay_tree_key key;
- splay_tree_value value;
+splay_tree_insert (splay_tree sp, splay_tree_key key, splay_tree_value value)
{
int comparison = 0;
@@ -401,9 +375,7 @@ splay_tree_insert (sp, key, value)
/* Remove KEY from SP. It is not an error if it did not exist. */
void
-splay_tree_remove (sp, key)
- splay_tree sp;
- splay_tree_key key;
+splay_tree_remove (splay_tree sp, splay_tree_key key)
{
splay_tree_splay (sp, key);
@@ -443,9 +415,7 @@ splay_tree_remove (sp, key)
otherwise. */
splay_tree_node
-splay_tree_lookup (sp, key)
- splay_tree sp;
- splay_tree_key key;
+splay_tree_lookup (splay_tree sp, splay_tree_key key)
{
splay_tree_splay (sp, key);
@@ -458,8 +428,7 @@ splay_tree_lookup (sp, key)
/* Return the node in SP with the greatest key. */
splay_tree_node
-splay_tree_max (sp)
- splay_tree sp;
+splay_tree_max (splay_tree sp)
{
splay_tree_node n = sp->root;
@@ -475,8 +444,7 @@ splay_tree_max (sp)
/* Return the node in SP with the smallest key. */
splay_tree_node
-splay_tree_min (sp)
- splay_tree sp;
+splay_tree_min (splay_tree sp)
{
splay_tree_node n = sp->root;
@@ -493,9 +461,7 @@ splay_tree_min (sp)
predecessor. KEY need not be present in the tree. */
splay_tree_node
-splay_tree_predecessor (sp, key)
- splay_tree sp;
- splay_tree_key key;
+splay_tree_predecessor (splay_tree sp, splay_tree_key key)
{
int comparison;
splay_tree_node node;
@@ -526,9 +492,7 @@ splay_tree_predecessor (sp, key)
successor. KEY need not be present in the tree. */
splay_tree_node
-splay_tree_successor (sp, key)
- splay_tree sp;
- splay_tree_key key;
+splay_tree_successor (splay_tree sp, splay_tree_key key)
{
int comparison;
splay_tree_node node;
@@ -561,10 +525,7 @@ splay_tree_successor (sp, key)
Otherwise, this function returns 0. */
int
-splay_tree_foreach (sp, fn, data)
- splay_tree sp;
- splay_tree_foreach_fn fn;
- void *data;
+splay_tree_foreach (splay_tree sp, splay_tree_foreach_fn fn, void *data)
{
return splay_tree_foreach_helper (sp, sp->root, fn, data);
}
@@ -572,9 +533,7 @@ splay_tree_foreach (sp, fn, data)
/* Splay-tree comparison function, treating the keys as ints. */
int
-splay_tree_compare_ints (k1, k2)
- splay_tree_key k1;
- splay_tree_key k2;
+splay_tree_compare_ints (splay_tree_key k1, splay_tree_key k2)
{
if ((int) k1 < (int) k2)
return -1;
@@ -587,9 +546,7 @@ splay_tree_compare_ints (k1, k2)
/* Splay-tree comparison function, treating the keys as pointers. */
int
-splay_tree_compare_pointers (k1, k2)
- splay_tree_key k1;
- splay_tree_key k2;
+splay_tree_compare_pointers (splay_tree_key k1, splay_tree_key k2)
{
if ((char*) k1 < (char*) k2)
return -1;
diff --git a/libiberty/stpcpy.c b/libiberty/stpcpy.c
index a589642fd88..b7148d8d5b7 100644
--- a/libiberty/stpcpy.c
+++ b/libiberty/stpcpy.c
@@ -30,19 +30,13 @@ Copies the string @var{src} into @var{dst}. Returns a pointer to
*/
#include <ansidecl.h>
-#ifdef ANSI_PROTOTYPES
#include <stddef.h>
-#else
-#define size_t unsigned long
-#endif
-extern size_t strlen PARAMS ((const char *));
-extern PTR memcpy PARAMS ((PTR, const PTR, size_t));
+extern size_t strlen (const char *);
+extern PTR memcpy (PTR, const PTR, size_t);
char *
-stpcpy (dst, src)
- char *dst;
- const char *src;
+stpcpy (char *dst, const char *src)
{
const size_t len = strlen (src);
return (char *) memcpy (dst, src, len + 1) + len;
diff --git a/libiberty/stpncpy.c b/libiberty/stpncpy.c
index cb67b4dbab1..b885d85bde2 100644
--- a/libiberty/stpncpy.c
+++ b/libiberty/stpncpy.c
@@ -32,20 +32,13 @@ strlen(@var{src}).
*/
#include <ansidecl.h>
-#ifdef ANSI_PROTOTYPES
#include <stddef.h>
-#else
-#define size_t unsigned long
-#endif
-extern size_t strlen PARAMS ((const char *));
-extern char *strncpy PARAMS ((char *, const char *, size_t));
+extern size_t strlen (const char *);
+extern char *strncpy (char *, const char *, size_t);
char *
-stpncpy (dst, src, len)
- char *dst;
- const char *src;
- size_t len;
+stpncpy (char *dst, const char *src, size_t len)
{
size_t n = strlen (src);
if (n > len)
diff --git a/libiberty/strcasecmp.c b/libiberty/strcasecmp.c
index d2608dc0b87..131d81c2ce7 100644
--- a/libiberty/strcasecmp.c
+++ b/libiberty/strcasecmp.c
@@ -25,11 +25,7 @@ static char sccsid[] = "@(#)strcasecmp.c 5.5 (Berkeley) 11/24/87";
#endif /* LIBC_SCCS and not lint */
#include <ansidecl.h>
-#ifdef ANSI_PROTOTYPES
#include <stddef.h>
-#else
-#define size_t unsigned long
-#endif
/*
* This array is designed for mapping upper and lower case letter
@@ -73,8 +69,7 @@ static const unsigned char charmap[] = {
};
int
-strcasecmp(s1, s2)
- const char *s1, *s2;
+strcasecmp(const char *s1, const char *s2)
{
register unsigned char u1, u2;
diff --git a/libiberty/strchr.c b/libiberty/strchr.c
index 1f71c5143d0..935805ef4f4 100644
--- a/libiberty/strchr.c
+++ b/libiberty/strchr.c
@@ -16,9 +16,7 @@ null character, the results are undefined.
#include <ansidecl.h>
char *
-strchr (s, c)
- register const char *s;
- int c;
+strchr (register const char *s, int c)
{
do {
if (*s == c)
diff --git a/libiberty/strdup.c b/libiberty/strdup.c
index a3f17d3bcb1..78c2093b61a 100644
--- a/libiberty/strdup.c
+++ b/libiberty/strdup.c
@@ -10,19 +10,14 @@ Returns a pointer to a copy of @var{s} in memory obtained from
*/
#include <ansidecl.h>
-#ifdef ANSI_PROTOTYPES
#include <stddef.h>
-#else
-#define size_t unsigned long
-#endif
-extern size_t strlen PARAMS ((const char*));
-extern PTR malloc PARAMS ((size_t));
-extern PTR memcpy PARAMS ((PTR, const PTR, size_t));
+extern size_t strlen (const char*);
+extern PTR malloc (size_t);
+extern PTR memcpy (PTR, const PTR, size_t);
char *
-strdup(s)
- const char *s;
+strdup(const char *s)
{
size_t len = strlen (s) + 1;
char *result = (char*) malloc (len);
diff --git a/libiberty/strerror.c b/libiberty/strerror.c
index c0edb47e0c8..0efadc3d65e 100644
--- a/libiberty/strerror.c
+++ b/libiberty/strerror.c
@@ -43,7 +43,7 @@ extern PTR memset ();
# define MAX(a,b) ((a) > (b) ? (a) : (b))
#endif
-static void init_error_tables PARAMS ((void));
+static void init_error_tables (void);
/* Translation table for errno values. See intro(2) in most UNIX systems
Programmers Reference Manuals.
@@ -503,7 +503,7 @@ BUGS
*/
static void
-init_error_tables ()
+init_error_tables (void)
{
const struct error_info *eip;
int nbytes;
@@ -584,7 +584,7 @@ symbolic name or message.
*/
int
-errno_max ()
+errno_max (void)
{
int maxsize;
@@ -623,8 +623,7 @@ next call to @code{strerror}.
*/
char *
-strerror (errnoval)
- int errnoval;
+strerror (int errnoval)
{
const char *msg;
static char buf[32];
@@ -690,8 +689,7 @@ valid until the next call to @code{strerrno}.
*/
const char *
-strerrno (errnoval)
- int errnoval;
+strerrno (int errnoval)
{
const char *name;
static char buf[32];
@@ -738,8 +736,7 @@ to an errno value. If no translation is found, returns 0.
*/
int
-strtoerrno (name)
- const char *name;
+strtoerrno (const char *name)
{
int errnoval = 0;
@@ -779,7 +776,7 @@ strtoerrno (name)
#include <stdio.h>
int
-main ()
+main (void)
{
int errn;
int errnmax;
diff --git a/libiberty/strncasecmp.c b/libiberty/strncasecmp.c
index 10feee82198..47700dde518 100644
--- a/libiberty/strncasecmp.c
+++ b/libiberty/strncasecmp.c
@@ -25,11 +25,7 @@ static char sccsid[] = "@(#)strcasecmp.c 5.5 (Berkeley) 11/24/87";
#endif /* LIBC_SCCS and not lint */
#include <ansidecl.h>
-#ifdef ANSI_PROTOTYPES
#include <stddef.h>
-#else
-#define size_t unsigned long
-#endif
/*
* This array is designed for mapping upper and lower case letter
@@ -72,9 +68,7 @@ static const unsigned char charmap[] = {
};
int
-strncasecmp(s1, s2, n)
- const char *s1, *s2;
- register size_t n;
+strncasecmp(const char *s1, const char *s2, register size_t n)
{
register unsigned char u1, u2;
diff --git a/libiberty/strncmp.c b/libiberty/strncmp.c
index ad87e1fde8b..916c2f07a8a 100644
--- a/libiberty/strncmp.c
+++ b/libiberty/strncmp.c
@@ -13,16 +13,10 @@ Compares the first @var{n} bytes of two strings, returning a value as
*/
#include <ansidecl.h>
-#ifdef ANSI_PROTOTYPES
#include <stddef.h>
-#else
-#define size_t unsigned long
-#endif
int
-strncmp(s1, s2, n)
- const char *s1, *s2;
- register size_t n;
+strncmp(const char *s1, const char *s2, register size_t n)
{
register unsigned char u1, u2;
diff --git a/libiberty/strrchr.c b/libiberty/strrchr.c
index bc380c4c5d3..5cf7c14d8b7 100644
--- a/libiberty/strrchr.c
+++ b/libiberty/strrchr.c
@@ -16,9 +16,7 @@ null character, the results are undefined.
#include <ansidecl.h>
char *
-strrchr (s, c)
- register const char *s;
- int c;
+strrchr (register const char *s, int c)
{
char *rtnval = 0;
diff --git a/libiberty/strsignal.c b/libiberty/strsignal.c
index 1ff984debc3..c3a16ab9bdc 100644
--- a/libiberty/strsignal.c
+++ b/libiberty/strsignal.c
@@ -41,18 +41,14 @@ extern PTR memset ();
#undef sys_nsig
#ifndef NULL
-# ifdef ANSI_PROTOTYPES
-# define NULL (void *) 0
-# else
-# define NULL 0
-# endif
+# define NULL (void *) 0
#endif
#ifndef MAX
# define MAX(a,b) ((a) > (b) ? (a) : (b))
#endif
-static void init_signal_tables PARAMS ((void));
+static void init_signal_tables (void);
/* Translation table for signal values.
@@ -288,7 +284,7 @@ BUGS
*/
static void
-init_signal_tables ()
+init_signal_tables (void)
{
const struct signal_info *eip;
int nbytes;
@@ -369,7 +365,7 @@ symbolic name or message.
*/
int
-signo_max ()
+signo_max (void)
{
int maxsize;
@@ -409,8 +405,7 @@ call to @code{strsignal}.
#ifndef HAVE_STRSIGNAL
const char *
-strsignal (signo)
- int signo;
+strsignal (int signo)
{
const char *msg;
static char buf[32];
@@ -469,8 +464,7 @@ valid until the next call to @code{strsigno}.
*/
const char *
-strsigno (signo)
- int signo;
+strsigno (int signo)
{
const char *name;
static char buf[32];
@@ -513,8 +507,7 @@ translation is found, returns 0.
*/
int
-strtosigno (name)
- const char *name;
+strtosigno (const char *name)
{
int signo = 0;
@@ -556,9 +549,7 @@ followed by a newline.
#ifndef HAVE_PSIGNAL
void
-psignal (signo, message)
- unsigned signo;
- char *message;
+psignal (unsigned signo, char *message)
{
if (signal_names == NULL)
{
@@ -585,7 +576,7 @@ psignal (signo, message)
#include <stdio.h>
int
-main ()
+main (void)
{
int signo;
int maxsigno;
diff --git a/libiberty/strstr.c b/libiberty/strstr.c
index a059c7f5dcb..ff8abd20f78 100644
--- a/libiberty/strstr.c
+++ b/libiberty/strstr.c
@@ -21,8 +21,7 @@ length, the function returns @var{string}.
been validated to comply with it. -fnf */
char *
-strstr (s1, s2)
- char *s1, *s2;
+strstr (char *s1, char *s2)
{
register char *p = s1;
extern char *strchr ();
diff --git a/libiberty/strtod.c b/libiberty/strtod.c
index 97fc9339344..4f119c46114 100644
--- a/libiberty/strtod.c
+++ b/libiberty/strtod.c
@@ -40,16 +40,14 @@ the location referenced by @var{endptr}.
#include "ansidecl.h"
#include "safe-ctype.h"
-extern double atof ();
+extern double atof (const char *);
/* Disclaimer: this is currently just used by CHILL in GDB and therefore
has not been tested well. It may have been tested for nothing except
that it compiles. */
double
-strtod (str, ptr)
- char *str;
- char **ptr;
+strtod (char *str, char **ptr)
{
char *p;
diff --git a/libiberty/strtol.c b/libiberty/strtol.c
index d9f54cc8f7a..5f2a1cebb20 100644
--- a/libiberty/strtol.c
+++ b/libiberty/strtol.c
@@ -85,10 +85,7 @@ extern int errno;
* alphabets and digits are each contiguous.
*/
long
-strtol(nptr, endptr, base)
- const char *nptr;
- char **endptr;
- register int base;
+strtol(const char *nptr, char **endptr, register int base)
{
register const char *s = nptr;
register unsigned long acc;
diff --git a/libiberty/strtoul.c b/libiberty/strtoul.c
index 66420f268b2..ba80063531e 100644
--- a/libiberty/strtoul.c
+++ b/libiberty/strtoul.c
@@ -58,10 +58,7 @@ extern int errno;
* alphabets and digits are each contiguous.
*/
unsigned long
-strtoul(nptr, endptr, base)
- const char *nptr;
- char **endptr;
- register int base;
+strtoul(const char *nptr, char **endptr, register int base)
{
register const char *s = nptr;
register unsigned long acc;
diff --git a/libiberty/ternary.c b/libiberty/ternary.c
index 056d2cee11e..29cf646934d 100644
--- a/libiberty/ternary.c
+++ b/libiberty/ternary.c
@@ -34,11 +34,7 @@
insertions. */
PTR
-ternary_insert (root, s, data, replace)
- ternary_tree *root;
- const char *s;
- PTR data;
- int replace;
+ternary_insert (ternary_tree *root, const char *s, PTR data, int replace)
{
int diff;
ternary_tree curr, *pcurr;
@@ -98,8 +94,7 @@ ternary_insert (root, s, data, replace)
/* Free the ternary search tree rooted at p. */
void
-ternary_cleanup (p)
- ternary_tree p;
+ternary_cleanup (ternary_tree p)
{
if (p)
{
@@ -113,9 +108,7 @@ ternary_cleanup (p)
/* Non-recursive find of a string in the ternary tree */
PTR
-ternary_search (p, s)
- const ternary_node *p;
- const char *s;
+ternary_search (const ternary_node *p, const char *s)
{
const ternary_node *curr;
int diff, spchar;
@@ -147,9 +140,7 @@ ternary_search (p, s)
/* For those who care, the recursive version of the search. Useful if
you want a starting point for pmsearch or nearsearch. */
static PTR
-ternary_recursivesearch (p, s)
- const ternary_node *p;
- const char *s;
+ternary_recursivesearch (const ternary_node *p, const char *s)
{
if (!p)
return 0;
diff --git a/libiberty/testsuite/Makefile.in b/libiberty/testsuite/Makefile.in
index 6f2a4fe4b39..e15f6fa191a 100644
--- a/libiberty/testsuite/Makefile.in
+++ b/libiberty/testsuite/Makefile.in
@@ -42,17 +42,28 @@ INCDIR=$(srcdir)/../$(MULTISRCTOP)../include
all:
+# CHECK is set to "really_check" or the empty string by configure.
check: @CHECK@
+really-check: check-cplus-dem check-pexecute
+
# Run some tests of the demangler.
check-cplus-dem: test-demangle $(srcdir)/demangle-expected
./test-demangle < $(srcdir)/demangle-expected
+# Check the pexecute code.
+check-pexecute: test-pexecute
+ ./test-pexecute
+
TEST_COMPILE = $(CC) @DEFS@ $(LIBCFLAGS) -I.. -I$(INCDIR) $(HDEFINES)
test-demangle: $(srcdir)/test-demangle.c ../libiberty.a
$(TEST_COMPILE) -o test-demangle \
$(srcdir)/test-demangle.c ../libiberty.a
+test-pexecute: $(srcdir)/test-pexecute.c ../libiberty.a
+ $(TEST_COMPILE) -DHAVE_CONFIG_H -I.. -o test-pexecute \
+ $(srcdir)/test-pexecute.c ../libiberty.a
+
# Standard (either GNU or Cygnus) rules we don't use.
info install-info clean-info dvi install etags tags installcheck:
diff --git a/libiberty/tmpnam.c b/libiberty/tmpnam.c
index 406878c49a3..cc343336642 100644
--- a/libiberty/tmpnam.c
+++ b/libiberty/tmpnam.c
@@ -24,11 +24,10 @@ not be used in new projects. Use @code{mkstemp} instead.
static char tmpnam_buffer[L_tmpnam];
static int tmpnam_counter;
-extern int getpid ();
+extern int getpid (void);
char *
-tmpnam (s)
- char *s;
+tmpnam (char *s)
{
int pid = getpid ();
diff --git a/libiberty/unlink-if-ordinary.c b/libiberty/unlink-if-ordinary.c
index 297b14bbc7d..1f21806b8a6 100644
--- a/libiberty/unlink-if-ordinary.c
+++ b/libiberty/unlink-if-ordinary.c
@@ -1,5 +1,5 @@
/* unlink-if-ordinary.c - remove link to a file unless it is special
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of the libiberty library. This library is free
software; you can redistribute it and/or modify it under the
@@ -39,6 +39,8 @@ was made to unlink the file because it is special.
#include "config.h"
#endif
+#include <sys/types.h>
+
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
@@ -58,8 +60,7 @@ was made to unlink the file because it is special.
#endif
int
-unlink_if_ordinary (name)
- const char *name;
+unlink_if_ordinary (const char *name)
{
struct stat st;
diff --git a/libiberty/vasprintf.c b/libiberty/vasprintf.c
index 7eaf2b18d6f..ff4b5315199 100644
--- a/libiberty/vasprintf.c
+++ b/libiberty/vasprintf.c
@@ -22,11 +22,7 @@ Boston, MA 02111-1307, USA. */
#include "config.h"
#endif
#include <ansidecl.h>
-#ifdef ANSI_PROTOTYPES
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#if !defined (va_copy) && defined (__va_copy)
# define va_copy(d,s) __va_copy((d),(s))
#endif
@@ -62,13 +58,10 @@ not be allocated, minus one is returned and @code{NULL} is stored in
*/
-static int int_vasprintf PARAMS ((char **, const char *, va_list));
+static int int_vasprintf (char **, const char *, va_list);
static int
-int_vasprintf (result, format, args)
- char **result;
- const char *format;
- va_list args;
+int_vasprintf (char **result, const char *format, va_list args)
{
const char *p = format;
/* Add one to make sure that it is never zero, which might cause malloc
@@ -156,13 +149,11 @@ int_vasprintf (result, format, args)
}
int
-vasprintf (result, format, args)
- char **result;
- const char *format;
+vasprintf (char **result, const char *format,
#if defined (_BSD_VA_LIST_) && defined (__FreeBSD__)
- _BSD_VA_LIST_ args;
+ _BSD_VA_LIST_ args)
#else
- va_list args;
+ va_list args)
#endif
{
return int_vasprintf (result, format, args);
@@ -170,7 +161,7 @@ vasprintf (result, format, args)
#ifdef TEST
static void ATTRIBUTE_PRINTF_1
-checkit VPARAMS ((const char *format, ...))
+checkit (const char *format, ...)
{
char *result;
VA_OPEN (args, format);
@@ -187,10 +178,10 @@ checkit VPARAMS ((const char *format, ...))
free (result);
}
-extern int main PARAMS ((void));
+extern int main (void);
int
-main ()
+main (void)
{
checkit ("%d", 0x12345678);
checkit ("%200d", 5);
diff --git a/libiberty/vfork.c b/libiberty/vfork.c
index 4aa5c21d427..eb4ff622b44 100644
--- a/libiberty/vfork.c
+++ b/libiberty/vfork.c
@@ -13,10 +13,10 @@ Emulates @code{vfork} by calling @code{fork} and returning its value.
#include "ansidecl.h"
-extern int fork PARAMS ((void));
+extern int fork (void);
int
-vfork ()
+vfork (void)
{
return (fork ());
}
diff --git a/libiberty/vfprintf.c b/libiberty/vfprintf.c
index 18f09d47d32..9bd3ed555d0 100644
--- a/libiberty/vfprintf.c
+++ b/libiberty/vfprintf.c
@@ -4,19 +4,12 @@
*/
#include "ansidecl.h"
-#ifdef ANSI_PROTOTYPES
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#include <stdio.h>
#undef vfprintf
int
-vfprintf (stream, format, ap)
- FILE * stream;
- const char * format;
- va_list ap;
+vfprintf (FILE *stream, const char *format, va_list ap)
{
return _doprnt (format, ap, stream);
}
diff --git a/libiberty/vprintf.c b/libiberty/vprintf.c
index 9487896ea5e..c2553167bab 100644
--- a/libiberty/vprintf.c
+++ b/libiberty/vprintf.c
@@ -16,17 +16,11 @@ nonstandard but common function @code{_doprnt}.
*/
#include <ansidecl.h>
-#ifdef ANSI_PROTOTYPES
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#include <stdio.h>
#undef vprintf
int
-vprintf (format, ap)
- const char *format;
- va_list ap;
+vprintf (const char *format, va_list ap)
{
return vfprintf (stdout, format, ap);
}
diff --git a/libiberty/vsnprintf.c b/libiberty/vsnprintf.c
index fd3dd18a91c..8d4a1e218b4 100644
--- a/libiberty/vsnprintf.c
+++ b/libiberty/vsnprintf.c
@@ -1,5 +1,5 @@
/* Implement the vsnprintf function.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
Written by Kaveh R. Ghazi <ghazi@caip.rutgers.edu>.
This file is part of the libiberty library. This library is free
@@ -42,11 +42,7 @@ system version of this function is used.
#include "config.h"
#include "ansidecl.h"
-#ifdef ANSI_PROTOTYPES
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
@@ -58,11 +54,7 @@ system version of this function is used.
/* This implementation relies on a working vasprintf. */
int
-vsnprintf (s, n, format, ap)
- char * s;
- size_t n;
- const char *format;
- va_list ap;
+vsnprintf (char *s, size_t n, const char *format, va_list ap)
{
char *buf = 0;
int result = vasprintf (&buf, format, ap);
@@ -97,7 +89,7 @@ vsnprintf (s, n, format, ap)
#define VERIFY(P) do { if (!(P)) abort(); } while (0)
static int ATTRIBUTE_PRINTF_3
-checkit VPARAMS ((char *s, size_t n, const char *format, ...))
+checkit (char *s, size_t n, const char *format, ...)
{
int result;
VA_OPEN (ap, format);
@@ -109,9 +101,9 @@ checkit VPARAMS ((char *s, size_t n, const char *format, ...))
return result;
}
-extern int main PARAMS ((void));
+extern int main (void);
int
-main ()
+main (void)
{
char buf[128];
int status;
diff --git a/libiberty/vsprintf.c b/libiberty/vsprintf.c
index 9f09d7e2758..4132ff9098a 100644
--- a/libiberty/vsprintf.c
+++ b/libiberty/vsprintf.c
@@ -27,21 +27,14 @@ This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#include <ansidecl.h>
-#ifdef ANSI_PROTOTYPES
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#include <stdio.h>
#undef vsprintf
#if defined _IOSTRG && defined _IOWRT
int
-vsprintf (buf, format, ap)
- char *buf;
- const char *format;
- va_list ap;
+vsprintf (char *buf, const char *format, va_list ap)
{
FILE b;
int ret;
diff --git a/libiberty/waitpid.c b/libiberty/waitpid.c
index 6e31f25e305..33f2f8e38cc 100644
--- a/libiberty/waitpid.c
+++ b/libiberty/waitpid.c
@@ -23,9 +23,7 @@ does the return value. The third argument is unused in @libib{}.
#endif
pid_t
-waitpid (pid, stat_loc, options)
- pid_t pid;
- int *stat_loc, options;
+waitpid (pid_t pid, int *stat_loc, int options)
{
for (;;)
{
diff --git a/libiberty/xatexit.c b/libiberty/xatexit.c
index 075599c61f9..f29338a9f2a 100644
--- a/libiberty/xatexit.c
+++ b/libiberty/xatexit.c
@@ -27,31 +27,27 @@ failure. If you use @code{xatexit} to register functions, you must use
#include <stdio.h>
-#ifdef ANSI_PROTOTYPES
#include <stddef.h>
-#else
-#define size_t unsigned long
-#endif
#if VMS
#include <stdlib.h>
#include <unixlib.h>
#else
/* For systems with larger pointers than ints, this must be declared. */
-PTR malloc PARAMS ((size_t));
+PTR malloc (size_t);
#endif
-static void xatexit_cleanup PARAMS ((void));
+static void xatexit_cleanup (void);
/* Pointer to function run by xexit. */
-extern void (*_xexit_cleanup) PARAMS ((void));
+extern void (*_xexit_cleanup) (void);
#define XATEXIT_SIZE 32
struct xatexit {
struct xatexit *next; /* next in list */
int ind; /* next index in this table */
- void (*fns[XATEXIT_SIZE]) PARAMS ((void)); /* the table itself */
+ void (*fns[XATEXIT_SIZE]) (void); /* the table itself */
};
/* Allocate one struct statically to guarantee that we can register
@@ -65,8 +61,7 @@ static struct xatexit *xatexit_head = &xatexit_first;
Return 0 if successful, -1 if not. */
int
-xatexit (fn)
- void (*fn) PARAMS ((void));
+xatexit (void (*fn) (void))
{
register struct xatexit *p;
@@ -90,7 +85,7 @@ xatexit (fn)
/* Call any cleanup functions. */
static void
-xatexit_cleanup ()
+xatexit_cleanup (void)
{
register struct xatexit *p;
register int n;
diff --git a/libiberty/xexit.c b/libiberty/xexit.c
index a65690f09c3..552db65df6d 100644
--- a/libiberty/xexit.c
+++ b/libiberty/xexit.c
@@ -41,11 +41,10 @@ Termination is handled via the system's normal @code{exit} call.
/* This variable is set by xatexit if it is called. This way, xmalloc
doesn't drag xatexit into the link. */
-void (*_xexit_cleanup) PARAMS ((void));
+void (*_xexit_cleanup) (void);
void
-xexit (code)
- int code;
+xexit (int code)
{
if (_xexit_cleanup != NULL)
(*_xexit_cleanup) ();
diff --git a/libiberty/xmalloc.c b/libiberty/xmalloc.c
index c3fe1a84f4d..ac1f6cb9432 100644
--- a/libiberty/xmalloc.c
+++ b/libiberty/xmalloc.c
@@ -68,22 +68,17 @@ function will be called to print an error message and terminate execution.
#include <stdio.h>
-#ifdef ANSI_PROTOTYPES
#include <stddef.h>
-#else
-#define size_t unsigned long
-#define ptrdiff_t long
-#endif
#if VMS
#include <stdlib.h>
#include <unixlib.h>
#else
/* For systems with larger pointers than ints, these must be declared. */
-PTR malloc PARAMS ((size_t));
-PTR realloc PARAMS ((PTR, size_t));
-PTR calloc PARAMS ((size_t, size_t));
-PTR sbrk PARAMS ((ptrdiff_t));
+PTR malloc (size_t);
+PTR realloc (PTR, size_t);
+PTR calloc (size_t, size_t);
+PTR sbrk (ptrdiff_t);
#endif
/* The program name if set. */
@@ -96,8 +91,7 @@ static char *first_break = NULL;
#endif /* HAVE_SBRK */
void
-xmalloc_set_program_name (s)
- const char *s;
+xmalloc_set_program_name (const char *s)
{
name = s;
#ifdef HAVE_SBRK
@@ -108,8 +102,7 @@ xmalloc_set_program_name (s)
}
void
-xmalloc_failed (size)
- size_t size;
+xmalloc_failed (size_t size)
{
#ifdef HAVE_SBRK
extern char **environ;
@@ -133,8 +126,7 @@ xmalloc_failed (size)
}
PTR
-xmalloc (size)
- size_t size;
+xmalloc (size_t size)
{
PTR newmem;
@@ -148,8 +140,7 @@ xmalloc (size)
}
PTR
-xcalloc (nelem, elsize)
- size_t nelem, elsize;
+xcalloc (size_t nelem, size_t elsize)
{
PTR newmem;
@@ -164,9 +155,7 @@ xcalloc (nelem, elsize)
}
PTR
-xrealloc (oldmem, size)
- PTR oldmem;
- size_t size;
+xrealloc (PTR oldmem, size_t size)
{
PTR newmem;
diff --git a/libiberty/xmemdup.c b/libiberty/xmemdup.c
index 9e9d66b715d..d4831163a20 100644
--- a/libiberty/xmemdup.c
+++ b/libiberty/xmemdup.c
@@ -24,15 +24,15 @@ allocated, the remaining memory is zeroed.
#include <sys/types.h> /* For size_t. */
#ifdef HAVE_STRING_H
#include <string.h>
+#else
+# ifdef HAVE_STRINGS_H
+# include <strings.h>
+# endif
#endif
PTR
-xmemdup (input, copy_size, alloc_size)
- const PTR input;
- size_t copy_size;
- size_t alloc_size;
+xmemdup (const PTR input, size_t copy_size, size_t alloc_size)
{
PTR output = xcalloc (1, alloc_size);
- memcpy (output, input, copy_size);
- return output;
+ return (PTR) memcpy (output, input, copy_size);
}
diff --git a/libiberty/xstrdup.c b/libiberty/xstrdup.c
index 5aa084a7687..c04623d98ec 100644
--- a/libiberty/xstrdup.c
+++ b/libiberty/xstrdup.c
@@ -19,16 +19,18 @@ obtain memory.
#endif
#ifdef HAVE_STRING_H
#include <string.h>
+#else
+# ifdef HAVE_STRINGS_H
+# include <strings.h>
+# endif
#endif
#include "ansidecl.h"
#include "libiberty.h"
char *
-xstrdup (s)
- const char *s;
+xstrdup (const char *s)
{
register size_t len = strlen (s) + 1;
register char *ret = xmalloc (len);
- memcpy (ret, s, len);
- return ret;
+ return (char *) memcpy (ret, s, len);
}
diff --git a/libiberty/xstrerror.c b/libiberty/xstrerror.c
index e3f1ca04a26..01f3a7b961a 100644
--- a/libiberty/xstrerror.c
+++ b/libiberty/xstrerror.c
@@ -21,13 +21,13 @@ will never return a @code{NULL} pointer.
#ifdef VMS
#include <errno.h>
#if !defined (__STRICT_ANSI__) && !defined (__HIDE_FORBIDDEN_NAMES)
-extern char *strerror PARAMS ((int,...));
+extern char *strerror (int,...);
#define DONT_DECLARE_STRERROR
#endif
#endif /* VMS */
#ifndef DONT_DECLARE_STRERROR
-extern char *strerror PARAMS ((int));
+extern char *strerror (int);
#endif
/* If strerror returns NULL, we'll format the number into a static buffer. */
@@ -38,15 +38,14 @@ static char xstrerror_buf[sizeof ERRSTR_FMT + 20];
/* Like strerror, but result is never a null pointer. */
char *
-xstrerror (errnum)
- int errnum;
+xstrerror (int errnum)
{
char *errstr;
#ifdef VMS
- char *(*vmslib_strerror) PARAMS ((int,...));
+ char *(*vmslib_strerror) (int,...);
/* Override any possibly-conflicting declaration from system header. */
- vmslib_strerror = (char *(*) PARAMS ((int,...))) strerror;
+ vmslib_strerror = (char *(*) (int,...)) strerror;
/* Second argument matters iff first is EVMSERR, but it's simpler to
pass it unconditionally. `vaxc$errno' is declared in <errno.h>
and maintained by the run-time library in parallel to `errno'.
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 660f30e4ba8..499fc05694c 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,209 @@
+2005-03-29 Ian Lance Taylor <ian@airs.com>
+
+ * external/sax/Makefile.am (GCJ_WITH_FLAGS): Add "-fclasspath=".
+ * external/sax/Makefile.in: Rebuild.
+ * external/w3c_dom/Makefile.am (GCJ_WITH_FLAGS): Add
+ "-fclasspath=".
+ * external/w3c_dom/Makefile.in: Rebuild.
+
+2005-03-29 Tom Tromey <tromey@redhat.com>
+
+ * java/lang/natRuntime.cc (insertSystemProperties): Set
+ gnu.gcj.runtime.endorsed.dirs.
+ * Makefile.in: Rebuilt.
+ * Makefile.am (ordinary_java_source_files): Added
+ HelperClassLoader.java.
+ (AM_CXXFLAGS): Define GCJ_ENDORSED_DIRS.
+ * gnu/gcj/runtime/VMClassLoader.java (VMClassLoader): Extends
+ HelperClassLoader.
+ (init): Use addDirectoriesFromProperty.
+ * gnu/gcj/runtime/BootClassLoader.java (BootClassLoader): Extends
+ HelperClassLoader. Use addDirectoriesFromProperty. Handle
+ gnu.gcj.runtime.endorsed.dirs.
+ * gnu/gcj/runtime/HelperClassLoader.java: New file.
+
+2005-03-26 Chris Burdess <dog@gnu.org>
+
+ * gnu/xml/dom/DomNode.java (notifyNode): grow listener array as
+ required.
+
+2005-03-13 Michael Koch <konqueror@gmx.de>
+
+ * gnu/xml/aelfred2/XmlParser.java: Fixed typo.
+
+2005-03-11 Chris Burdess <dog@gnu.org>
+
+ * gnu/xml/aelfred2/SAXDriver.java: Corrected bug handling URI
+ warnings.
+
+2005-02-27 Chris Burdess <dog@gnu.org>
+
+ * gnu/xml/aelfred2/JAXPFactory.java,
+ gnu/xml/aelfred2/SAXDriver.java,
+ gnu/xml/aelfred2/XmlParser.java,
+ gnu/xml/aelfred2/XmlReader.java: Applied GNU Classpath source code
+ formatting conventions. Replaced arrays of Object with struct-like
+ classes for easier maintainability. Made SAXDriver.stringInterning
+ package private to allow access from XmlParser inside the loop without
+ a method call overhead.
+
+2005-03-11 Chris Burdess <dog@gnu.org>
+
+ * gnu/xml/aelfred2/SAXDriver.java: Corrected bug handling URI
+ warnings.
+
+2005-03-28 Alexandre Oliva <aoliva@redhat.com>
+
+ * configure.ac: Revert 2005-03-25's patch. Propagate MULTIlib
+ settings to sub Makefiles.
+ (GCJH, ZIP): Prefix with top_builddir.
+ * configure: Rebuild.
+ * external/w3c_dom/Makefile.am (MULTIBUILDTOP): Don't override.
+ * external/w3c_dom/Makefile.in: Rebuild.
+ * external/sax/Makefile.am (MULTIBUILDTOP): Don't override.
+ * external/sax/Makefile.in: Rebuild.
+
+2005-03-28 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ * testsuite/libjava.jni/jni.exp (gcj_jni_invocation_test_one): Add
+ libsocket to the libraries to link for Solaris.
+
+2005-03-28 Per Bothner <per@bothner.com>
+
+ * boehm.cc (_Jv_MarkObj): Don't follow null pointer to static field,
+ which can happen if class is JV_STATE_LOADED but not JV_STATE_PREPARED.
+
+2005-03-27 Andreas Tobler <a.tobler@schweiz.ch>
+
+ * Makefile.am (classes.stamp): Add gnu/gcj/tools/gcj_dbtool/Main.java
+ to fix a ONESTEP fallout.
+ * Makefile.in: Regenerate.
+
+2005-03-25 Mike Stump <mrs@apple.com>
+
+ * configure.ac: Fix ZIP and GCJH at configure time to absolute
+ paths like we do for the compiler, as we use it in external/sax
+ and it doesn't get MULTIBUILDTOP right when multilibing.
+
+2005-03-24 Anthony Green <green@redhat.com>
+
+ * gnu/gcj/tools/gcj_dbtool/Main.java: Accept libdir argument with
+ -p option.
+ (usage): Add [LIBDIR] to help output.
+ * gnu/gcj/tools/gcj_dbtool/natMain.cc: New file.
+ * Makefile.am (AM_CXXFLAGS): Define
+ LIBGCJ_DEFAULT_DATABASE_PATH_TAIL.
+ (db_pathtail): New macro.
+
+2005-03-24 Tom Tromey <tromey@redhat.com>
+
+ * gnu/gcj/runtime/BootClassLoader.java (BootClassLoader): Don't
+ add sax and w3c libraries.
+ * Makefile.am (libgij_la_LIBADD): Added libsax-gcj.la and
+ libw3c-gcj.la.
+ * external/w3c_dom/Makefile.in: Rebuilt.
+ * external/w3c_dom/Makefile.am (libw3c_gcj_la_GCJFLAGS): Include
+ AM_GCJFLAGS.
+ (libw3c_gcj_la_LDFLAGS): New variable.
+ (noinst_LTLIBRARIES): Renamed.
+ * external/sax/Makefile.in: Rebuilt.
+ * external/sax/Makefile.am (libsax_gcj_la_GCJFLAGS): Include
+ AM_GCJFLAGS.
+ (libsax_gcj_la_LDFLAGS): New variable.
+ (noinst_LTLIBRARIES): Renamed.
+
+2005-03-23 Tom Tromey <tromey@redhat.com>
+
+ * Makefile.in: Rebuilt.
+ * Makefile.am (AM_CXXFLAGS): Define TOOLEXECLIBDIR.
+ (libgcj0_convenience_la_SOURCES): Don't include
+ gnu_xml_source_files.
+ (libgcj0_convenience_la_LIBADD): New variable.
+ (libgcj_la_LIBADD): Don't include sax or w3c_dom.
+ (all_java_source_files): javax_imageio_source_files,
+ javax_xml_source_files, and gnu_java_beans_source_files.
+ ($(gnu_xml_source_files:.java=.lo)): Removed target.
+ (gnu-xml.lo): New target.
+ (javax-imageio.lo): Likewise.
+ (javax-xml.lo): Likewise.
+ (gnu-java-beans.lo): Likewise.
+ (gnu_java_beans_source_files): New variable.
+ (javax_imageio_source_files): Likewise.
+ (javax_xml_source_files): Likewise.
+ (javax_source_files): Moved files to other variable.
+ (awt_java_source_files): Likewise.
+ (ordinary_java_source_files): Added BootClassLoader.java.
+ * java/lang/natVMClassLoader.cc (defineClass): Use boot loader,
+ not system class loader.
+ (initBootLoader): New method.
+ (loadClass): Search bootLoader.
+ * java/lang/natClassLoader.cc (_Jv_RegisterInitiatingLoader): Use
+ boot loader, not system class loader.
+ (_Jv_UnregisterInitiatingLoader): Likewise.
+ (_Jv_FindClass): Likewise. Ensure entries in
+ bootstrap_class_list are unique.
+ * java/lang/natClass.cc (getClassLoader): Don't special case
+ system class loader.
+ * java/lang/VMClassLoader.java (bootLoader): New field.
+ (getResource): Use bootLoader.
+ (getResources): Likewise.
+ (initBootLoader): Declare.
+ * gnu/gcj/runtime/BootClassLoader.java: New file.
+ * external/sax/org/xml/sax/helpers/NamespaceSupport.java
+ (EMPTY_ENUMERATION): Now package-private.
+ * external/w3c_com/Makefile.in: Rebuilt.
+ * external/w3c_com/Makefile.am (MULTIBUILDTOP): New variable.
+ (w3c.jar): New target.
+ (classes.stamp): Updated.
+ (toolexeclib_LTLIBRARIES): Renamed from noinst_LTLIBRARIES.
+ Changed name of library.
+ (libw3c_gcj_la_SOURCES): New variable.
+ (libw3c_gcj_la_GCJFLAGS): Likewise.
+ (source_files): Renamed from lib3c_convenience_la_SOURCES.
+ * external/sax/Makefile.in: Rebuilt.
+ * external/sax/Makefile.am (MULTIBUILDTOP): New variable.
+ (sax.jar): New target.
+ (classes.stamp): Updated.
+ (toolexeclib_LTLIBRARIES): Renamed from noinst_LTLIBRARIES.
+ Changed name of library.
+ (libsax_gcj_la_SOURCES): New variable.
+ (libsax_gcj_la_GCJFLAGS): Likewise.
+ (source_files): Renamed from libsax_convenience_la_SOURCES.
+ * stacktrace.cc (non_system_trace_fn): Don't look at system class
+ loader.
+ * prims.cc (_Jv_CreateJavaVM): Initialize the bootstrap class
+ loader.
+ (_Jv_RunMain): Handle case where 'runtime' is NULL at exit.
+
+2005-03-23 Sven de Marothy <sven@physto.se>
+
+ PR libgcj/2641, PR libgcj/9854, PR libgcj/14892, PR libgcj/18083,
+ PR libgcj/11085:
+ * java/util/Calendar.java
+ (set): Use starting day of week when one is needed if none is given.
+ * java/text/SimpleDateFormat.java
+ (parse): Handle 1-12 and 1-24 timestamps correctly.
+ * java/util/GregorianCalendar.java
+ (computeTime, computeFields): HOUR should be in 0-11 format.
+ (nonLeniencyCheck): Adjust leniency checking to that fact.
+ (getLinearDay): Should be private.
+
+2005-03-23 Tom Tromey <tromey@redhat.com>
+
+ * include/jvm.h (GCJ_40_BC_ABI_VERSION): New define.
+ (_Jv_CheckABIVersion): Use it.
+
+2005-03-22 Mike Stump <mrs@apple.com>
+
+ * stacktrace.cc: Delete unused _Jv_FindCallingClassState.
+
+ * include/posix.h: .dylib is used on all Apple MACH platforms.
+ * java/lang/ieeefp.h: ppc64 is also __IEEE_BIG_ENDIAN.
+
+2005-03-22 Tom Tromey <tromey@redhat.com>
+
+ * gnu/gcj/tools/gcj_dbtool/Main.java (usage): Fixed output.
+
2005-03-21 Tom Tromey <tromey@redhat.com>
* java/lang/VMCompiler.java (static block): Also catch
@@ -20989,3 +21195,4 @@
* java/util/Date.java (parse): Fix a number of problems.
(skipParens): Remove no-longer-needed method.
+
diff --git a/libjava/Makefile.am b/libjava/Makefile.am
index a9141a0f038..1694560a678 100644
--- a/libjava/Makefile.am
+++ b/libjava/Makefile.am
@@ -130,6 +130,8 @@ propdir = $(libdir)
dbexecdir = $(libdir)/gcj-$(gcc_version)
## Name of the default .db.
db_name = classmap.db
+## Compiler specific component of the .db file
+db_pathtail = gcj-@gcc_version@/$(db_name)
## For now, only on native systems. FIXME.
if NATIVE
@@ -184,7 +186,10 @@ AM_CXXFLAGS = \
-DLIBDIR="\"$(libdir)\"" \
-DBOOT_CLASS_PATH="\"$(jardir)/$(jar_DATA)\"" \
-DJAVA_EXT_DIRS="\"$(jardir)/ext\"" \
- -DLIBGCJ_DEFAULT_DATABASE="\"$(dbexecdir)/$(db_name)\""
+ -DGCJ_ENDORSED_DIRS="\"$(jardir)/gcj-endorsed\"" \
+ -DLIBGCJ_DEFAULT_DATABASE="\"$(dbexecdir)/$(db_name)\"" \
+ -DLIBGCJ_DEFAULT_DATABASE_PATH_TAIL="\"$(db_pathtail)\"" \
+ -DTOOLEXECLIBDIR="\"$(toolexeclibdir)\""
AM_GCJFLAGS = \
@LIBGCJ_JAVAFLAGS@ \
@@ -221,7 +226,9 @@ BOOTCLASSPATH = $(here)'$(CLASSPATH_SEPARATOR)'$(srcdir)'$(CLASSPATH_SEPARATOR)'
libgij_la_SOURCES = gij.cc
libgij_la_DEPENDENCIES = libgcj.la libgcj.spec
## See jv_convert_LDADD.
-libgij_la_LIBADD = -L$(here)/.libs libgcj.la
+libgij_la_LIBADD = -L$(here)/.libs libgcj.la \
+ external/sax/libsax-gcj.la \
+ external/w3c_dom/libw3c-gcj.la
## The mysterious backslash in the grep pattern is consumed by make.
libgij_la_LDFLAGS = -rpath $(toolexeclibdir) \
-version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
@@ -233,12 +240,16 @@ libgij_la_LDFLAGS = -rpath $(toolexeclibdir) \
libgcj0_convenience_la_SOURCES = prims.cc jni.cc exception.cc stacktrace.cc \
link.cc defineclass.cc interpret.cc verify.cc \
$(nat_source_files) $(math_c_source_files) $(java_source_files) \
- $(gnu_xml_source_files) $(built_java_source_files) \
+ $(built_java_source_files) \
$(BOEHMGC_SRC) $(NOGC_SRC) \
$(BACKTRACE_SRC) \
$(POSIX_PLATFORM_SRC) $(WIN32_PLATFORM_SRC) $(ECOS_PLATFORM_SRC) \
$(DARWIN_CRT_SRC) \
$(POSIX_THREAD_SRC) $(WIN32_THREAD_SRC) $(NO_THREAD_SRC)
+libgcj0_convenience_la_LIBADD = \
+ gnu-xml.lo javax-imageio.lo \
+ javax-xml.lo gnu-java-beans.lo
+
noinst_LTLIBRARIES = libgcj0_convenience.la
libgcj_la_SOURCES =
@@ -254,8 +265,6 @@ libgcj_la_LDFLAGS = -rpath $(toolexeclibdir) $(THREADLDFLAGS) $(THREADLIBS) \
$(LIBLTDL) $(SYS_ZLIBS) \
-version-info `grep -v '^\#' $(srcdir)/libtool-version`
libgcj_la_LIBADD = \
- external/sax/libsax_convenience.la \
- external/w3c_dom/libw3c_convenience.la \
libgcj0_convenience.la \
$(LIBFFI) $(ZLIBS) $(GCLIBS) $(propertyo_files)
libgcj_la_DEPENDENCIES = libgcj-$(gcc_version).jar \
@@ -515,7 +524,10 @@ all_java_source_files = \
$(built_java_source_files) \
$(gtk_awt_peer_sources) \
$(xlib_java_source_files) \
- $(gnu_xml_source_files)
+ $(gnu_xml_source_files) \
+ $(javax_imageio_source_files) \
+ $(javax_xml_source_files) \
+ $(gnu_java_beans_source_files)
all_java_class_files = $(all_java_source_files:.java=.class)
@@ -537,7 +549,7 @@ if ONESTEP
# Compile all classfiles in one go.
-classes.stamp: $(all_java_source_files)
+classes.stamp: $(all_java_source_files) gnu/gcj/tools/gcj_dbtool/Main.java
@echo Compiling Java sourcefiles...
@: $(call write_entries_to_file,$?,libgcj.sourcelist)
$(JAVAC) $(JCFLAGS) -classpath '' -bootclasspath $(BOOTCLASSPATH) -d $(here) @libgcj.sourcelist
@@ -546,7 +558,7 @@ classes.stamp: $(all_java_source_files)
# classfiles are compiled in one go when classes.stamp is built and 2)
# anything which depends on a particular .class file must wait until
# this file is built.
-$(all_java_class_files): classes.stamp
+$(all_java_class_files) gnu/gcj/tools/gcj_dbtool/Main.class: classes.stamp
else # !ONESTEP
@@ -610,7 +622,7 @@ SUFFIXES = .class .java .h .properties
$(javao_files) $(xlib_javao_files): %.lo: %.java
$(LTGCJCOMPILE) -o $@ -c $<
-$(gtk_awt_peer_sources:.java=.lo) $(gnu_xml_source_files:.java=.lo): %.lo: %.java
+$(gtk_awt_peer_sources:.java=.lo): %.lo: %.java
$(LTGCJCOMPILE) -fjni -o $@ -c $<
## Pass the list of object files to libtool in a temporary file to
@@ -631,6 +643,58 @@ lib-gnu-awt-xlib.la: $(lib_gnu_awt_xlib_la_OBJECTS) $(lib_gnu_awt_xlib_la_DEPEND
## ################################################################
##
+## Some packages must be built with the binary compatibility ABI. We
+## compile each such package into a .so, broken down more or less by
+## conceptual unit.
+##
+
+## Depend on the sources, even though we are going to compile the
+## classes.
+gnu-xml.lo: $(gnu_xml_source_files)
+## FIXME: this is ugly. We want to make sure the .class files have
+## been built, but we don't want a real dependency on them as this
+## would cause our target to be rebuilt whenever any .java file is
+## touched.
+ $(MAKE) classes.stamp
+ $(LTGCJCOMPILE) -fjni -findirect-dispatch -c -o gnu-xml.lo \
+ `find gnu/xml -name '*.class' -print`
+
+## Depend on the sources, even though we are going to compile the
+## classes.
+javax-imageio.lo: $(javax_imageio_source_files)
+## FIXME: this is ugly. We want to make sure the .class files have
+## been built, but we don't want a real dependency on them as this
+## would cause our target to be rebuilt whenever any .java file is
+## touched.
+ $(MAKE) classes.stamp
+ $(LTGCJCOMPILE) -findirect-dispatch -c -o javax-imageio.lo \
+ `find javax/imageio -name '*.class' -print`
+
+## Depend on the sources, even though we are going to compile the
+## classes.
+javax-xml.lo: $(javax_xml_source_files)
+## FIXME: this is ugly. We want to make sure the .class files have
+## been built, but we don't want a real dependency on them as this
+## would cause our target to be rebuilt whenever any .java file is
+## touched.
+ $(MAKE) classes.stamp
+ $(LTGCJCOMPILE) -findirect-dispatch -c -o javax-xml.lo \
+ `find javax/xml -name '*.class' -print`
+
+## Depend on the sources, even though we are going to compile the
+## classes.
+gnu-java-beans.lo: $(gnu_java_beans_source_files)
+## FIXME: this is ugly. We want to make sure the .class files have
+## been built, but we don't want a real dependency on them as this
+## would cause our target to be rebuilt whenever any .java file is
+## touched.
+ $(MAKE) classes.stamp
+ $(LTGCJCOMPILE) -findirect-dispatch -c -o gnu-java-beans.lo \
+ `find gnu/java/beans -name '*.class' -print`
+
+## ################################################################
+
+##
## How to build header files.
##
@@ -655,7 +719,7 @@ inner_nat_headers = java/io/ObjectOutputStream$$PutField.h \
gnu/java/nio/PipeImpl$$SourceChannelImpl.h \
$(PLATFORM_INNER_NAT_HDRS)
-nat_headers = $(ordinary_nat_headers) $(inner_nat_headers)
+nat_headers = $(ordinary_nat_headers) $(inner_nat_headers) gnu/gcj/tools/gcj_dbtool/Main.h
nat_headers_install = $(ordinary_nat_headers)
xlib_nat_headers = $(xlib_java_source_files:.java=.h)
@@ -968,7 +1032,8 @@ jv_convert_LDADD = -L$(here)/.libs libgcj.la
## linking this program.
jv_convert_DEPENDENCIES = libgcj.la libgcj.spec
-gcj_dbtool_SOURCES = gnu/gcj/tools/gcj_dbtool/Main.java
+gcj_dbtool_SOURCES = gnu/gcj/tools/gcj_dbtool/Main.java \
+ gnu/gcj/tools/gcj_dbtool/natMain.cc
## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'. We
## need this because we are explicitly using libtool to link using the
## `.la' file.
@@ -1054,40 +1119,7 @@ gnu/gcj/convert/UnicodeToBytes.java
## hand.
special_java_source_files = java/lang/Class.java java/lang/Object.java
-awt_java_source_files = \
-gnu/awt/LightweightRedirector.java \
-gnu/awt/j2d/AbstractGraphicsState.java \
-gnu/awt/j2d/DirectRasterGraphics.java \
-gnu/awt/j2d/Graphics2DImpl.java \
-gnu/awt/j2d/IntegerGraphicsState.java \
-gnu/awt/j2d/MappedRaster.java \
-gnu/java/awt/BitMaskExtent.java \
-gnu/java/awt/Buffers.java \
-gnu/java/awt/BitwiseXORComposite.java \
-gnu/java/awt/ComponentDataBlitOp.java \
-gnu/java/awt/ClasspathToolkit.java \
-gnu/java/awt/EmbeddedWindow.java \
-gnu/java/awt/EmbeddedWindowSupport.java \
-gnu/java/awt/EventModifier.java \
-gnu/java/awt/color/CieXyzConverter.java \
-gnu/java/awt/color/ClutProfileConverter.java \
-gnu/java/awt/color/ColorLookUpTable.java \
-gnu/java/awt/color/ColorSpaceConverter.java \
-gnu/java/awt/color/GrayProfileConverter.java \
-gnu/java/awt/color/GrayScaleConverter.java \
-gnu/java/awt/color/LinearRGBConverter.java \
-gnu/java/awt/color/ProfileHeader.java \
-gnu/java/awt/color/PyccConverter.java \
-gnu/java/awt/color/RgbProfileConverter.java \
-gnu/java/awt/color/SrgbConverter.java \
-gnu/java/awt/color/TagEntry.java \
-gnu/java/awt/color/ToneReproductionCurve.java \
-gnu/java/awt/image/ImageDecoder.java \
-gnu/java/awt/image/XBMDecoder.java \
-gnu/java/awt/peer/EmbeddedWindowPeer.java \
-gnu/java/awt/peer/GLightweightPeer.java \
-gnu/java/awt/peer/ClasspathFontPeer.java \
-gnu/java/awt/peer/ClasspathTextLayoutPeer.java \
+gnu_java_beans_source_files = \
gnu/java/beans/decoder/AbstractContext.java \
gnu/java/beans/decoder/AbstractCreatableObjectContext.java \
gnu/java/beans/decoder/AbstractElementHandler.java \
@@ -1139,7 +1171,42 @@ gnu/java/beans/BeanInfoEmbryo.java \
gnu/java/beans/DummyAppletContext.java \
gnu/java/beans/DummyAppletStub.java \
gnu/java/beans/ExplicitBeanInfo.java \
-gnu/java/beans/IntrospectionIncubator.java \
+gnu/java/beans/IntrospectionIncubator.java
+
+awt_java_source_files = \
+gnu/awt/LightweightRedirector.java \
+gnu/awt/j2d/AbstractGraphicsState.java \
+gnu/awt/j2d/DirectRasterGraphics.java \
+gnu/awt/j2d/Graphics2DImpl.java \
+gnu/awt/j2d/IntegerGraphicsState.java \
+gnu/awt/j2d/MappedRaster.java \
+gnu/java/awt/BitMaskExtent.java \
+gnu/java/awt/Buffers.java \
+gnu/java/awt/BitwiseXORComposite.java \
+gnu/java/awt/ComponentDataBlitOp.java \
+gnu/java/awt/ClasspathToolkit.java \
+gnu/java/awt/EmbeddedWindow.java \
+gnu/java/awt/EmbeddedWindowSupport.java \
+gnu/java/awt/EventModifier.java \
+gnu/java/awt/color/CieXyzConverter.java \
+gnu/java/awt/color/ClutProfileConverter.java \
+gnu/java/awt/color/ColorLookUpTable.java \
+gnu/java/awt/color/ColorSpaceConverter.java \
+gnu/java/awt/color/GrayProfileConverter.java \
+gnu/java/awt/color/GrayScaleConverter.java \
+gnu/java/awt/color/LinearRGBConverter.java \
+gnu/java/awt/color/ProfileHeader.java \
+gnu/java/awt/color/PyccConverter.java \
+gnu/java/awt/color/RgbProfileConverter.java \
+gnu/java/awt/color/SrgbConverter.java \
+gnu/java/awt/color/TagEntry.java \
+gnu/java/awt/color/ToneReproductionCurve.java \
+gnu/java/awt/image/ImageDecoder.java \
+gnu/java/awt/image/XBMDecoder.java \
+gnu/java/awt/peer/EmbeddedWindowPeer.java \
+gnu/java/awt/peer/GLightweightPeer.java \
+gnu/java/awt/peer/ClasspathFontPeer.java \
+gnu/java/awt/peer/ClasspathTextLayoutPeer.java \
java/applet/Applet.java \
java/applet/AppletStub.java \
java/applet/AppletContext.java \
@@ -1982,7 +2049,7 @@ gnu/java/rmi/server/UnicastRemoteStub.java \
gnu/java/rmi/server/UnicastServer.java \
gnu/java/rmi/server/UnicastServerRef.java
-javax_source_files = \
+javax_imageio_source_files = \
javax/imageio/ImageWriteParam.java \
javax/imageio/ImageReader.java \
javax/imageio/ImageWriter.java \
@@ -2028,7 +2095,63 @@ javax/imageio/event/IIOWriteProgressListener.java \
javax/imageio/ImageTranscoder.java \
javax/imageio/ImageTypeSpecifier.java \
javax/imageio/ImageIO.java \
-javax/imageio/IIOImage.java \
+javax/imageio/IIOImage.java
+
+javax_xml_source_files = \
+javax/xml/xpath/XPathConstants.java \
+javax/xml/xpath/XPathFunction.java \
+javax/xml/xpath/XPathVariableResolver.java \
+javax/xml/xpath/XPathExpressionException.java \
+javax/xml/xpath/XPathFunctionResolver.java \
+javax/xml/xpath/XPath.java \
+javax/xml/xpath/XPathFactoryConfigurationException.java \
+javax/xml/xpath/XPathFactory.java \
+javax/xml/xpath/XPathException.java \
+javax/xml/xpath/XPathExpression.java \
+javax/xml/xpath/XPathFunctionException.java \
+javax/xml/validation/ValidatorHandler.java \
+javax/xml/validation/Validator.java \
+javax/xml/validation/TypeInfoProvider.java \
+javax/xml/validation/SchemaFactory.java \
+javax/xml/validation/Schema.java \
+javax/xml/parsers/SAXParserFactory.java \
+javax/xml/parsers/FactoryConfigurationError.java \
+javax/xml/parsers/SAXParser.java \
+javax/xml/parsers/DocumentBuilderFactory.java \
+javax/xml/parsers/ParserConfigurationException.java \
+javax/xml/parsers/DocumentBuilder.java \
+javax/xml/datatype/DatatypeFactory.java \
+javax/xml/datatype/XMLGregorianCalendar.java \
+javax/xml/datatype/Duration.java \
+javax/xml/datatype/DatatypeConfigurationException.java \
+javax/xml/datatype/DatatypeConstants.java \
+javax/xml/XMLConstants.java \
+javax/xml/namespace/NamespaceContext.java \
+javax/xml/namespace/QName.java \
+javax/xml/transform/TransformerException.java \
+javax/xml/transform/TransformerFactoryConfigurationError.java \
+javax/xml/transform/sax/SAXResult.java \
+javax/xml/transform/sax/TransformerHandler.java \
+javax/xml/transform/sax/SAXTransformerFactory.java \
+javax/xml/transform/sax/SAXSource.java \
+javax/xml/transform/sax/TemplatesHandler.java \
+javax/xml/transform/OutputKeys.java \
+javax/xml/transform/stream/StreamResult.java \
+javax/xml/transform/stream/StreamSource.java \
+javax/xml/transform/Source.java \
+javax/xml/transform/SourceLocator.java \
+javax/xml/transform/ErrorListener.java \
+javax/xml/transform/TransformerConfigurationException.java \
+javax/xml/transform/Templates.java \
+javax/xml/transform/Result.java \
+javax/xml/transform/URIResolver.java \
+javax/xml/transform/dom/DOMSource.java \
+javax/xml/transform/dom/DOMLocator.java \
+javax/xml/transform/dom/DOMResult.java \
+javax/xml/transform/Transformer.java \
+javax/xml/transform/TransformerFactory.java
+
+javax_source_files = \
javax/net/VanillaSocketFactory.java \
javax/net/ssl/TrustManagerFactorySpi.java \
javax/net/ssl/SSLKeyException.java \
@@ -2267,58 +2390,6 @@ javax/naming/NameClassPair.java \
javax/naming/RefAddr.java \
javax/naming/CompositeName.java \
javax/naming/Name.java \
-javax/xml/xpath/XPathConstants.java \
-javax/xml/xpath/XPathFunction.java \
-javax/xml/xpath/XPathVariableResolver.java \
-javax/xml/xpath/XPathExpressionException.java \
-javax/xml/xpath/XPathFunctionResolver.java \
-javax/xml/xpath/XPath.java \
-javax/xml/xpath/XPathFactoryConfigurationException.java \
-javax/xml/xpath/XPathFactory.java \
-javax/xml/xpath/XPathException.java \
-javax/xml/xpath/XPathExpression.java \
-javax/xml/xpath/XPathFunctionException.java \
-javax/xml/validation/ValidatorHandler.java \
-javax/xml/validation/Validator.java \
-javax/xml/validation/TypeInfoProvider.java \
-javax/xml/validation/SchemaFactory.java \
-javax/xml/validation/Schema.java \
-javax/xml/parsers/SAXParserFactory.java \
-javax/xml/parsers/FactoryConfigurationError.java \
-javax/xml/parsers/SAXParser.java \
-javax/xml/parsers/DocumentBuilderFactory.java \
-javax/xml/parsers/ParserConfigurationException.java \
-javax/xml/parsers/DocumentBuilder.java \
-javax/xml/datatype/DatatypeFactory.java \
-javax/xml/datatype/XMLGregorianCalendar.java \
-javax/xml/datatype/Duration.java \
-javax/xml/datatype/DatatypeConfigurationException.java \
-javax/xml/datatype/DatatypeConstants.java \
-javax/xml/XMLConstants.java \
-javax/xml/namespace/NamespaceContext.java \
-javax/xml/namespace/QName.java \
-javax/xml/transform/TransformerException.java \
-javax/xml/transform/TransformerFactoryConfigurationError.java \
-javax/xml/transform/sax/SAXResult.java \
-javax/xml/transform/sax/TransformerHandler.java \
-javax/xml/transform/sax/SAXTransformerFactory.java \
-javax/xml/transform/sax/SAXSource.java \
-javax/xml/transform/sax/TemplatesHandler.java \
-javax/xml/transform/OutputKeys.java \
-javax/xml/transform/stream/StreamResult.java \
-javax/xml/transform/stream/StreamSource.java \
-javax/xml/transform/Source.java \
-javax/xml/transform/SourceLocator.java \
-javax/xml/transform/ErrorListener.java \
-javax/xml/transform/TransformerConfigurationException.java \
-javax/xml/transform/Templates.java \
-javax/xml/transform/Result.java \
-javax/xml/transform/URIResolver.java \
-javax/xml/transform/dom/DOMSource.java \
-javax/xml/transform/dom/DOMLocator.java \
-javax/xml/transform/dom/DOMResult.java \
-javax/xml/transform/Transformer.java \
-javax/xml/transform/TransformerFactory.java \
javax/security/cert/CertificateNotYetValidException.java \
javax/security/cert/Certificate.java \
javax/security/cert/X509Certificate.java \
@@ -2919,8 +2990,10 @@ gnu/gcj/RawDataManaged.java \
gnu/gcj/io/DefaultMimeTypes.java \
gnu/gcj/io/MimeTypes.java \
gnu/gcj/io/SimpleSHSStream.java \
+gnu/gcj/runtime/BootClassLoader.java \
gnu/gcj/runtime/FileDeleter.java \
gnu/gcj/runtime/FinalizerThread.java \
+gnu/gcj/runtime/HelperClassLoader.java \
gnu/gcj/runtime/JNIWeakRef.java \
gnu/gcj/runtime/NameFinder.java \
gnu/gcj/runtime/PersistentByteMap.java \
diff --git a/libjava/Makefile.in b/libjava/Makefile.in
index c98a225002a..d91dcf23fe2 100644
--- a/libjava/Makefile.in
+++ b/libjava/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# Makefile.in generated by automake 1.9.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -324,7 +324,8 @@ am__DEPENDENCIES_2 = gnu/regexp/MessagesBundle.properties.lo \
am__DEPENDENCIES_3 = $(am__DEPENDENCIES_2)
am_libgcj_la_OBJECTS =
libgcj_la_OBJECTS = $(am_libgcj_la_OBJECTS)
-libgcj0_convenience_la_LIBADD =
+libgcj0_convenience_la_DEPENDENCIES = gnu-xml.lo javax-imageio.lo \
+ javax-xml.lo gnu-java-beans.lo
am__libgcj0_convenience_la_SOURCES_DIST = prims.cc jni.cc exception.cc \
stacktrace.cc link.cc defineclass.cc interpret.cc verify.cc \
gnu/gcj/natCore.cc gnu/gcj/convert/JIS0208_to_Unicode.cc \
@@ -546,8 +547,10 @@ am__libgcj0_convenience_la_SOURCES_DIST = prims.cc jni.cc exception.cc \
gnu/gcj/Core.java gnu/gcj/RawData.java \
gnu/gcj/RawDataManaged.java gnu/gcj/io/DefaultMimeTypes.java \
gnu/gcj/io/MimeTypes.java gnu/gcj/io/SimpleSHSStream.java \
+ gnu/gcj/runtime/BootClassLoader.java \
gnu/gcj/runtime/FileDeleter.java \
gnu/gcj/runtime/FinalizerThread.java \
+ gnu/gcj/runtime/HelperClassLoader.java \
gnu/gcj/runtime/JNIWeakRef.java \
gnu/gcj/runtime/NameFinder.java \
gnu/gcj/runtime/PersistentByteMap.java \
@@ -1306,58 +1309,6 @@ am__libgcj0_convenience_la_SOURCES_DIST = prims.cc jni.cc exception.cc \
gnu/java/awt/peer/GLightweightPeer.java \
gnu/java/awt/peer/ClasspathFontPeer.java \
gnu/java/awt/peer/ClasspathTextLayoutPeer.java \
- gnu/java/beans/decoder/AbstractContext.java \
- gnu/java/beans/decoder/AbstractCreatableObjectContext.java \
- gnu/java/beans/decoder/AbstractElementHandler.java \
- gnu/java/beans/decoder/AbstractObjectContext.java \
- gnu/java/beans/decoder/ArrayContext.java \
- gnu/java/beans/decoder/ArrayHandler.java \
- gnu/java/beans/decoder/AssemblyException.java \
- gnu/java/beans/decoder/BooleanHandler.java \
- gnu/java/beans/decoder/ByteHandler.java \
- gnu/java/beans/decoder/CharHandler.java \
- gnu/java/beans/decoder/ClassHandler.java \
- gnu/java/beans/decoder/ConstructorContext.java \
- gnu/java/beans/decoder/Context.java \
- gnu/java/beans/decoder/DecoderContext.java \
- gnu/java/beans/decoder/DefaultExceptionListener.java \
- gnu/java/beans/decoder/DoubleHandler.java \
- gnu/java/beans/decoder/DummyContext.java \
- gnu/java/beans/decoder/DummyHandler.java \
- gnu/java/beans/decoder/ElementHandler.java \
- gnu/java/beans/decoder/FloatHandler.java \
- gnu/java/beans/decoder/GrowableArrayContext.java \
- gnu/java/beans/decoder/IndexContext.java \
- gnu/java/beans/decoder/IntHandler.java \
- gnu/java/beans/decoder/JavaHandler.java \
- gnu/java/beans/decoder/LongHandler.java \
- gnu/java/beans/decoder/MethodContext.java \
- gnu/java/beans/decoder/MethodFinder.java \
- gnu/java/beans/decoder/NullHandler.java \
- gnu/java/beans/decoder/ObjectContext.java \
- gnu/java/beans/decoder/ObjectHandler.java \
- gnu/java/beans/decoder/PersistenceParser.java \
- gnu/java/beans/decoder/PropertyContext.java \
- gnu/java/beans/decoder/ShortHandler.java \
- gnu/java/beans/decoder/SimpleHandler.java \
- gnu/java/beans/decoder/StaticMethodContext.java \
- gnu/java/beans/decoder/StringHandler.java \
- gnu/java/beans/decoder/VoidHandler.java \
- gnu/java/beans/editors/ColorEditor.java \
- gnu/java/beans/editors/FontEditor.java \
- gnu/java/beans/editors/NativeBooleanEditor.java \
- gnu/java/beans/editors/NativeByteEditor.java \
- gnu/java/beans/editors/NativeDoubleEditor.java \
- gnu/java/beans/editors/NativeFloatEditor.java \
- gnu/java/beans/editors/NativeIntEditor.java \
- gnu/java/beans/editors/NativeLongEditor.java \
- gnu/java/beans/editors/NativeShortEditor.java \
- gnu/java/beans/editors/StringEditor.java \
- gnu/java/beans/BeanInfoEmbryo.java \
- gnu/java/beans/DummyAppletContext.java \
- gnu/java/beans/DummyAppletStub.java \
- gnu/java/beans/ExplicitBeanInfo.java \
- gnu/java/beans/IntrospectionIncubator.java \
java/applet/Applet.java java/applet/AppletStub.java \
java/applet/AppletContext.java java/applet/AudioClip.java \
java/awt/AWTError.java java/awt/AWTEvent.java \
@@ -1989,49 +1940,6 @@ am__libgcj0_convenience_la_SOURCES_DIST = prims.cc jni.cc exception.cc \
gnu/gcj/convert/Output_UTF8.java \
gnu/gcj/convert/Output_iconv.java \
gnu/gcj/convert/UnicodeToBytes.java \
- javax/imageio/ImageWriteParam.java \
- javax/imageio/ImageReader.java javax/imageio/ImageWriter.java \
- javax/imageio/IIOException.java \
- javax/imageio/IIOParamController.java \
- javax/imageio/ImageReadParam.java javax/imageio/IIOParam.java \
- javax/imageio/spi/IIORegistry.java \
- javax/imageio/spi/ImageWriterSpi.java \
- javax/imageio/spi/ImageOutputStreamSpi.java \
- javax/imageio/spi/ServiceRegistry.java \
- javax/imageio/spi/ImageTranscoderSpi.java \
- javax/imageio/spi/ImageReaderSpi.java \
- javax/imageio/spi/IIOServiceProvider.java \
- javax/imageio/spi/ImageReaderWriterSpi.java \
- javax/imageio/spi/ImageInputStreamSpi.java \
- javax/imageio/spi/RegisterableService.java \
- javax/imageio/metadata/IIOAttr.java \
- javax/imageio/metadata/IIONamedNodeMap.java \
- javax/imageio/metadata/IIONodeList.java \
- javax/imageio/metadata/IIOMetadataFormatImpl.java \
- javax/imageio/metadata/IIOInvalidTreeException.java \
- javax/imageio/metadata/IIOMetadataFormat.java \
- javax/imageio/metadata/IIOMetadataController.java \
- javax/imageio/metadata/IIOMetadataNode.java \
- javax/imageio/metadata/IIOMetadata.java \
- javax/imageio/stream/FileImageOutputStream.java \
- javax/imageio/stream/ImageInputStream.java \
- javax/imageio/stream/IIOByteBuffer.java \
- javax/imageio/stream/FileCacheImageInputStream.java \
- javax/imageio/stream/ImageInputStreamImpl.java \
- javax/imageio/stream/ImageOutputStreamImpl.java \
- javax/imageio/stream/MemoryCacheImageInputStream.java \
- javax/imageio/stream/FileCacheImageOutputStream.java \
- javax/imageio/stream/ImageOutputStream.java \
- javax/imageio/stream/MemoryCacheImageOutputStream.java \
- javax/imageio/stream/FileImageInputStream.java \
- javax/imageio/event/IIOReadProgressListener.java \
- javax/imageio/event/IIOWriteWarningListener.java \
- javax/imageio/event/IIOReadWarningListener.java \
- javax/imageio/event/IIOReadUpdateListener.java \
- javax/imageio/event/IIOWriteProgressListener.java \
- javax/imageio/ImageTranscoder.java \
- javax/imageio/ImageTypeSpecifier.java \
- javax/imageio/ImageIO.java javax/imageio/IIOImage.java \
javax/net/VanillaSocketFactory.java \
javax/net/ssl/TrustManagerFactorySpi.java \
javax/net/ssl/SSLKeyException.java \
@@ -2260,58 +2168,6 @@ am__libgcj0_convenience_la_SOURCES_DIST = prims.cc jni.cc exception.cc \
javax/naming/Reference.java javax/naming/NameParser.java \
javax/naming/NameClassPair.java javax/naming/RefAddr.java \
javax/naming/CompositeName.java javax/naming/Name.java \
- javax/xml/xpath/XPathConstants.java \
- javax/xml/xpath/XPathFunction.java \
- javax/xml/xpath/XPathVariableResolver.java \
- javax/xml/xpath/XPathExpressionException.java \
- javax/xml/xpath/XPathFunctionResolver.java \
- javax/xml/xpath/XPath.java \
- javax/xml/xpath/XPathFactoryConfigurationException.java \
- javax/xml/xpath/XPathFactory.java \
- javax/xml/xpath/XPathException.java \
- javax/xml/xpath/XPathExpression.java \
- javax/xml/xpath/XPathFunctionException.java \
- javax/xml/validation/ValidatorHandler.java \
- javax/xml/validation/Validator.java \
- javax/xml/validation/TypeInfoProvider.java \
- javax/xml/validation/SchemaFactory.java \
- javax/xml/validation/Schema.java \
- javax/xml/parsers/SAXParserFactory.java \
- javax/xml/parsers/FactoryConfigurationError.java \
- javax/xml/parsers/SAXParser.java \
- javax/xml/parsers/DocumentBuilderFactory.java \
- javax/xml/parsers/ParserConfigurationException.java \
- javax/xml/parsers/DocumentBuilder.java \
- javax/xml/datatype/DatatypeFactory.java \
- javax/xml/datatype/XMLGregorianCalendar.java \
- javax/xml/datatype/Duration.java \
- javax/xml/datatype/DatatypeConfigurationException.java \
- javax/xml/datatype/DatatypeConstants.java \
- javax/xml/XMLConstants.java \
- javax/xml/namespace/NamespaceContext.java \
- javax/xml/namespace/QName.java \
- javax/xml/transform/TransformerException.java \
- javax/xml/transform/TransformerFactoryConfigurationError.java \
- javax/xml/transform/sax/SAXResult.java \
- javax/xml/transform/sax/TransformerHandler.java \
- javax/xml/transform/sax/SAXTransformerFactory.java \
- javax/xml/transform/sax/SAXSource.java \
- javax/xml/transform/sax/TemplatesHandler.java \
- javax/xml/transform/OutputKeys.java \
- javax/xml/transform/stream/StreamResult.java \
- javax/xml/transform/stream/StreamSource.java \
- javax/xml/transform/Source.java \
- javax/xml/transform/SourceLocator.java \
- javax/xml/transform/ErrorListener.java \
- javax/xml/transform/TransformerConfigurationException.java \
- javax/xml/transform/Templates.java \
- javax/xml/transform/Result.java \
- javax/xml/transform/URIResolver.java \
- javax/xml/transform/dom/DOMSource.java \
- javax/xml/transform/dom/DOMLocator.java \
- javax/xml/transform/dom/DOMResult.java \
- javax/xml/transform/Transformer.java \
- javax/xml/transform/TransformerFactory.java \
javax/security/cert/CertificateNotYetValidException.java \
javax/security/cert/Certificate.java \
javax/security/cert/X509Certificate.java \
@@ -2448,151 +2304,6 @@ am__libgcj0_convenience_la_SOURCES_DIST = prims.cc jni.cc exception.cc \
org/ietf/jgss/GSSName.java org/ietf/jgss/GSSContext.java \
org/ietf/jgss/Oid.java org/ietf/jgss/GSSCredential.java \
org/ietf/jgss/ChannelBinding.java \
- gnu/xml/xpath/EqualityExpr.java \
- gnu/xml/xpath/NumberFunction.java \
- gnu/xml/xpath/StringLengthFunction.java \
- gnu/xml/xpath/NameFunction.java gnu/xml/xpath/SumFunction.java \
- gnu/xml/xpath/Pattern.java gnu/xml/xpath/StringFunction.java \
- gnu/xml/xpath/NegativeExpr.java gnu/xml/xpath/UnionExpr.java \
- gnu/xml/xpath/SubstringFunction.java gnu/xml/xpath/Expr.java \
- gnu/xml/xpath/XPathFactoryImpl.java \
- gnu/xml/xpath/NormalizeSpaceFunction.java \
- gnu/xml/xpath/Constant.java gnu/xml/xpath/Predicate.java \
- gnu/xml/xpath/Path.java gnu/xml/xpath/OrExpr.java \
- gnu/xml/xpath/LangFunction.java \
- gnu/xml/xpath/StartsWithFunction.java \
- gnu/xml/xpath/SubstringAfterFunction.java \
- gnu/xml/xpath/FloorFunction.java \
- gnu/xml/xpath/NotFunction.java gnu/xml/xpath/Root.java \
- gnu/xml/xpath/PositionFunction.java \
- gnu/xml/xpath/VariableReference.java \
- gnu/xml/xpath/DocumentOrderComparator.java \
- gnu/xml/xpath/LocalNameFunction.java \
- gnu/xml/xpath/NamespaceUriFunction.java \
- gnu/xml/xpath/TranslateFunction.java \
- gnu/xml/xpath/FalseFunction.java gnu/xml/xpath/AndExpr.java \
- gnu/xml/xpath/XPathParser.java \
- gnu/xml/xpath/NamespaceTest.java \
- gnu/xml/xpath/ConcatFunction.java gnu/xml/xpath/NameTest.java \
- gnu/xml/xpath/CountFunction.java gnu/xml/xpath/IdFunction.java \
- gnu/xml/xpath/LastFunction.java \
- gnu/xml/xpath/XPathTokenizer.java gnu/xml/xpath/Steps.java \
- gnu/xml/xpath/TrueFunction.java \
- gnu/xml/xpath/BooleanFunction.java \
- gnu/xml/xpath/ParenthesizedExpr.java \
- gnu/xml/xpath/XPathImpl.java gnu/xml/xpath/Selector.java \
- gnu/xml/xpath/RoundFunction.java \
- gnu/xml/xpath/SubstringBeforeFunction.java \
- gnu/xml/xpath/Function.java gnu/xml/xpath/CeilingFunction.java \
- gnu/xml/xpath/RelationalExpr.java \
- gnu/xml/xpath/FunctionCall.java \
- gnu/xml/xpath/NodeTypeTest.java \
- gnu/xml/xpath/ArithmeticExpr.java gnu/xml/xpath/Test.java \
- gnu/xml/xpath/ContainsFunction.java \
- gnu/xml/pipeline/EventFilter.java \
- gnu/xml/pipeline/NSFilter.java \
- gnu/xml/pipeline/XsltFilter.java \
- gnu/xml/pipeline/ValidationConsumer.java \
- gnu/xml/pipeline/PipelineFactory.java \
- gnu/xml/pipeline/TextConsumer.java \
- gnu/xml/pipeline/LinkFilter.java \
- gnu/xml/pipeline/TeeConsumer.java \
- gnu/xml/pipeline/DomConsumer.java \
- gnu/xml/pipeline/EventConsumer.java \
- gnu/xml/pipeline/WellFormednessFilter.java \
- gnu/xml/pipeline/XIncludeFilter.java \
- gnu/xml/pipeline/CallFilter.java \
- gnu/xml/aelfred2/XmlParser.java \
- gnu/xml/aelfred2/XmlReader.java \
- gnu/xml/aelfred2/JAXPFactory.java \
- gnu/xml/aelfred2/ContentHandler2.java \
- gnu/xml/aelfred2/SAXDriver.java gnu/xml/util/XCat.java \
- gnu/xml/util/DomParser.java gnu/xml/util/XMLWriter.java \
- gnu/xml/util/Resolver.java gnu/xml/util/DoParse.java \
- gnu/xml/util/XHTMLWriter.java \
- gnu/xml/util/SAXNullTransformerFactory.java \
- gnu/xml/dom/DomXPathNSResolver.java \
- gnu/xml/dom/ls/FilteredSAXEventSink.java \
- gnu/xml/dom/ls/DomLSException.java \
- gnu/xml/dom/ls/DomLSSerializer.java \
- gnu/xml/dom/ls/DomLSInput.java gnu/xml/dom/ls/DomLSOutput.java \
- gnu/xml/dom/ls/SAXEventSink.java \
- gnu/xml/dom/ls/DomLSParser.java \
- gnu/xml/dom/ls/ReaderInputStream.java \
- gnu/xml/dom/ls/WriterOutputStream.java \
- gnu/xml/dom/DomElement.java gnu/xml/dom/DomNsNode.java \
- gnu/xml/dom/DomAttr.java gnu/xml/dom/DTDAttributeTypeInfo.java \
- gnu/xml/dom/DomDocumentBuilder.java \
- gnu/xml/dom/DTDElementTypeInfo.java \
- gnu/xml/dom/DomDocument.java \
- gnu/xml/dom/DomXPathExpression.java \
- gnu/xml/dom/DomDocumentConfiguration.java \
- gnu/xml/dom/DomDocumentFragment.java \
- gnu/xml/dom/DomProcessingInstruction.java \
- gnu/xml/dom/Consumer.java gnu/xml/dom/DomComment.java \
- gnu/xml/dom/DomCharacterData.java gnu/xml/dom/DomExtern.java \
- gnu/xml/dom/DomEntityReference.java \
- gnu/xml/dom/DomNamedNodeMap.java \
- gnu/xml/dom/ImplementationList.java \
- gnu/xml/dom/ImplementationSource.java gnu/xml/dom/DomImpl.java \
- gnu/xml/dom/DomDoctype.java gnu/xml/dom/DomNode.java \
- gnu/xml/dom/DomXPathResult.java \
- gnu/xml/dom/DomDocumentBuilderFactory.java \
- gnu/xml/dom/DomText.java gnu/xml/dom/DomNSResolverContext.java \
- gnu/xml/dom/DomNodeIterator.java gnu/xml/dom/DomNotation.java \
- gnu/xml/dom/JAXPFactory.java gnu/xml/dom/DomIterator.java \
- gnu/xml/dom/DomEvent.java gnu/xml/dom/DomEntity.java \
- gnu/xml/dom/DomCDATASection.java \
- gnu/xml/dom/DomDOMException.java \
- gnu/xml/transform/GenerateIdFunction.java \
- gnu/xml/transform/FormatNumberFunction.java \
- gnu/xml/transform/ValueOfNode.java \
- gnu/xml/transform/ApplyImportsNode.java \
- gnu/xml/transform/WithParam.java \
- gnu/xml/transform/DocumentFunction.java \
- gnu/xml/transform/SAXSerializer.java \
- gnu/xml/transform/FunctionAvailableFunction.java \
- gnu/xml/transform/ElementAvailableFunction.java \
- gnu/xml/transform/IfNode.java \
- gnu/xml/transform/ApplyTemplatesNode.java \
- gnu/xml/transform/SortKey.java gnu/xml/transform/Key.java \
- gnu/xml/transform/ElementNode.java \
- gnu/xml/transform/CurrentFunction.java \
- gnu/xml/transform/XSLComparator.java \
- gnu/xml/transform/CallTemplateNode.java \
- gnu/xml/transform/TemplatesImpl.java \
- gnu/xml/transform/ChooseNode.java \
- gnu/xml/transform/NumberNode.java \
- gnu/xml/transform/CopyOfNode.java \
- gnu/xml/transform/ParameterNode.java \
- gnu/xml/transform/TransformerFactoryImpl.java \
- gnu/xml/transform/TextNode.java \
- gnu/xml/transform/CopyNode.java \
- gnu/xml/transform/SystemPropertyFunction.java \
- gnu/xml/transform/Stylesheet.java \
- gnu/xml/transform/ProcessingInstructionNode.java \
- gnu/xml/transform/UnparsedEntityUriFunction.java \
- gnu/xml/transform/URIResolverEntityResolver.java \
- gnu/xml/transform/ErrorListenerErrorHandler.java \
- gnu/xml/transform/Bindings.java \
- gnu/xml/transform/AttributeSet.java \
- gnu/xml/transform/Template.java \
- gnu/xml/transform/MessageNode.java \
- gnu/xml/transform/LiteralNode.java \
- gnu/xml/transform/StreamSerializer.java \
- gnu/xml/transform/XSLURIResolver.java \
- gnu/xml/transform/AttributeNode.java \
- gnu/xml/transform/CommentNode.java \
- gnu/xml/transform/ForEachNode.java \
- gnu/xml/transform/KeyFunction.java \
- gnu/xml/transform/TransformerImpl.java \
- gnu/xml/transform/WhenNode.java \
- gnu/xml/transform/NodeNumberNode.java \
- gnu/xml/transform/OtherwiseNode.java \
- gnu/xml/transform/AbstractNumberNode.java \
- gnu/xml/transform/TemplateNode.java \
- gnu/xml/transform/TransformerOutputProperties.java \
- gnu/xml/transform/DOMSourceLocator.java \
java/lang/ConcreteProcess.java \
gnu/classpath/Configuration.java boehm.cc nogc.cc \
sysdep/dwarf2-backtrace.cc posix.cc win32.cc darwin.cc \
@@ -2908,67 +2619,16 @@ am__objects_11 = gnu/awt/LightweightRedirector.lo \
gnu/java/awt/peer/GLightweightPeer.lo \
gnu/java/awt/peer/ClasspathFontPeer.lo \
gnu/java/awt/peer/ClasspathTextLayoutPeer.lo \
- gnu/java/beans/decoder/AbstractContext.lo \
- gnu/java/beans/decoder/AbstractCreatableObjectContext.lo \
- gnu/java/beans/decoder/AbstractElementHandler.lo \
- gnu/java/beans/decoder/AbstractObjectContext.lo \
- gnu/java/beans/decoder/ArrayContext.lo \
- gnu/java/beans/decoder/ArrayHandler.lo \
- gnu/java/beans/decoder/AssemblyException.lo \
- gnu/java/beans/decoder/BooleanHandler.lo \
- gnu/java/beans/decoder/ByteHandler.lo \
- gnu/java/beans/decoder/CharHandler.lo \
- gnu/java/beans/decoder/ClassHandler.lo \
- gnu/java/beans/decoder/ConstructorContext.lo \
- gnu/java/beans/decoder/Context.lo \
- gnu/java/beans/decoder/DecoderContext.lo \
- gnu/java/beans/decoder/DefaultExceptionListener.lo \
- gnu/java/beans/decoder/DoubleHandler.lo \
- gnu/java/beans/decoder/DummyContext.lo \
- gnu/java/beans/decoder/DummyHandler.lo \
- gnu/java/beans/decoder/ElementHandler.lo \
- gnu/java/beans/decoder/FloatHandler.lo \
- gnu/java/beans/decoder/GrowableArrayContext.lo \
- gnu/java/beans/decoder/IndexContext.lo \
- gnu/java/beans/decoder/IntHandler.lo \
- gnu/java/beans/decoder/JavaHandler.lo \
- gnu/java/beans/decoder/LongHandler.lo \
- gnu/java/beans/decoder/MethodContext.lo \
- gnu/java/beans/decoder/MethodFinder.lo \
- gnu/java/beans/decoder/NullHandler.lo \
- gnu/java/beans/decoder/ObjectContext.lo \
- gnu/java/beans/decoder/ObjectHandler.lo \
- gnu/java/beans/decoder/PersistenceParser.lo \
- gnu/java/beans/decoder/PropertyContext.lo \
- gnu/java/beans/decoder/ShortHandler.lo \
- gnu/java/beans/decoder/SimpleHandler.lo \
- gnu/java/beans/decoder/StaticMethodContext.lo \
- gnu/java/beans/decoder/StringHandler.lo \
- gnu/java/beans/decoder/VoidHandler.lo \
- gnu/java/beans/editors/ColorEditor.lo \
- gnu/java/beans/editors/FontEditor.lo \
- gnu/java/beans/editors/NativeBooleanEditor.lo \
- gnu/java/beans/editors/NativeByteEditor.lo \
- gnu/java/beans/editors/NativeDoubleEditor.lo \
- gnu/java/beans/editors/NativeFloatEditor.lo \
- gnu/java/beans/editors/NativeIntEditor.lo \
- gnu/java/beans/editors/NativeLongEditor.lo \
- gnu/java/beans/editors/NativeShortEditor.lo \
- gnu/java/beans/editors/StringEditor.lo \
- gnu/java/beans/BeanInfoEmbryo.lo \
- gnu/java/beans/DummyAppletContext.lo \
- gnu/java/beans/DummyAppletStub.lo \
- gnu/java/beans/ExplicitBeanInfo.lo \
- gnu/java/beans/IntrospectionIncubator.lo java/applet/Applet.lo \
- java/applet/AppletStub.lo java/applet/AppletContext.lo \
- java/applet/AudioClip.lo java/awt/AWTError.lo \
- java/awt/AWTEvent.lo java/awt/AWTEventMulticaster.lo \
- java/awt/AWTException.lo java/awt/AWTPermission.lo \
- java/awt/ActiveEvent.lo java/awt/Adjustable.lo \
- java/awt/BorderLayout.lo java/awt/Button.lo java/awt/Canvas.lo \
- java/awt/CardLayout.lo java/awt/Checkbox.lo \
- java/awt/CheckboxGroup.lo java/awt/CheckboxMenuItem.lo \
- java/awt/Choice.lo java/awt/Color.lo java/awt/Component.lo \
+ java/applet/Applet.lo java/applet/AppletStub.lo \
+ java/applet/AppletContext.lo java/applet/AudioClip.lo \
+ java/awt/AWTError.lo java/awt/AWTEvent.lo \
+ java/awt/AWTEventMulticaster.lo java/awt/AWTException.lo \
+ java/awt/AWTPermission.lo java/awt/ActiveEvent.lo \
+ java/awt/Adjustable.lo java/awt/BorderLayout.lo \
+ java/awt/Button.lo java/awt/Canvas.lo java/awt/CardLayout.lo \
+ java/awt/Checkbox.lo java/awt/CheckboxGroup.lo \
+ java/awt/CheckboxMenuItem.lo java/awt/Choice.lo \
+ java/awt/Color.lo java/awt/Component.lo \
java/awt/ComponentOrientation.lo java/awt/Container.lo \
java/awt/Cursor.lo java/awt/Dialog.lo java/awt/Dimension.lo \
java/awt/Event.lo java/awt/EventDispatchThread.lo \
@@ -3536,49 +3196,7 @@ am__objects_12 = gnu/gcj/convert/BytesToUnicode.lo \
gnu/gcj/convert/Output_UnicodeLittleUnmarked.lo \
gnu/gcj/convert/Output_UTF8.lo gnu/gcj/convert/Output_iconv.lo \
gnu/gcj/convert/UnicodeToBytes.lo
-am__objects_13 = javax/imageio/ImageWriteParam.lo \
- javax/imageio/ImageReader.lo javax/imageio/ImageWriter.lo \
- javax/imageio/IIOException.lo \
- javax/imageio/IIOParamController.lo \
- javax/imageio/ImageReadParam.lo javax/imageio/IIOParam.lo \
- javax/imageio/spi/IIORegistry.lo \
- javax/imageio/spi/ImageWriterSpi.lo \
- javax/imageio/spi/ImageOutputStreamSpi.lo \
- javax/imageio/spi/ServiceRegistry.lo \
- javax/imageio/spi/ImageTranscoderSpi.lo \
- javax/imageio/spi/ImageReaderSpi.lo \
- javax/imageio/spi/IIOServiceProvider.lo \
- javax/imageio/spi/ImageReaderWriterSpi.lo \
- javax/imageio/spi/ImageInputStreamSpi.lo \
- javax/imageio/spi/RegisterableService.lo \
- javax/imageio/metadata/IIOAttr.lo \
- javax/imageio/metadata/IIONamedNodeMap.lo \
- javax/imageio/metadata/IIONodeList.lo \
- javax/imageio/metadata/IIOMetadataFormatImpl.lo \
- javax/imageio/metadata/IIOInvalidTreeException.lo \
- javax/imageio/metadata/IIOMetadataFormat.lo \
- javax/imageio/metadata/IIOMetadataController.lo \
- javax/imageio/metadata/IIOMetadataNode.lo \
- javax/imageio/metadata/IIOMetadata.lo \
- javax/imageio/stream/FileImageOutputStream.lo \
- javax/imageio/stream/ImageInputStream.lo \
- javax/imageio/stream/IIOByteBuffer.lo \
- javax/imageio/stream/FileCacheImageInputStream.lo \
- javax/imageio/stream/ImageInputStreamImpl.lo \
- javax/imageio/stream/ImageOutputStreamImpl.lo \
- javax/imageio/stream/MemoryCacheImageInputStream.lo \
- javax/imageio/stream/FileCacheImageOutputStream.lo \
- javax/imageio/stream/ImageOutputStream.lo \
- javax/imageio/stream/MemoryCacheImageOutputStream.lo \
- javax/imageio/stream/FileImageInputStream.lo \
- javax/imageio/event/IIOReadProgressListener.lo \
- javax/imageio/event/IIOWriteWarningListener.lo \
- javax/imageio/event/IIOReadWarningListener.lo \
- javax/imageio/event/IIOReadUpdateListener.lo \
- javax/imageio/event/IIOWriteProgressListener.lo \
- javax/imageio/ImageTranscoder.lo \
- javax/imageio/ImageTypeSpecifier.lo javax/imageio/ImageIO.lo \
- javax/imageio/IIOImage.lo javax/net/VanillaSocketFactory.lo \
+am__objects_13 = javax/net/VanillaSocketFactory.lo \
javax/net/ssl/TrustManagerFactorySpi.lo \
javax/net/ssl/SSLKeyException.lo javax/net/ssl/TrustManager.lo \
javax/net/ssl/SSLServerSocket.lo \
@@ -3798,57 +3416,6 @@ am__objects_13 = javax/imageio/ImageWriteParam.lo \
javax/naming/Reference.lo javax/naming/NameParser.lo \
javax/naming/NameClassPair.lo javax/naming/RefAddr.lo \
javax/naming/CompositeName.lo javax/naming/Name.lo \
- javax/xml/xpath/XPathConstants.lo \
- javax/xml/xpath/XPathFunction.lo \
- javax/xml/xpath/XPathVariableResolver.lo \
- javax/xml/xpath/XPathExpressionException.lo \
- javax/xml/xpath/XPathFunctionResolver.lo \
- javax/xml/xpath/XPath.lo \
- javax/xml/xpath/XPathFactoryConfigurationException.lo \
- javax/xml/xpath/XPathFactory.lo \
- javax/xml/xpath/XPathException.lo \
- javax/xml/xpath/XPathExpression.lo \
- javax/xml/xpath/XPathFunctionException.lo \
- javax/xml/validation/ValidatorHandler.lo \
- javax/xml/validation/Validator.lo \
- javax/xml/validation/TypeInfoProvider.lo \
- javax/xml/validation/SchemaFactory.lo \
- javax/xml/validation/Schema.lo \
- javax/xml/parsers/SAXParserFactory.lo \
- javax/xml/parsers/FactoryConfigurationError.lo \
- javax/xml/parsers/SAXParser.lo \
- javax/xml/parsers/DocumentBuilderFactory.lo \
- javax/xml/parsers/ParserConfigurationException.lo \
- javax/xml/parsers/DocumentBuilder.lo \
- javax/xml/datatype/DatatypeFactory.lo \
- javax/xml/datatype/XMLGregorianCalendar.lo \
- javax/xml/datatype/Duration.lo \
- javax/xml/datatype/DatatypeConfigurationException.lo \
- javax/xml/datatype/DatatypeConstants.lo \
- javax/xml/XMLConstants.lo \
- javax/xml/namespace/NamespaceContext.lo \
- javax/xml/namespace/QName.lo \
- javax/xml/transform/TransformerException.lo \
- javax/xml/transform/TransformerFactoryConfigurationError.lo \
- javax/xml/transform/sax/SAXResult.lo \
- javax/xml/transform/sax/TransformerHandler.lo \
- javax/xml/transform/sax/SAXTransformerFactory.lo \
- javax/xml/transform/sax/SAXSource.lo \
- javax/xml/transform/sax/TemplatesHandler.lo \
- javax/xml/transform/OutputKeys.lo \
- javax/xml/transform/stream/StreamResult.lo \
- javax/xml/transform/stream/StreamSource.lo \
- javax/xml/transform/Source.lo \
- javax/xml/transform/SourceLocator.lo \
- javax/xml/transform/ErrorListener.lo \
- javax/xml/transform/TransformerConfigurationException.lo \
- javax/xml/transform/Templates.lo javax/xml/transform/Result.lo \
- javax/xml/transform/URIResolver.lo \
- javax/xml/transform/dom/DOMSource.lo \
- javax/xml/transform/dom/DOMLocator.lo \
- javax/xml/transform/dom/DOMResult.lo \
- javax/xml/transform/Transformer.lo \
- javax/xml/transform/TransformerFactory.lo \
javax/security/cert/CertificateNotYetValidException.lo \
javax/security/cert/Certificate.lo \
javax/security/cert/X509Certificate.lo \
@@ -3984,8 +3551,11 @@ am__objects_15 = $(am__objects_9) gnu/classpath/ServiceFactory.lo \
gnu/classpath/ServiceProviderLoadingAction.lo gnu/gcj/Core.lo \
gnu/gcj/RawData.lo gnu/gcj/RawDataManaged.lo \
gnu/gcj/io/DefaultMimeTypes.lo gnu/gcj/io/MimeTypes.lo \
- gnu/gcj/io/SimpleSHSStream.lo gnu/gcj/runtime/FileDeleter.lo \
+ gnu/gcj/io/SimpleSHSStream.lo \
+ gnu/gcj/runtime/BootClassLoader.lo \
+ gnu/gcj/runtime/FileDeleter.lo \
gnu/gcj/runtime/FinalizerThread.lo \
+ gnu/gcj/runtime/HelperClassLoader.lo \
gnu/gcj/runtime/JNIWeakRef.lo gnu/gcj/runtime/NameFinder.lo \
gnu/gcj/runtime/PersistentByteMap.lo \
gnu/gcj/runtime/SharedLibHelper.lo \
@@ -4592,155 +4162,25 @@ am__objects_15 = $(am__objects_9) gnu/classpath/ServiceFactory.lo \
$(am__objects_11) $(am__objects_12) $(am__objects_13) \
$(am__objects_14)
am__objects_16 = $(am__objects_8) $(am__objects_15)
-am__objects_17 = gnu/xml/xpath/EqualityExpr.lo \
- gnu/xml/xpath/NumberFunction.lo \
- gnu/xml/xpath/StringLengthFunction.lo \
- gnu/xml/xpath/NameFunction.lo gnu/xml/xpath/SumFunction.lo \
- gnu/xml/xpath/Pattern.lo gnu/xml/xpath/StringFunction.lo \
- gnu/xml/xpath/NegativeExpr.lo gnu/xml/xpath/UnionExpr.lo \
- gnu/xml/xpath/SubstringFunction.lo gnu/xml/xpath/Expr.lo \
- gnu/xml/xpath/XPathFactoryImpl.lo \
- gnu/xml/xpath/NormalizeSpaceFunction.lo \
- gnu/xml/xpath/Constant.lo gnu/xml/xpath/Predicate.lo \
- gnu/xml/xpath/Path.lo gnu/xml/xpath/OrExpr.lo \
- gnu/xml/xpath/LangFunction.lo \
- gnu/xml/xpath/StartsWithFunction.lo \
- gnu/xml/xpath/SubstringAfterFunction.lo \
- gnu/xml/xpath/FloorFunction.lo gnu/xml/xpath/NotFunction.lo \
- gnu/xml/xpath/Root.lo gnu/xml/xpath/PositionFunction.lo \
- gnu/xml/xpath/VariableReference.lo \
- gnu/xml/xpath/DocumentOrderComparator.lo \
- gnu/xml/xpath/LocalNameFunction.lo \
- gnu/xml/xpath/NamespaceUriFunction.lo \
- gnu/xml/xpath/TranslateFunction.lo \
- gnu/xml/xpath/FalseFunction.lo gnu/xml/xpath/AndExpr.lo \
- gnu/xml/xpath/XPathParser.lo gnu/xml/xpath/NamespaceTest.lo \
- gnu/xml/xpath/ConcatFunction.lo gnu/xml/xpath/NameTest.lo \
- gnu/xml/xpath/CountFunction.lo gnu/xml/xpath/IdFunction.lo \
- gnu/xml/xpath/LastFunction.lo gnu/xml/xpath/XPathTokenizer.lo \
- gnu/xml/xpath/Steps.lo gnu/xml/xpath/TrueFunction.lo \
- gnu/xml/xpath/BooleanFunction.lo \
- gnu/xml/xpath/ParenthesizedExpr.lo gnu/xml/xpath/XPathImpl.lo \
- gnu/xml/xpath/Selector.lo gnu/xml/xpath/RoundFunction.lo \
- gnu/xml/xpath/SubstringBeforeFunction.lo \
- gnu/xml/xpath/Function.lo gnu/xml/xpath/CeilingFunction.lo \
- gnu/xml/xpath/RelationalExpr.lo gnu/xml/xpath/FunctionCall.lo \
- gnu/xml/xpath/NodeTypeTest.lo gnu/xml/xpath/ArithmeticExpr.lo \
- gnu/xml/xpath/Test.lo gnu/xml/xpath/ContainsFunction.lo \
- gnu/xml/pipeline/EventFilter.lo gnu/xml/pipeline/NSFilter.lo \
- gnu/xml/pipeline/XsltFilter.lo \
- gnu/xml/pipeline/ValidationConsumer.lo \
- gnu/xml/pipeline/PipelineFactory.lo \
- gnu/xml/pipeline/TextConsumer.lo \
- gnu/xml/pipeline/LinkFilter.lo gnu/xml/pipeline/TeeConsumer.lo \
- gnu/xml/pipeline/DomConsumer.lo \
- gnu/xml/pipeline/EventConsumer.lo \
- gnu/xml/pipeline/WellFormednessFilter.lo \
- gnu/xml/pipeline/XIncludeFilter.lo \
- gnu/xml/pipeline/CallFilter.lo gnu/xml/aelfred2/XmlParser.lo \
- gnu/xml/aelfred2/XmlReader.lo gnu/xml/aelfred2/JAXPFactory.lo \
- gnu/xml/aelfred2/ContentHandler2.lo \
- gnu/xml/aelfred2/SAXDriver.lo gnu/xml/util/XCat.lo \
- gnu/xml/util/DomParser.lo gnu/xml/util/XMLWriter.lo \
- gnu/xml/util/Resolver.lo gnu/xml/util/DoParse.lo \
- gnu/xml/util/XHTMLWriter.lo \
- gnu/xml/util/SAXNullTransformerFactory.lo \
- gnu/xml/dom/DomXPathNSResolver.lo \
- gnu/xml/dom/ls/FilteredSAXEventSink.lo \
- gnu/xml/dom/ls/DomLSException.lo \
- gnu/xml/dom/ls/DomLSSerializer.lo gnu/xml/dom/ls/DomLSInput.lo \
- gnu/xml/dom/ls/DomLSOutput.lo gnu/xml/dom/ls/SAXEventSink.lo \
- gnu/xml/dom/ls/DomLSParser.lo \
- gnu/xml/dom/ls/ReaderInputStream.lo \
- gnu/xml/dom/ls/WriterOutputStream.lo gnu/xml/dom/DomElement.lo \
- gnu/xml/dom/DomNsNode.lo gnu/xml/dom/DomAttr.lo \
- gnu/xml/dom/DTDAttributeTypeInfo.lo \
- gnu/xml/dom/DomDocumentBuilder.lo \
- gnu/xml/dom/DTDElementTypeInfo.lo gnu/xml/dom/DomDocument.lo \
- gnu/xml/dom/DomXPathExpression.lo \
- gnu/xml/dom/DomDocumentConfiguration.lo \
- gnu/xml/dom/DomDocumentFragment.lo \
- gnu/xml/dom/DomProcessingInstruction.lo \
- gnu/xml/dom/Consumer.lo gnu/xml/dom/DomComment.lo \
- gnu/xml/dom/DomCharacterData.lo gnu/xml/dom/DomExtern.lo \
- gnu/xml/dom/DomEntityReference.lo \
- gnu/xml/dom/DomNamedNodeMap.lo \
- gnu/xml/dom/ImplementationList.lo \
- gnu/xml/dom/ImplementationSource.lo gnu/xml/dom/DomImpl.lo \
- gnu/xml/dom/DomDoctype.lo gnu/xml/dom/DomNode.lo \
- gnu/xml/dom/DomXPathResult.lo \
- gnu/xml/dom/DomDocumentBuilderFactory.lo \
- gnu/xml/dom/DomText.lo gnu/xml/dom/DomNSResolverContext.lo \
- gnu/xml/dom/DomNodeIterator.lo gnu/xml/dom/DomNotation.lo \
- gnu/xml/dom/JAXPFactory.lo gnu/xml/dom/DomIterator.lo \
- gnu/xml/dom/DomEvent.lo gnu/xml/dom/DomEntity.lo \
- gnu/xml/dom/DomCDATASection.lo gnu/xml/dom/DomDOMException.lo \
- gnu/xml/transform/GenerateIdFunction.lo \
- gnu/xml/transform/FormatNumberFunction.lo \
- gnu/xml/transform/ValueOfNode.lo \
- gnu/xml/transform/ApplyImportsNode.lo \
- gnu/xml/transform/WithParam.lo \
- gnu/xml/transform/DocumentFunction.lo \
- gnu/xml/transform/SAXSerializer.lo \
- gnu/xml/transform/FunctionAvailableFunction.lo \
- gnu/xml/transform/ElementAvailableFunction.lo \
- gnu/xml/transform/IfNode.lo \
- gnu/xml/transform/ApplyTemplatesNode.lo \
- gnu/xml/transform/SortKey.lo gnu/xml/transform/Key.lo \
- gnu/xml/transform/ElementNode.lo \
- gnu/xml/transform/CurrentFunction.lo \
- gnu/xml/transform/XSLComparator.lo \
- gnu/xml/transform/CallTemplateNode.lo \
- gnu/xml/transform/TemplatesImpl.lo \
- gnu/xml/transform/ChooseNode.lo \
- gnu/xml/transform/NumberNode.lo \
- gnu/xml/transform/CopyOfNode.lo \
- gnu/xml/transform/ParameterNode.lo \
- gnu/xml/transform/TransformerFactoryImpl.lo \
- gnu/xml/transform/TextNode.lo gnu/xml/transform/CopyNode.lo \
- gnu/xml/transform/SystemPropertyFunction.lo \
- gnu/xml/transform/Stylesheet.lo \
- gnu/xml/transform/ProcessingInstructionNode.lo \
- gnu/xml/transform/UnparsedEntityUriFunction.lo \
- gnu/xml/transform/URIResolverEntityResolver.lo \
- gnu/xml/transform/ErrorListenerErrorHandler.lo \
- gnu/xml/transform/Bindings.lo \
- gnu/xml/transform/AttributeSet.lo \
- gnu/xml/transform/Template.lo gnu/xml/transform/MessageNode.lo \
- gnu/xml/transform/LiteralNode.lo \
- gnu/xml/transform/StreamSerializer.lo \
- gnu/xml/transform/XSLURIResolver.lo \
- gnu/xml/transform/AttributeNode.lo \
- gnu/xml/transform/CommentNode.lo \
- gnu/xml/transform/ForEachNode.lo \
- gnu/xml/transform/KeyFunction.lo \
- gnu/xml/transform/TransformerImpl.lo \
- gnu/xml/transform/WhenNode.lo \
- gnu/xml/transform/NodeNumberNode.lo \
- gnu/xml/transform/OtherwiseNode.lo \
- gnu/xml/transform/AbstractNumberNode.lo \
- gnu/xml/transform/TemplateNode.lo \
- gnu/xml/transform/TransformerOutputProperties.lo \
- gnu/xml/transform/DOMSourceLocator.lo
-am__objects_18 = java/lang/ConcreteProcess.lo \
+am__objects_17 = java/lang/ConcreteProcess.lo \
gnu/classpath/Configuration.lo
-@USING_BOEHMGC_TRUE@am__objects_19 = boehm.lo
-@USING_NOGC_TRUE@am__objects_20 = nogc.lo
-@SUPPLY_BACKTRACE_TRUE@am__objects_21 = sysdep/dwarf2-backtrace.lo
-@USING_POSIX_PLATFORM_TRUE@am__objects_22 = posix.lo
-@USING_WIN32_PLATFORM_TRUE@am__objects_23 = win32.lo
-@USING_ECOS_PLATFORM_TRUE@am__objects_24 = posix.lo
-@USING_DARWIN_CRT_TRUE@am__objects_25 = darwin.lo
-@USING_POSIX_THREADS_TRUE@am__objects_26 = posix-threads.lo
-@USING_WIN32_THREADS_TRUE@am__objects_27 = win32-threads.lo
-@USING_NO_THREADS_TRUE@am__objects_28 = no-threads.lo
+@USING_BOEHMGC_TRUE@am__objects_18 = boehm.lo
+@USING_NOGC_TRUE@am__objects_19 = nogc.lo
+@SUPPLY_BACKTRACE_TRUE@am__objects_20 = sysdep/dwarf2-backtrace.lo
+@USING_POSIX_PLATFORM_TRUE@am__objects_21 = posix.lo
+@USING_WIN32_PLATFORM_TRUE@am__objects_22 = win32.lo
+@USING_ECOS_PLATFORM_TRUE@am__objects_23 = posix.lo
+@USING_DARWIN_CRT_TRUE@am__objects_24 = darwin.lo
+@USING_POSIX_THREADS_TRUE@am__objects_25 = posix-threads.lo
+@USING_WIN32_THREADS_TRUE@am__objects_26 = win32-threads.lo
+@USING_NO_THREADS_TRUE@am__objects_27 = no-threads.lo
am_libgcj0_convenience_la_OBJECTS = prims.lo jni.lo exception.lo \
stacktrace.lo link.lo defineclass.lo interpret.lo verify.lo \
$(am__objects_6) $(am__objects_7) $(am__objects_16) \
$(am__objects_17) $(am__objects_18) $(am__objects_19) \
$(am__objects_20) $(am__objects_21) $(am__objects_22) \
$(am__objects_23) $(am__objects_24) $(am__objects_25) \
- $(am__objects_26) $(am__objects_27) $(am__objects_28)
+ $(am__objects_26) $(am__objects_27)
libgcj0_convenience_la_OBJECTS = $(am_libgcj0_convenience_la_OBJECTS)
am_libgij_la_OBJECTS = gij.lo
libgij_la_OBJECTS = $(am_libgij_la_OBJECTS)
@@ -4750,7 +4190,8 @@ libjawt_la_OBJECTS = $(am_libjawt_la_OBJECTS)
@GTK_AWT_TRUE@am_libjawt_la_rpath = -rpath $(toolexeclibdir)
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
-am_gcj_dbtool_OBJECTS = gnu/gcj/tools/gcj_dbtool/Main.$(OBJEXT)
+am_gcj_dbtool_OBJECTS = gnu/gcj/tools/gcj_dbtool/Main.$(OBJEXT) \
+ gnu/gcj/tools/gcj_dbtool/natMain.$(OBJEXT)
gcj_dbtool_OBJECTS = $(am_gcj_dbtool_OBJECTS)
am__gen_from_JIS_SOURCES_DIST = gnu/gcj/convert/gen-from-JIS.c \
gnu/gcj/convert/make-trie.c
@@ -5106,6 +4547,7 @@ secdir = $(libdir)/security
propdir = $(libdir)
dbexecdir = $(libdir)/gcj-$(gcc_version)
db_name = classmap.db
+db_pathtail = gcj-@gcc_version@/$(db_name)
@NATIVE_TRUE@dbexec_DATA = $(db_name)
bin_SCRIPTS = addr2name.awk
GCJ_WITH_FLAGS = $(GCJ) --encoding=UTF-8 -Wno-deprecated
@@ -5128,7 +4570,10 @@ AM_CXXFLAGS = \
-DLIBDIR="\"$(libdir)\"" \
-DBOOT_CLASS_PATH="\"$(jardir)/$(jar_DATA)\"" \
-DJAVA_EXT_DIRS="\"$(jardir)/ext\"" \
- -DLIBGCJ_DEFAULT_DATABASE="\"$(dbexecdir)/$(db_name)\""
+ -DGCJ_ENDORSED_DIRS="\"$(jardir)/gcj-endorsed\"" \
+ -DLIBGCJ_DEFAULT_DATABASE="\"$(dbexecdir)/$(db_name)\"" \
+ -DLIBGCJ_DEFAULT_DATABASE_PATH_TAIL="\"$(db_pathtail)\"" \
+ -DTOOLEXECLIBDIR="\"$(toolexeclibdir)\""
AM_GCJFLAGS = \
@LIBGCJ_JAVAFLAGS@ \
@@ -5148,7 +4593,10 @@ AM_CPPFLAGS = -I$(top_srcdir) -Iinclude -I$(top_srcdir)/include \
BOOTCLASSPATH = $(here)'$(CLASSPATH_SEPARATOR)'$(srcdir)'$(CLASSPATH_SEPARATOR)'$(srcdir)/external/w3c_dom'$(CLASSPATH_SEPARATOR)'$(srcdir)/external/sax
libgij_la_SOURCES = gij.cc
libgij_la_DEPENDENCIES = libgcj.la libgcj.spec
-libgij_la_LIBADD = -L$(here)/.libs libgcj.la
+libgij_la_LIBADD = -L$(here)/.libs libgcj.la \
+ external/sax/libsax-gcj.la \
+ external/w3c_dom/libw3c-gcj.la
+
libgij_la_LDFLAGS = -rpath $(toolexeclibdir) \
-version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC)
@@ -5160,13 +4608,17 @@ libgij_la_LDFLAGS = -rpath $(toolexeclibdir) \
libgcj0_convenience_la_SOURCES = prims.cc jni.cc exception.cc stacktrace.cc \
link.cc defineclass.cc interpret.cc verify.cc \
$(nat_source_files) $(math_c_source_files) $(java_source_files) \
- $(gnu_xml_source_files) $(built_java_source_files) \
+ $(built_java_source_files) \
$(BOEHMGC_SRC) $(NOGC_SRC) \
$(BACKTRACE_SRC) \
$(POSIX_PLATFORM_SRC) $(WIN32_PLATFORM_SRC) $(ECOS_PLATFORM_SRC) \
$(DARWIN_CRT_SRC) \
$(POSIX_THREAD_SRC) $(WIN32_THREAD_SRC) $(NO_THREAD_SRC)
+libgcj0_convenience_la_LIBADD = \
+ gnu-xml.lo javax-imageio.lo \
+ javax-xml.lo gnu-java-beans.lo
+
noinst_LTLIBRARIES = libgcj0_convenience.la
libgcj_la_SOURCES =
nat_files = $(nat_source_files:.cc=.lo)
@@ -5179,8 +4631,6 @@ libgcj_la_LDFLAGS = -rpath $(toolexeclibdir) $(THREADLDFLAGS) $(THREADLIBS) \
-version-info `grep -v '^\#' $(srcdir)/libtool-version`
libgcj_la_LIBADD = \
- external/sax/libsax_convenience.la \
- external/w3c_dom/libw3c_convenience.la \
libgcj0_convenience.la \
$(LIBFFI) $(ZLIBS) $(GCLIBS) $(propertyo_files)
@@ -5335,7 +4785,10 @@ all_java_source_files = \
$(built_java_source_files) \
$(gtk_awt_peer_sources) \
$(xlib_java_source_files) \
- $(gnu_xml_source_files)
+ $(gnu_xml_source_files) \
+ $(javax_imageio_source_files) \
+ $(javax_xml_source_files) \
+ $(gnu_java_beans_source_files)
all_java_class_files = $(all_java_source_files:.java=.class)
all_property_files = $(property_files) \
@@ -5366,7 +4819,7 @@ inner_nat_headers = java/io/ObjectOutputStream$$PutField.h \
gnu/java/nio/PipeImpl$$SourceChannelImpl.h \
$(PLATFORM_INNER_NAT_HDRS)
-nat_headers = $(ordinary_nat_headers) $(inner_nat_headers)
+nat_headers = $(ordinary_nat_headers) $(inner_nat_headers) gnu/gcj/tools/gcj_dbtool/Main.h
nat_headers_install = $(ordinary_nat_headers)
xlib_nat_headers = $(xlib_java_source_files:.java=.h)
extra_headers = java/lang/Object.h java/lang/Class.h
@@ -5387,7 +4840,9 @@ jv_convert_LDFLAGS = --main=gnu.gcj.convert.Convert \
jv_convert_LINK = $(GCJLINK)
jv_convert_LDADD = -L$(here)/.libs libgcj.la
jv_convert_DEPENDENCIES = libgcj.la libgcj.spec
-gcj_dbtool_SOURCES = gnu/gcj/tools/gcj_dbtool/Main.java
+gcj_dbtool_SOURCES = gnu/gcj/tools/gcj_dbtool/Main.java \
+ gnu/gcj/tools/gcj_dbtool/natMain.cc
+
gcj_dbtool_LDFLAGS = --main=gnu.gcj.tools.gcj_dbtool.Main \
-rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS)
@@ -5437,40 +4892,7 @@ gnu/gcj/convert/Output_iconv.java \
gnu/gcj/convert/UnicodeToBytes.java
special_java_source_files = java/lang/Class.java java/lang/Object.java
-awt_java_source_files = \
-gnu/awt/LightweightRedirector.java \
-gnu/awt/j2d/AbstractGraphicsState.java \
-gnu/awt/j2d/DirectRasterGraphics.java \
-gnu/awt/j2d/Graphics2DImpl.java \
-gnu/awt/j2d/IntegerGraphicsState.java \
-gnu/awt/j2d/MappedRaster.java \
-gnu/java/awt/BitMaskExtent.java \
-gnu/java/awt/Buffers.java \
-gnu/java/awt/BitwiseXORComposite.java \
-gnu/java/awt/ComponentDataBlitOp.java \
-gnu/java/awt/ClasspathToolkit.java \
-gnu/java/awt/EmbeddedWindow.java \
-gnu/java/awt/EmbeddedWindowSupport.java \
-gnu/java/awt/EventModifier.java \
-gnu/java/awt/color/CieXyzConverter.java \
-gnu/java/awt/color/ClutProfileConverter.java \
-gnu/java/awt/color/ColorLookUpTable.java \
-gnu/java/awt/color/ColorSpaceConverter.java \
-gnu/java/awt/color/GrayProfileConverter.java \
-gnu/java/awt/color/GrayScaleConverter.java \
-gnu/java/awt/color/LinearRGBConverter.java \
-gnu/java/awt/color/ProfileHeader.java \
-gnu/java/awt/color/PyccConverter.java \
-gnu/java/awt/color/RgbProfileConverter.java \
-gnu/java/awt/color/SrgbConverter.java \
-gnu/java/awt/color/TagEntry.java \
-gnu/java/awt/color/ToneReproductionCurve.java \
-gnu/java/awt/image/ImageDecoder.java \
-gnu/java/awt/image/XBMDecoder.java \
-gnu/java/awt/peer/EmbeddedWindowPeer.java \
-gnu/java/awt/peer/GLightweightPeer.java \
-gnu/java/awt/peer/ClasspathFontPeer.java \
-gnu/java/awt/peer/ClasspathTextLayoutPeer.java \
+gnu_java_beans_source_files = \
gnu/java/beans/decoder/AbstractContext.java \
gnu/java/beans/decoder/AbstractCreatableObjectContext.java \
gnu/java/beans/decoder/AbstractElementHandler.java \
@@ -5522,7 +4944,42 @@ gnu/java/beans/BeanInfoEmbryo.java \
gnu/java/beans/DummyAppletContext.java \
gnu/java/beans/DummyAppletStub.java \
gnu/java/beans/ExplicitBeanInfo.java \
-gnu/java/beans/IntrospectionIncubator.java \
+gnu/java/beans/IntrospectionIncubator.java
+
+awt_java_source_files = \
+gnu/awt/LightweightRedirector.java \
+gnu/awt/j2d/AbstractGraphicsState.java \
+gnu/awt/j2d/DirectRasterGraphics.java \
+gnu/awt/j2d/Graphics2DImpl.java \
+gnu/awt/j2d/IntegerGraphicsState.java \
+gnu/awt/j2d/MappedRaster.java \
+gnu/java/awt/BitMaskExtent.java \
+gnu/java/awt/Buffers.java \
+gnu/java/awt/BitwiseXORComposite.java \
+gnu/java/awt/ComponentDataBlitOp.java \
+gnu/java/awt/ClasspathToolkit.java \
+gnu/java/awt/EmbeddedWindow.java \
+gnu/java/awt/EmbeddedWindowSupport.java \
+gnu/java/awt/EventModifier.java \
+gnu/java/awt/color/CieXyzConverter.java \
+gnu/java/awt/color/ClutProfileConverter.java \
+gnu/java/awt/color/ColorLookUpTable.java \
+gnu/java/awt/color/ColorSpaceConverter.java \
+gnu/java/awt/color/GrayProfileConverter.java \
+gnu/java/awt/color/GrayScaleConverter.java \
+gnu/java/awt/color/LinearRGBConverter.java \
+gnu/java/awt/color/ProfileHeader.java \
+gnu/java/awt/color/PyccConverter.java \
+gnu/java/awt/color/RgbProfileConverter.java \
+gnu/java/awt/color/SrgbConverter.java \
+gnu/java/awt/color/TagEntry.java \
+gnu/java/awt/color/ToneReproductionCurve.java \
+gnu/java/awt/image/ImageDecoder.java \
+gnu/java/awt/image/XBMDecoder.java \
+gnu/java/awt/peer/EmbeddedWindowPeer.java \
+gnu/java/awt/peer/GLightweightPeer.java \
+gnu/java/awt/peer/ClasspathFontPeer.java \
+gnu/java/awt/peer/ClasspathTextLayoutPeer.java \
java/applet/Applet.java \
java/applet/AppletStub.java \
java/applet/AppletContext.java \
@@ -6365,7 +5822,7 @@ gnu/java/rmi/server/UnicastRemoteStub.java \
gnu/java/rmi/server/UnicastServer.java \
gnu/java/rmi/server/UnicastServerRef.java
-javax_source_files = \
+javax_imageio_source_files = \
javax/imageio/ImageWriteParam.java \
javax/imageio/ImageReader.java \
javax/imageio/ImageWriter.java \
@@ -6411,7 +5868,63 @@ javax/imageio/event/IIOWriteProgressListener.java \
javax/imageio/ImageTranscoder.java \
javax/imageio/ImageTypeSpecifier.java \
javax/imageio/ImageIO.java \
-javax/imageio/IIOImage.java \
+javax/imageio/IIOImage.java
+
+javax_xml_source_files = \
+javax/xml/xpath/XPathConstants.java \
+javax/xml/xpath/XPathFunction.java \
+javax/xml/xpath/XPathVariableResolver.java \
+javax/xml/xpath/XPathExpressionException.java \
+javax/xml/xpath/XPathFunctionResolver.java \
+javax/xml/xpath/XPath.java \
+javax/xml/xpath/XPathFactoryConfigurationException.java \
+javax/xml/xpath/XPathFactory.java \
+javax/xml/xpath/XPathException.java \
+javax/xml/xpath/XPathExpression.java \
+javax/xml/xpath/XPathFunctionException.java \
+javax/xml/validation/ValidatorHandler.java \
+javax/xml/validation/Validator.java \
+javax/xml/validation/TypeInfoProvider.java \
+javax/xml/validation/SchemaFactory.java \
+javax/xml/validation/Schema.java \
+javax/xml/parsers/SAXParserFactory.java \
+javax/xml/parsers/FactoryConfigurationError.java \
+javax/xml/parsers/SAXParser.java \
+javax/xml/parsers/DocumentBuilderFactory.java \
+javax/xml/parsers/ParserConfigurationException.java \
+javax/xml/parsers/DocumentBuilder.java \
+javax/xml/datatype/DatatypeFactory.java \
+javax/xml/datatype/XMLGregorianCalendar.java \
+javax/xml/datatype/Duration.java \
+javax/xml/datatype/DatatypeConfigurationException.java \
+javax/xml/datatype/DatatypeConstants.java \
+javax/xml/XMLConstants.java \
+javax/xml/namespace/NamespaceContext.java \
+javax/xml/namespace/QName.java \
+javax/xml/transform/TransformerException.java \
+javax/xml/transform/TransformerFactoryConfigurationError.java \
+javax/xml/transform/sax/SAXResult.java \
+javax/xml/transform/sax/TransformerHandler.java \
+javax/xml/transform/sax/SAXTransformerFactory.java \
+javax/xml/transform/sax/SAXSource.java \
+javax/xml/transform/sax/TemplatesHandler.java \
+javax/xml/transform/OutputKeys.java \
+javax/xml/transform/stream/StreamResult.java \
+javax/xml/transform/stream/StreamSource.java \
+javax/xml/transform/Source.java \
+javax/xml/transform/SourceLocator.java \
+javax/xml/transform/ErrorListener.java \
+javax/xml/transform/TransformerConfigurationException.java \
+javax/xml/transform/Templates.java \
+javax/xml/transform/Result.java \
+javax/xml/transform/URIResolver.java \
+javax/xml/transform/dom/DOMSource.java \
+javax/xml/transform/dom/DOMLocator.java \
+javax/xml/transform/dom/DOMResult.java \
+javax/xml/transform/Transformer.java \
+javax/xml/transform/TransformerFactory.java
+
+javax_source_files = \
javax/net/VanillaSocketFactory.java \
javax/net/ssl/TrustManagerFactorySpi.java \
javax/net/ssl/SSLKeyException.java \
@@ -6650,58 +6163,6 @@ javax/naming/NameClassPair.java \
javax/naming/RefAddr.java \
javax/naming/CompositeName.java \
javax/naming/Name.java \
-javax/xml/xpath/XPathConstants.java \
-javax/xml/xpath/XPathFunction.java \
-javax/xml/xpath/XPathVariableResolver.java \
-javax/xml/xpath/XPathExpressionException.java \
-javax/xml/xpath/XPathFunctionResolver.java \
-javax/xml/xpath/XPath.java \
-javax/xml/xpath/XPathFactoryConfigurationException.java \
-javax/xml/xpath/XPathFactory.java \
-javax/xml/xpath/XPathException.java \
-javax/xml/xpath/XPathExpression.java \
-javax/xml/xpath/XPathFunctionException.java \
-javax/xml/validation/ValidatorHandler.java \
-javax/xml/validation/Validator.java \
-javax/xml/validation/TypeInfoProvider.java \
-javax/xml/validation/SchemaFactory.java \
-javax/xml/validation/Schema.java \
-javax/xml/parsers/SAXParserFactory.java \
-javax/xml/parsers/FactoryConfigurationError.java \
-javax/xml/parsers/SAXParser.java \
-javax/xml/parsers/DocumentBuilderFactory.java \
-javax/xml/parsers/ParserConfigurationException.java \
-javax/xml/parsers/DocumentBuilder.java \
-javax/xml/datatype/DatatypeFactory.java \
-javax/xml/datatype/XMLGregorianCalendar.java \
-javax/xml/datatype/Duration.java \
-javax/xml/datatype/DatatypeConfigurationException.java \
-javax/xml/datatype/DatatypeConstants.java \
-javax/xml/XMLConstants.java \
-javax/xml/namespace/NamespaceContext.java \
-javax/xml/namespace/QName.java \
-javax/xml/transform/TransformerException.java \
-javax/xml/transform/TransformerFactoryConfigurationError.java \
-javax/xml/transform/sax/SAXResult.java \
-javax/xml/transform/sax/TransformerHandler.java \
-javax/xml/transform/sax/SAXTransformerFactory.java \
-javax/xml/transform/sax/SAXSource.java \
-javax/xml/transform/sax/TemplatesHandler.java \
-javax/xml/transform/OutputKeys.java \
-javax/xml/transform/stream/StreamResult.java \
-javax/xml/transform/stream/StreamSource.java \
-javax/xml/transform/Source.java \
-javax/xml/transform/SourceLocator.java \
-javax/xml/transform/ErrorListener.java \
-javax/xml/transform/TransformerConfigurationException.java \
-javax/xml/transform/Templates.java \
-javax/xml/transform/Result.java \
-javax/xml/transform/URIResolver.java \
-javax/xml/transform/dom/DOMSource.java \
-javax/xml/transform/dom/DOMLocator.java \
-javax/xml/transform/dom/DOMResult.java \
-javax/xml/transform/Transformer.java \
-javax/xml/transform/TransformerFactory.java \
javax/security/cert/CertificateNotYetValidException.java \
javax/security/cert/Certificate.java \
javax/security/cert/X509Certificate.java \
@@ -7291,8 +6752,10 @@ gnu/gcj/RawDataManaged.java \
gnu/gcj/io/DefaultMimeTypes.java \
gnu/gcj/io/MimeTypes.java \
gnu/gcj/io/SimpleSHSStream.java \
+gnu/gcj/runtime/BootClassLoader.java \
gnu/gcj/runtime/FileDeleter.java \
gnu/gcj/runtime/FinalizerThread.java \
+gnu/gcj/runtime/HelperClassLoader.java \
gnu/gcj/runtime/JNIWeakRef.java \
gnu/gcj/runtime/NameFinder.java \
gnu/gcj/runtime/PersistentByteMap.java \
@@ -9580,10 +9043,14 @@ gnu/gcj/io/MimeTypes.lo: gnu/gcj/io/$(am__dirstamp) \
gnu/gcj/io/$(DEPDIR)/$(am__dirstamp)
gnu/gcj/io/SimpleSHSStream.lo: gnu/gcj/io/$(am__dirstamp) \
gnu/gcj/io/$(DEPDIR)/$(am__dirstamp)
+gnu/gcj/runtime/BootClassLoader.lo: gnu/gcj/runtime/$(am__dirstamp) \
+ gnu/gcj/runtime/$(DEPDIR)/$(am__dirstamp)
gnu/gcj/runtime/FileDeleter.lo: gnu/gcj/runtime/$(am__dirstamp) \
gnu/gcj/runtime/$(DEPDIR)/$(am__dirstamp)
gnu/gcj/runtime/FinalizerThread.lo: gnu/gcj/runtime/$(am__dirstamp) \
gnu/gcj/runtime/$(DEPDIR)/$(am__dirstamp)
+gnu/gcj/runtime/HelperClassLoader.lo: gnu/gcj/runtime/$(am__dirstamp) \
+ gnu/gcj/runtime/$(DEPDIR)/$(am__dirstamp)
gnu/gcj/runtime/JNIWeakRef.lo: gnu/gcj/runtime/$(am__dirstamp) \
gnu/gcj/runtime/$(DEPDIR)/$(am__dirstamp)
gnu/gcj/runtime/NameFinder.lo: gnu/gcj/runtime/$(am__dirstamp) \
@@ -12045,176 +11512,6 @@ gnu/java/awt/peer/ClasspathFontPeer.lo: \
gnu/java/awt/peer/ClasspathTextLayoutPeer.lo: \
gnu/java/awt/peer/$(am__dirstamp) \
gnu/java/awt/peer/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/decoder/$(am__dirstamp):
- @$(mkdir_p) gnu/java/beans/decoder
- @: > gnu/java/beans/decoder/$(am__dirstamp)
-gnu/java/beans/decoder/$(DEPDIR)/$(am__dirstamp):
- @$(mkdir_p) gnu/java/beans/decoder/$(DEPDIR)
- @: > gnu/java/beans/decoder/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/decoder/AbstractContext.lo: \
- gnu/java/beans/decoder/$(am__dirstamp) \
- gnu/java/beans/decoder/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/decoder/AbstractCreatableObjectContext.lo: \
- gnu/java/beans/decoder/$(am__dirstamp) \
- gnu/java/beans/decoder/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/decoder/AbstractElementHandler.lo: \
- gnu/java/beans/decoder/$(am__dirstamp) \
- gnu/java/beans/decoder/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/decoder/AbstractObjectContext.lo: \
- gnu/java/beans/decoder/$(am__dirstamp) \
- gnu/java/beans/decoder/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/decoder/ArrayContext.lo: \
- gnu/java/beans/decoder/$(am__dirstamp) \
- gnu/java/beans/decoder/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/decoder/ArrayHandler.lo: \
- gnu/java/beans/decoder/$(am__dirstamp) \
- gnu/java/beans/decoder/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/decoder/AssemblyException.lo: \
- gnu/java/beans/decoder/$(am__dirstamp) \
- gnu/java/beans/decoder/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/decoder/BooleanHandler.lo: \
- gnu/java/beans/decoder/$(am__dirstamp) \
- gnu/java/beans/decoder/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/decoder/ByteHandler.lo: \
- gnu/java/beans/decoder/$(am__dirstamp) \
- gnu/java/beans/decoder/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/decoder/CharHandler.lo: \
- gnu/java/beans/decoder/$(am__dirstamp) \
- gnu/java/beans/decoder/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/decoder/ClassHandler.lo: \
- gnu/java/beans/decoder/$(am__dirstamp) \
- gnu/java/beans/decoder/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/decoder/ConstructorContext.lo: \
- gnu/java/beans/decoder/$(am__dirstamp) \
- gnu/java/beans/decoder/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/decoder/Context.lo: \
- gnu/java/beans/decoder/$(am__dirstamp) \
- gnu/java/beans/decoder/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/decoder/DecoderContext.lo: \
- gnu/java/beans/decoder/$(am__dirstamp) \
- gnu/java/beans/decoder/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/decoder/DefaultExceptionListener.lo: \
- gnu/java/beans/decoder/$(am__dirstamp) \
- gnu/java/beans/decoder/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/decoder/DoubleHandler.lo: \
- gnu/java/beans/decoder/$(am__dirstamp) \
- gnu/java/beans/decoder/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/decoder/DummyContext.lo: \
- gnu/java/beans/decoder/$(am__dirstamp) \
- gnu/java/beans/decoder/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/decoder/DummyHandler.lo: \
- gnu/java/beans/decoder/$(am__dirstamp) \
- gnu/java/beans/decoder/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/decoder/ElementHandler.lo: \
- gnu/java/beans/decoder/$(am__dirstamp) \
- gnu/java/beans/decoder/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/decoder/FloatHandler.lo: \
- gnu/java/beans/decoder/$(am__dirstamp) \
- gnu/java/beans/decoder/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/decoder/GrowableArrayContext.lo: \
- gnu/java/beans/decoder/$(am__dirstamp) \
- gnu/java/beans/decoder/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/decoder/IndexContext.lo: \
- gnu/java/beans/decoder/$(am__dirstamp) \
- gnu/java/beans/decoder/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/decoder/IntHandler.lo: \
- gnu/java/beans/decoder/$(am__dirstamp) \
- gnu/java/beans/decoder/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/decoder/JavaHandler.lo: \
- gnu/java/beans/decoder/$(am__dirstamp) \
- gnu/java/beans/decoder/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/decoder/LongHandler.lo: \
- gnu/java/beans/decoder/$(am__dirstamp) \
- gnu/java/beans/decoder/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/decoder/MethodContext.lo: \
- gnu/java/beans/decoder/$(am__dirstamp) \
- gnu/java/beans/decoder/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/decoder/MethodFinder.lo: \
- gnu/java/beans/decoder/$(am__dirstamp) \
- gnu/java/beans/decoder/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/decoder/NullHandler.lo: \
- gnu/java/beans/decoder/$(am__dirstamp) \
- gnu/java/beans/decoder/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/decoder/ObjectContext.lo: \
- gnu/java/beans/decoder/$(am__dirstamp) \
- gnu/java/beans/decoder/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/decoder/ObjectHandler.lo: \
- gnu/java/beans/decoder/$(am__dirstamp) \
- gnu/java/beans/decoder/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/decoder/PersistenceParser.lo: \
- gnu/java/beans/decoder/$(am__dirstamp) \
- gnu/java/beans/decoder/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/decoder/PropertyContext.lo: \
- gnu/java/beans/decoder/$(am__dirstamp) \
- gnu/java/beans/decoder/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/decoder/ShortHandler.lo: \
- gnu/java/beans/decoder/$(am__dirstamp) \
- gnu/java/beans/decoder/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/decoder/SimpleHandler.lo: \
- gnu/java/beans/decoder/$(am__dirstamp) \
- gnu/java/beans/decoder/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/decoder/StaticMethodContext.lo: \
- gnu/java/beans/decoder/$(am__dirstamp) \
- gnu/java/beans/decoder/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/decoder/StringHandler.lo: \
- gnu/java/beans/decoder/$(am__dirstamp) \
- gnu/java/beans/decoder/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/decoder/VoidHandler.lo: \
- gnu/java/beans/decoder/$(am__dirstamp) \
- gnu/java/beans/decoder/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/editors/$(am__dirstamp):
- @$(mkdir_p) gnu/java/beans/editors
- @: > gnu/java/beans/editors/$(am__dirstamp)
-gnu/java/beans/editors/$(DEPDIR)/$(am__dirstamp):
- @$(mkdir_p) gnu/java/beans/editors/$(DEPDIR)
- @: > gnu/java/beans/editors/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/editors/ColorEditor.lo: \
- gnu/java/beans/editors/$(am__dirstamp) \
- gnu/java/beans/editors/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/editors/FontEditor.lo: \
- gnu/java/beans/editors/$(am__dirstamp) \
- gnu/java/beans/editors/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/editors/NativeBooleanEditor.lo: \
- gnu/java/beans/editors/$(am__dirstamp) \
- gnu/java/beans/editors/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/editors/NativeByteEditor.lo: \
- gnu/java/beans/editors/$(am__dirstamp) \
- gnu/java/beans/editors/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/editors/NativeDoubleEditor.lo: \
- gnu/java/beans/editors/$(am__dirstamp) \
- gnu/java/beans/editors/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/editors/NativeFloatEditor.lo: \
- gnu/java/beans/editors/$(am__dirstamp) \
- gnu/java/beans/editors/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/editors/NativeIntEditor.lo: \
- gnu/java/beans/editors/$(am__dirstamp) \
- gnu/java/beans/editors/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/editors/NativeLongEditor.lo: \
- gnu/java/beans/editors/$(am__dirstamp) \
- gnu/java/beans/editors/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/editors/NativeShortEditor.lo: \
- gnu/java/beans/editors/$(am__dirstamp) \
- gnu/java/beans/editors/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/editors/StringEditor.lo: \
- gnu/java/beans/editors/$(am__dirstamp) \
- gnu/java/beans/editors/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/$(am__dirstamp):
- @$(mkdir_p) gnu/java/beans
- @: > gnu/java/beans/$(am__dirstamp)
-gnu/java/beans/$(DEPDIR)/$(am__dirstamp):
- @$(mkdir_p) gnu/java/beans/$(DEPDIR)
- @: > gnu/java/beans/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/BeanInfoEmbryo.lo: gnu/java/beans/$(am__dirstamp) \
- gnu/java/beans/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/DummyAppletContext.lo: gnu/java/beans/$(am__dirstamp) \
- gnu/java/beans/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/DummyAppletStub.lo: gnu/java/beans/$(am__dirstamp) \
- gnu/java/beans/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/ExplicitBeanInfo.lo: gnu/java/beans/$(am__dirstamp) \
- gnu/java/beans/$(DEPDIR)/$(am__dirstamp)
-gnu/java/beans/IntrospectionIncubator.lo: \
- gnu/java/beans/$(am__dirstamp) \
- gnu/java/beans/$(DEPDIR)/$(am__dirstamp)
java/applet/$(am__dirstamp):
@$(mkdir_p) java/applet
@: > java/applet/$(am__dirstamp)
@@ -14141,162 +13438,6 @@ gnu/gcj/convert/Output_iconv.lo: gnu/gcj/convert/$(am__dirstamp) \
gnu/gcj/convert/$(DEPDIR)/$(am__dirstamp)
gnu/gcj/convert/UnicodeToBytes.lo: gnu/gcj/convert/$(am__dirstamp) \
gnu/gcj/convert/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/$(am__dirstamp):
- @$(mkdir_p) javax/imageio
- @: > javax/imageio/$(am__dirstamp)
-javax/imageio/$(DEPDIR)/$(am__dirstamp):
- @$(mkdir_p) javax/imageio/$(DEPDIR)
- @: > javax/imageio/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/ImageWriteParam.lo: javax/imageio/$(am__dirstamp) \
- javax/imageio/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/ImageReader.lo: javax/imageio/$(am__dirstamp) \
- javax/imageio/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/ImageWriter.lo: javax/imageio/$(am__dirstamp) \
- javax/imageio/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/IIOException.lo: javax/imageio/$(am__dirstamp) \
- javax/imageio/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/IIOParamController.lo: javax/imageio/$(am__dirstamp) \
- javax/imageio/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/ImageReadParam.lo: javax/imageio/$(am__dirstamp) \
- javax/imageio/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/IIOParam.lo: javax/imageio/$(am__dirstamp) \
- javax/imageio/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/spi/$(am__dirstamp):
- @$(mkdir_p) javax/imageio/spi
- @: > javax/imageio/spi/$(am__dirstamp)
-javax/imageio/spi/$(DEPDIR)/$(am__dirstamp):
- @$(mkdir_p) javax/imageio/spi/$(DEPDIR)
- @: > javax/imageio/spi/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/spi/IIORegistry.lo: javax/imageio/spi/$(am__dirstamp) \
- javax/imageio/spi/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/spi/ImageWriterSpi.lo: \
- javax/imageio/spi/$(am__dirstamp) \
- javax/imageio/spi/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/spi/ImageOutputStreamSpi.lo: \
- javax/imageio/spi/$(am__dirstamp) \
- javax/imageio/spi/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/spi/ServiceRegistry.lo: \
- javax/imageio/spi/$(am__dirstamp) \
- javax/imageio/spi/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/spi/ImageTranscoderSpi.lo: \
- javax/imageio/spi/$(am__dirstamp) \
- javax/imageio/spi/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/spi/ImageReaderSpi.lo: \
- javax/imageio/spi/$(am__dirstamp) \
- javax/imageio/spi/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/spi/IIOServiceProvider.lo: \
- javax/imageio/spi/$(am__dirstamp) \
- javax/imageio/spi/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/spi/ImageReaderWriterSpi.lo: \
- javax/imageio/spi/$(am__dirstamp) \
- javax/imageio/spi/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/spi/ImageInputStreamSpi.lo: \
- javax/imageio/spi/$(am__dirstamp) \
- javax/imageio/spi/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/spi/RegisterableService.lo: \
- javax/imageio/spi/$(am__dirstamp) \
- javax/imageio/spi/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/metadata/$(am__dirstamp):
- @$(mkdir_p) javax/imageio/metadata
- @: > javax/imageio/metadata/$(am__dirstamp)
-javax/imageio/metadata/$(DEPDIR)/$(am__dirstamp):
- @$(mkdir_p) javax/imageio/metadata/$(DEPDIR)
- @: > javax/imageio/metadata/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/metadata/IIOAttr.lo: \
- javax/imageio/metadata/$(am__dirstamp) \
- javax/imageio/metadata/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/metadata/IIONamedNodeMap.lo: \
- javax/imageio/metadata/$(am__dirstamp) \
- javax/imageio/metadata/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/metadata/IIONodeList.lo: \
- javax/imageio/metadata/$(am__dirstamp) \
- javax/imageio/metadata/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/metadata/IIOMetadataFormatImpl.lo: \
- javax/imageio/metadata/$(am__dirstamp) \
- javax/imageio/metadata/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/metadata/IIOInvalidTreeException.lo: \
- javax/imageio/metadata/$(am__dirstamp) \
- javax/imageio/metadata/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/metadata/IIOMetadataFormat.lo: \
- javax/imageio/metadata/$(am__dirstamp) \
- javax/imageio/metadata/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/metadata/IIOMetadataController.lo: \
- javax/imageio/metadata/$(am__dirstamp) \
- javax/imageio/metadata/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/metadata/IIOMetadataNode.lo: \
- javax/imageio/metadata/$(am__dirstamp) \
- javax/imageio/metadata/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/metadata/IIOMetadata.lo: \
- javax/imageio/metadata/$(am__dirstamp) \
- javax/imageio/metadata/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/stream/$(am__dirstamp):
- @$(mkdir_p) javax/imageio/stream
- @: > javax/imageio/stream/$(am__dirstamp)
-javax/imageio/stream/$(DEPDIR)/$(am__dirstamp):
- @$(mkdir_p) javax/imageio/stream/$(DEPDIR)
- @: > javax/imageio/stream/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/stream/FileImageOutputStream.lo: \
- javax/imageio/stream/$(am__dirstamp) \
- javax/imageio/stream/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/stream/ImageInputStream.lo: \
- javax/imageio/stream/$(am__dirstamp) \
- javax/imageio/stream/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/stream/IIOByteBuffer.lo: \
- javax/imageio/stream/$(am__dirstamp) \
- javax/imageio/stream/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/stream/FileCacheImageInputStream.lo: \
- javax/imageio/stream/$(am__dirstamp) \
- javax/imageio/stream/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/stream/ImageInputStreamImpl.lo: \
- javax/imageio/stream/$(am__dirstamp) \
- javax/imageio/stream/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/stream/ImageOutputStreamImpl.lo: \
- javax/imageio/stream/$(am__dirstamp) \
- javax/imageio/stream/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/stream/MemoryCacheImageInputStream.lo: \
- javax/imageio/stream/$(am__dirstamp) \
- javax/imageio/stream/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/stream/FileCacheImageOutputStream.lo: \
- javax/imageio/stream/$(am__dirstamp) \
- javax/imageio/stream/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/stream/ImageOutputStream.lo: \
- javax/imageio/stream/$(am__dirstamp) \
- javax/imageio/stream/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/stream/MemoryCacheImageOutputStream.lo: \
- javax/imageio/stream/$(am__dirstamp) \
- javax/imageio/stream/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/stream/FileImageInputStream.lo: \
- javax/imageio/stream/$(am__dirstamp) \
- javax/imageio/stream/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/event/$(am__dirstamp):
- @$(mkdir_p) javax/imageio/event
- @: > javax/imageio/event/$(am__dirstamp)
-javax/imageio/event/$(DEPDIR)/$(am__dirstamp):
- @$(mkdir_p) javax/imageio/event/$(DEPDIR)
- @: > javax/imageio/event/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/event/IIOReadProgressListener.lo: \
- javax/imageio/event/$(am__dirstamp) \
- javax/imageio/event/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/event/IIOWriteWarningListener.lo: \
- javax/imageio/event/$(am__dirstamp) \
- javax/imageio/event/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/event/IIOReadWarningListener.lo: \
- javax/imageio/event/$(am__dirstamp) \
- javax/imageio/event/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/event/IIOReadUpdateListener.lo: \
- javax/imageio/event/$(am__dirstamp) \
- javax/imageio/event/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/event/IIOWriteProgressListener.lo: \
- javax/imageio/event/$(am__dirstamp) \
- javax/imageio/event/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/ImageTranscoder.lo: javax/imageio/$(am__dirstamp) \
- javax/imageio/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/ImageTypeSpecifier.lo: javax/imageio/$(am__dirstamp) \
- javax/imageio/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/ImageIO.lo: javax/imageio/$(am__dirstamp) \
- javax/imageio/$(DEPDIR)/$(am__dirstamp)
-javax/imageio/IIOImage.lo: javax/imageio/$(am__dirstamp) \
- javax/imageio/$(DEPDIR)/$(am__dirstamp)
javax/net/$(am__dirstamp):
@$(mkdir_p) javax/net
@: > javax/net/$(am__dirstamp)
@@ -14994,208 +14135,6 @@ javax/naming/CompositeName.lo: javax/naming/$(am__dirstamp) \
javax/naming/$(DEPDIR)/$(am__dirstamp)
javax/naming/Name.lo: javax/naming/$(am__dirstamp) \
javax/naming/$(DEPDIR)/$(am__dirstamp)
-javax/xml/xpath/$(am__dirstamp):
- @$(mkdir_p) javax/xml/xpath
- @: > javax/xml/xpath/$(am__dirstamp)
-javax/xml/xpath/$(DEPDIR)/$(am__dirstamp):
- @$(mkdir_p) javax/xml/xpath/$(DEPDIR)
- @: > javax/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-javax/xml/xpath/XPathConstants.lo: javax/xml/xpath/$(am__dirstamp) \
- javax/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-javax/xml/xpath/XPathFunction.lo: javax/xml/xpath/$(am__dirstamp) \
- javax/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-javax/xml/xpath/XPathVariableResolver.lo: \
- javax/xml/xpath/$(am__dirstamp) \
- javax/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-javax/xml/xpath/XPathExpressionException.lo: \
- javax/xml/xpath/$(am__dirstamp) \
- javax/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-javax/xml/xpath/XPathFunctionResolver.lo: \
- javax/xml/xpath/$(am__dirstamp) \
- javax/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-javax/xml/xpath/XPath.lo: javax/xml/xpath/$(am__dirstamp) \
- javax/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-javax/xml/xpath/XPathFactoryConfigurationException.lo: \
- javax/xml/xpath/$(am__dirstamp) \
- javax/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-javax/xml/xpath/XPathFactory.lo: javax/xml/xpath/$(am__dirstamp) \
- javax/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-javax/xml/xpath/XPathException.lo: javax/xml/xpath/$(am__dirstamp) \
- javax/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-javax/xml/xpath/XPathExpression.lo: javax/xml/xpath/$(am__dirstamp) \
- javax/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-javax/xml/xpath/XPathFunctionException.lo: \
- javax/xml/xpath/$(am__dirstamp) \
- javax/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-javax/xml/validation/$(am__dirstamp):
- @$(mkdir_p) javax/xml/validation
- @: > javax/xml/validation/$(am__dirstamp)
-javax/xml/validation/$(DEPDIR)/$(am__dirstamp):
- @$(mkdir_p) javax/xml/validation/$(DEPDIR)
- @: > javax/xml/validation/$(DEPDIR)/$(am__dirstamp)
-javax/xml/validation/ValidatorHandler.lo: \
- javax/xml/validation/$(am__dirstamp) \
- javax/xml/validation/$(DEPDIR)/$(am__dirstamp)
-javax/xml/validation/Validator.lo: \
- javax/xml/validation/$(am__dirstamp) \
- javax/xml/validation/$(DEPDIR)/$(am__dirstamp)
-javax/xml/validation/TypeInfoProvider.lo: \
- javax/xml/validation/$(am__dirstamp) \
- javax/xml/validation/$(DEPDIR)/$(am__dirstamp)
-javax/xml/validation/SchemaFactory.lo: \
- javax/xml/validation/$(am__dirstamp) \
- javax/xml/validation/$(DEPDIR)/$(am__dirstamp)
-javax/xml/validation/Schema.lo: javax/xml/validation/$(am__dirstamp) \
- javax/xml/validation/$(DEPDIR)/$(am__dirstamp)
-javax/xml/parsers/$(am__dirstamp):
- @$(mkdir_p) javax/xml/parsers
- @: > javax/xml/parsers/$(am__dirstamp)
-javax/xml/parsers/$(DEPDIR)/$(am__dirstamp):
- @$(mkdir_p) javax/xml/parsers/$(DEPDIR)
- @: > javax/xml/parsers/$(DEPDIR)/$(am__dirstamp)
-javax/xml/parsers/SAXParserFactory.lo: \
- javax/xml/parsers/$(am__dirstamp) \
- javax/xml/parsers/$(DEPDIR)/$(am__dirstamp)
-javax/xml/parsers/FactoryConfigurationError.lo: \
- javax/xml/parsers/$(am__dirstamp) \
- javax/xml/parsers/$(DEPDIR)/$(am__dirstamp)
-javax/xml/parsers/SAXParser.lo: javax/xml/parsers/$(am__dirstamp) \
- javax/xml/parsers/$(DEPDIR)/$(am__dirstamp)
-javax/xml/parsers/DocumentBuilderFactory.lo: \
- javax/xml/parsers/$(am__dirstamp) \
- javax/xml/parsers/$(DEPDIR)/$(am__dirstamp)
-javax/xml/parsers/ParserConfigurationException.lo: \
- javax/xml/parsers/$(am__dirstamp) \
- javax/xml/parsers/$(DEPDIR)/$(am__dirstamp)
-javax/xml/parsers/DocumentBuilder.lo: \
- javax/xml/parsers/$(am__dirstamp) \
- javax/xml/parsers/$(DEPDIR)/$(am__dirstamp)
-javax/xml/datatype/$(am__dirstamp):
- @$(mkdir_p) javax/xml/datatype
- @: > javax/xml/datatype/$(am__dirstamp)
-javax/xml/datatype/$(DEPDIR)/$(am__dirstamp):
- @$(mkdir_p) javax/xml/datatype/$(DEPDIR)
- @: > javax/xml/datatype/$(DEPDIR)/$(am__dirstamp)
-javax/xml/datatype/DatatypeFactory.lo: \
- javax/xml/datatype/$(am__dirstamp) \
- javax/xml/datatype/$(DEPDIR)/$(am__dirstamp)
-javax/xml/datatype/XMLGregorianCalendar.lo: \
- javax/xml/datatype/$(am__dirstamp) \
- javax/xml/datatype/$(DEPDIR)/$(am__dirstamp)
-javax/xml/datatype/Duration.lo: javax/xml/datatype/$(am__dirstamp) \
- javax/xml/datatype/$(DEPDIR)/$(am__dirstamp)
-javax/xml/datatype/DatatypeConfigurationException.lo: \
- javax/xml/datatype/$(am__dirstamp) \
- javax/xml/datatype/$(DEPDIR)/$(am__dirstamp)
-javax/xml/datatype/DatatypeConstants.lo: \
- javax/xml/datatype/$(am__dirstamp) \
- javax/xml/datatype/$(DEPDIR)/$(am__dirstamp)
-javax/xml/$(am__dirstamp):
- @$(mkdir_p) javax/xml
- @: > javax/xml/$(am__dirstamp)
-javax/xml/$(DEPDIR)/$(am__dirstamp):
- @$(mkdir_p) javax/xml/$(DEPDIR)
- @: > javax/xml/$(DEPDIR)/$(am__dirstamp)
-javax/xml/XMLConstants.lo: javax/xml/$(am__dirstamp) \
- javax/xml/$(DEPDIR)/$(am__dirstamp)
-javax/xml/namespace/$(am__dirstamp):
- @$(mkdir_p) javax/xml/namespace
- @: > javax/xml/namespace/$(am__dirstamp)
-javax/xml/namespace/$(DEPDIR)/$(am__dirstamp):
- @$(mkdir_p) javax/xml/namespace/$(DEPDIR)
- @: > javax/xml/namespace/$(DEPDIR)/$(am__dirstamp)
-javax/xml/namespace/NamespaceContext.lo: \
- javax/xml/namespace/$(am__dirstamp) \
- javax/xml/namespace/$(DEPDIR)/$(am__dirstamp)
-javax/xml/namespace/QName.lo: javax/xml/namespace/$(am__dirstamp) \
- javax/xml/namespace/$(DEPDIR)/$(am__dirstamp)
-javax/xml/transform/$(am__dirstamp):
- @$(mkdir_p) javax/xml/transform
- @: > javax/xml/transform/$(am__dirstamp)
-javax/xml/transform/$(DEPDIR)/$(am__dirstamp):
- @$(mkdir_p) javax/xml/transform/$(DEPDIR)
- @: > javax/xml/transform/$(DEPDIR)/$(am__dirstamp)
-javax/xml/transform/TransformerException.lo: \
- javax/xml/transform/$(am__dirstamp) \
- javax/xml/transform/$(DEPDIR)/$(am__dirstamp)
-javax/xml/transform/TransformerFactoryConfigurationError.lo: \
- javax/xml/transform/$(am__dirstamp) \
- javax/xml/transform/$(DEPDIR)/$(am__dirstamp)
-javax/xml/transform/sax/$(am__dirstamp):
- @$(mkdir_p) javax/xml/transform/sax
- @: > javax/xml/transform/sax/$(am__dirstamp)
-javax/xml/transform/sax/$(DEPDIR)/$(am__dirstamp):
- @$(mkdir_p) javax/xml/transform/sax/$(DEPDIR)
- @: > javax/xml/transform/sax/$(DEPDIR)/$(am__dirstamp)
-javax/xml/transform/sax/SAXResult.lo: \
- javax/xml/transform/sax/$(am__dirstamp) \
- javax/xml/transform/sax/$(DEPDIR)/$(am__dirstamp)
-javax/xml/transform/sax/TransformerHandler.lo: \
- javax/xml/transform/sax/$(am__dirstamp) \
- javax/xml/transform/sax/$(DEPDIR)/$(am__dirstamp)
-javax/xml/transform/sax/SAXTransformerFactory.lo: \
- javax/xml/transform/sax/$(am__dirstamp) \
- javax/xml/transform/sax/$(DEPDIR)/$(am__dirstamp)
-javax/xml/transform/sax/SAXSource.lo: \
- javax/xml/transform/sax/$(am__dirstamp) \
- javax/xml/transform/sax/$(DEPDIR)/$(am__dirstamp)
-javax/xml/transform/sax/TemplatesHandler.lo: \
- javax/xml/transform/sax/$(am__dirstamp) \
- javax/xml/transform/sax/$(DEPDIR)/$(am__dirstamp)
-javax/xml/transform/OutputKeys.lo: \
- javax/xml/transform/$(am__dirstamp) \
- javax/xml/transform/$(DEPDIR)/$(am__dirstamp)
-javax/xml/transform/stream/$(am__dirstamp):
- @$(mkdir_p) javax/xml/transform/stream
- @: > javax/xml/transform/stream/$(am__dirstamp)
-javax/xml/transform/stream/$(DEPDIR)/$(am__dirstamp):
- @$(mkdir_p) javax/xml/transform/stream/$(DEPDIR)
- @: > javax/xml/transform/stream/$(DEPDIR)/$(am__dirstamp)
-javax/xml/transform/stream/StreamResult.lo: \
- javax/xml/transform/stream/$(am__dirstamp) \
- javax/xml/transform/stream/$(DEPDIR)/$(am__dirstamp)
-javax/xml/transform/stream/StreamSource.lo: \
- javax/xml/transform/stream/$(am__dirstamp) \
- javax/xml/transform/stream/$(DEPDIR)/$(am__dirstamp)
-javax/xml/transform/Source.lo: javax/xml/transform/$(am__dirstamp) \
- javax/xml/transform/$(DEPDIR)/$(am__dirstamp)
-javax/xml/transform/SourceLocator.lo: \
- javax/xml/transform/$(am__dirstamp) \
- javax/xml/transform/$(DEPDIR)/$(am__dirstamp)
-javax/xml/transform/ErrorListener.lo: \
- javax/xml/transform/$(am__dirstamp) \
- javax/xml/transform/$(DEPDIR)/$(am__dirstamp)
-javax/xml/transform/TransformerConfigurationException.lo: \
- javax/xml/transform/$(am__dirstamp) \
- javax/xml/transform/$(DEPDIR)/$(am__dirstamp)
-javax/xml/transform/Templates.lo: javax/xml/transform/$(am__dirstamp) \
- javax/xml/transform/$(DEPDIR)/$(am__dirstamp)
-javax/xml/transform/Result.lo: javax/xml/transform/$(am__dirstamp) \
- javax/xml/transform/$(DEPDIR)/$(am__dirstamp)
-javax/xml/transform/URIResolver.lo: \
- javax/xml/transform/$(am__dirstamp) \
- javax/xml/transform/$(DEPDIR)/$(am__dirstamp)
-javax/xml/transform/dom/$(am__dirstamp):
- @$(mkdir_p) javax/xml/transform/dom
- @: > javax/xml/transform/dom/$(am__dirstamp)
-javax/xml/transform/dom/$(DEPDIR)/$(am__dirstamp):
- @$(mkdir_p) javax/xml/transform/dom/$(DEPDIR)
- @: > javax/xml/transform/dom/$(DEPDIR)/$(am__dirstamp)
-javax/xml/transform/dom/DOMSource.lo: \
- javax/xml/transform/dom/$(am__dirstamp) \
- javax/xml/transform/dom/$(DEPDIR)/$(am__dirstamp)
-javax/xml/transform/dom/DOMLocator.lo: \
- javax/xml/transform/dom/$(am__dirstamp) \
- javax/xml/transform/dom/$(DEPDIR)/$(am__dirstamp)
-javax/xml/transform/dom/DOMResult.lo: \
- javax/xml/transform/dom/$(am__dirstamp) \
- javax/xml/transform/dom/$(DEPDIR)/$(am__dirstamp)
-javax/xml/transform/Transformer.lo: \
- javax/xml/transform/$(am__dirstamp) \
- javax/xml/transform/$(DEPDIR)/$(am__dirstamp)
-javax/xml/transform/TransformerFactory.lo: \
- javax/xml/transform/$(am__dirstamp) \
- javax/xml/transform/$(DEPDIR)/$(am__dirstamp)
javax/security/cert/$(am__dirstamp):
@$(mkdir_p) javax/security/cert
@: > javax/security/cert/$(am__dirstamp)
@@ -15682,426 +14621,6 @@ org/ietf/jgss/GSSCredential.lo: org/ietf/jgss/$(am__dirstamp) \
org/ietf/jgss/$(DEPDIR)/$(am__dirstamp)
org/ietf/jgss/ChannelBinding.lo: org/ietf/jgss/$(am__dirstamp) \
org/ietf/jgss/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/$(am__dirstamp):
- @$(mkdir_p) gnu/xml/xpath
- @: > gnu/xml/xpath/$(am__dirstamp)
-gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp):
- @$(mkdir_p) gnu/xml/xpath/$(DEPDIR)
- @: > gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/EqualityExpr.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/NumberFunction.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/StringLengthFunction.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/NameFunction.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/SumFunction.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/Pattern.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/StringFunction.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/NegativeExpr.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/UnionExpr.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/SubstringFunction.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/Expr.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/XPathFactoryImpl.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/NormalizeSpaceFunction.lo: \
- gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/Constant.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/Predicate.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/Path.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/OrExpr.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/LangFunction.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/StartsWithFunction.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/SubstringAfterFunction.lo: \
- gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/FloorFunction.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/NotFunction.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/Root.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/PositionFunction.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/VariableReference.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/DocumentOrderComparator.lo: \
- gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/LocalNameFunction.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/NamespaceUriFunction.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/TranslateFunction.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/FalseFunction.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/AndExpr.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/XPathParser.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/NamespaceTest.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/ConcatFunction.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/NameTest.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/CountFunction.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/IdFunction.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/LastFunction.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/XPathTokenizer.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/Steps.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/TrueFunction.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/BooleanFunction.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/ParenthesizedExpr.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/XPathImpl.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/Selector.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/RoundFunction.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/SubstringBeforeFunction.lo: \
- gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/Function.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/CeilingFunction.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/RelationalExpr.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/FunctionCall.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/NodeTypeTest.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/ArithmeticExpr.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/Test.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/xpath/ContainsFunction.lo: gnu/xml/xpath/$(am__dirstamp) \
- gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/pipeline/$(am__dirstamp):
- @$(mkdir_p) gnu/xml/pipeline
- @: > gnu/xml/pipeline/$(am__dirstamp)
-gnu/xml/pipeline/$(DEPDIR)/$(am__dirstamp):
- @$(mkdir_p) gnu/xml/pipeline/$(DEPDIR)
- @: > gnu/xml/pipeline/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/pipeline/EventFilter.lo: gnu/xml/pipeline/$(am__dirstamp) \
- gnu/xml/pipeline/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/pipeline/NSFilter.lo: gnu/xml/pipeline/$(am__dirstamp) \
- gnu/xml/pipeline/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/pipeline/XsltFilter.lo: gnu/xml/pipeline/$(am__dirstamp) \
- gnu/xml/pipeline/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/pipeline/ValidationConsumer.lo: \
- gnu/xml/pipeline/$(am__dirstamp) \
- gnu/xml/pipeline/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/pipeline/PipelineFactory.lo: gnu/xml/pipeline/$(am__dirstamp) \
- gnu/xml/pipeline/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/pipeline/TextConsumer.lo: gnu/xml/pipeline/$(am__dirstamp) \
- gnu/xml/pipeline/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/pipeline/LinkFilter.lo: gnu/xml/pipeline/$(am__dirstamp) \
- gnu/xml/pipeline/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/pipeline/TeeConsumer.lo: gnu/xml/pipeline/$(am__dirstamp) \
- gnu/xml/pipeline/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/pipeline/DomConsumer.lo: gnu/xml/pipeline/$(am__dirstamp) \
- gnu/xml/pipeline/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/pipeline/EventConsumer.lo: gnu/xml/pipeline/$(am__dirstamp) \
- gnu/xml/pipeline/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/pipeline/WellFormednessFilter.lo: \
- gnu/xml/pipeline/$(am__dirstamp) \
- gnu/xml/pipeline/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/pipeline/XIncludeFilter.lo: gnu/xml/pipeline/$(am__dirstamp) \
- gnu/xml/pipeline/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/pipeline/CallFilter.lo: gnu/xml/pipeline/$(am__dirstamp) \
- gnu/xml/pipeline/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/aelfred2/$(am__dirstamp):
- @$(mkdir_p) gnu/xml/aelfred2
- @: > gnu/xml/aelfred2/$(am__dirstamp)
-gnu/xml/aelfred2/$(DEPDIR)/$(am__dirstamp):
- @$(mkdir_p) gnu/xml/aelfred2/$(DEPDIR)
- @: > gnu/xml/aelfred2/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/aelfred2/XmlParser.lo: gnu/xml/aelfred2/$(am__dirstamp) \
- gnu/xml/aelfred2/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/aelfred2/XmlReader.lo: gnu/xml/aelfred2/$(am__dirstamp) \
- gnu/xml/aelfred2/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/aelfred2/JAXPFactory.lo: gnu/xml/aelfred2/$(am__dirstamp) \
- gnu/xml/aelfred2/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/aelfred2/ContentHandler2.lo: gnu/xml/aelfred2/$(am__dirstamp) \
- gnu/xml/aelfred2/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/aelfred2/SAXDriver.lo: gnu/xml/aelfred2/$(am__dirstamp) \
- gnu/xml/aelfred2/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/util/$(am__dirstamp):
- @$(mkdir_p) gnu/xml/util
- @: > gnu/xml/util/$(am__dirstamp)
-gnu/xml/util/$(DEPDIR)/$(am__dirstamp):
- @$(mkdir_p) gnu/xml/util/$(DEPDIR)
- @: > gnu/xml/util/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/util/XCat.lo: gnu/xml/util/$(am__dirstamp) \
- gnu/xml/util/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/util/DomParser.lo: gnu/xml/util/$(am__dirstamp) \
- gnu/xml/util/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/util/XMLWriter.lo: gnu/xml/util/$(am__dirstamp) \
- gnu/xml/util/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/util/Resolver.lo: gnu/xml/util/$(am__dirstamp) \
- gnu/xml/util/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/util/DoParse.lo: gnu/xml/util/$(am__dirstamp) \
- gnu/xml/util/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/util/XHTMLWriter.lo: gnu/xml/util/$(am__dirstamp) \
- gnu/xml/util/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/util/SAXNullTransformerFactory.lo: \
- gnu/xml/util/$(am__dirstamp) \
- gnu/xml/util/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/$(am__dirstamp):
- @$(mkdir_p) gnu/xml/dom
- @: > gnu/xml/dom/$(am__dirstamp)
-gnu/xml/dom/$(DEPDIR)/$(am__dirstamp):
- @$(mkdir_p) gnu/xml/dom/$(DEPDIR)
- @: > gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/DomXPathNSResolver.lo: gnu/xml/dom/$(am__dirstamp) \
- gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/ls/$(am__dirstamp):
- @$(mkdir_p) gnu/xml/dom/ls
- @: > gnu/xml/dom/ls/$(am__dirstamp)
-gnu/xml/dom/ls/$(DEPDIR)/$(am__dirstamp):
- @$(mkdir_p) gnu/xml/dom/ls/$(DEPDIR)
- @: > gnu/xml/dom/ls/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/ls/FilteredSAXEventSink.lo: \
- gnu/xml/dom/ls/$(am__dirstamp) \
- gnu/xml/dom/ls/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/ls/DomLSException.lo: gnu/xml/dom/ls/$(am__dirstamp) \
- gnu/xml/dom/ls/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/ls/DomLSSerializer.lo: gnu/xml/dom/ls/$(am__dirstamp) \
- gnu/xml/dom/ls/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/ls/DomLSInput.lo: gnu/xml/dom/ls/$(am__dirstamp) \
- gnu/xml/dom/ls/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/ls/DomLSOutput.lo: gnu/xml/dom/ls/$(am__dirstamp) \
- gnu/xml/dom/ls/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/ls/SAXEventSink.lo: gnu/xml/dom/ls/$(am__dirstamp) \
- gnu/xml/dom/ls/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/ls/DomLSParser.lo: gnu/xml/dom/ls/$(am__dirstamp) \
- gnu/xml/dom/ls/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/ls/ReaderInputStream.lo: gnu/xml/dom/ls/$(am__dirstamp) \
- gnu/xml/dom/ls/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/ls/WriterOutputStream.lo: gnu/xml/dom/ls/$(am__dirstamp) \
- gnu/xml/dom/ls/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/DomElement.lo: gnu/xml/dom/$(am__dirstamp) \
- gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/DomNsNode.lo: gnu/xml/dom/$(am__dirstamp) \
- gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/DomAttr.lo: gnu/xml/dom/$(am__dirstamp) \
- gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/DTDAttributeTypeInfo.lo: gnu/xml/dom/$(am__dirstamp) \
- gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/DomDocumentBuilder.lo: gnu/xml/dom/$(am__dirstamp) \
- gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/DTDElementTypeInfo.lo: gnu/xml/dom/$(am__dirstamp) \
- gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/DomDocument.lo: gnu/xml/dom/$(am__dirstamp) \
- gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/DomXPathExpression.lo: gnu/xml/dom/$(am__dirstamp) \
- gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/DomDocumentConfiguration.lo: gnu/xml/dom/$(am__dirstamp) \
- gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/DomDocumentFragment.lo: gnu/xml/dom/$(am__dirstamp) \
- gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/DomProcessingInstruction.lo: gnu/xml/dom/$(am__dirstamp) \
- gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/Consumer.lo: gnu/xml/dom/$(am__dirstamp) \
- gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/DomComment.lo: gnu/xml/dom/$(am__dirstamp) \
- gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/DomCharacterData.lo: gnu/xml/dom/$(am__dirstamp) \
- gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/DomExtern.lo: gnu/xml/dom/$(am__dirstamp) \
- gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/DomEntityReference.lo: gnu/xml/dom/$(am__dirstamp) \
- gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/DomNamedNodeMap.lo: gnu/xml/dom/$(am__dirstamp) \
- gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/ImplementationList.lo: gnu/xml/dom/$(am__dirstamp) \
- gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/ImplementationSource.lo: gnu/xml/dom/$(am__dirstamp) \
- gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/DomImpl.lo: gnu/xml/dom/$(am__dirstamp) \
- gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/DomDoctype.lo: gnu/xml/dom/$(am__dirstamp) \
- gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/DomNode.lo: gnu/xml/dom/$(am__dirstamp) \
- gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/DomXPathResult.lo: gnu/xml/dom/$(am__dirstamp) \
- gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/DomDocumentBuilderFactory.lo: gnu/xml/dom/$(am__dirstamp) \
- gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/DomText.lo: gnu/xml/dom/$(am__dirstamp) \
- gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/DomNSResolverContext.lo: gnu/xml/dom/$(am__dirstamp) \
- gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/DomNodeIterator.lo: gnu/xml/dom/$(am__dirstamp) \
- gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/DomNotation.lo: gnu/xml/dom/$(am__dirstamp) \
- gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/JAXPFactory.lo: gnu/xml/dom/$(am__dirstamp) \
- gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/DomIterator.lo: gnu/xml/dom/$(am__dirstamp) \
- gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/DomEvent.lo: gnu/xml/dom/$(am__dirstamp) \
- gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/DomEntity.lo: gnu/xml/dom/$(am__dirstamp) \
- gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/DomCDATASection.lo: gnu/xml/dom/$(am__dirstamp) \
- gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/dom/DomDOMException.lo: gnu/xml/dom/$(am__dirstamp) \
- gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/$(am__dirstamp):
- @$(mkdir_p) gnu/xml/transform
- @: > gnu/xml/transform/$(am__dirstamp)
-gnu/xml/transform/$(DEPDIR)/$(am__dirstamp):
- @$(mkdir_p) gnu/xml/transform/$(DEPDIR)
- @: > gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/GenerateIdFunction.lo: \
- gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/FormatNumberFunction.lo: \
- gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/ValueOfNode.lo: gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/ApplyImportsNode.lo: \
- gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/WithParam.lo: gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/DocumentFunction.lo: \
- gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/SAXSerializer.lo: gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/FunctionAvailableFunction.lo: \
- gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/ElementAvailableFunction.lo: \
- gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/IfNode.lo: gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/ApplyTemplatesNode.lo: \
- gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/SortKey.lo: gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/Key.lo: gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/ElementNode.lo: gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/CurrentFunction.lo: \
- gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/XSLComparator.lo: gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/CallTemplateNode.lo: \
- gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/TemplatesImpl.lo: gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/ChooseNode.lo: gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/NumberNode.lo: gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/CopyOfNode.lo: gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/ParameterNode.lo: gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/TransformerFactoryImpl.lo: \
- gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/TextNode.lo: gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/CopyNode.lo: gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/SystemPropertyFunction.lo: \
- gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/Stylesheet.lo: gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/ProcessingInstructionNode.lo: \
- gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/UnparsedEntityUriFunction.lo: \
- gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/URIResolverEntityResolver.lo: \
- gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/ErrorListenerErrorHandler.lo: \
- gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/Bindings.lo: gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/AttributeSet.lo: gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/Template.lo: gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/MessageNode.lo: gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/LiteralNode.lo: gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/StreamSerializer.lo: \
- gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/XSLURIResolver.lo: \
- gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/AttributeNode.lo: gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/CommentNode.lo: gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/ForEachNode.lo: gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/KeyFunction.lo: gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/TransformerImpl.lo: \
- gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/WhenNode.lo: gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/NodeNumberNode.lo: \
- gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/OtherwiseNode.lo: gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/AbstractNumberNode.lo: \
- gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/TemplateNode.lo: gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/TransformerOutputProperties.lo: \
- gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
-gnu/xml/transform/DOMSourceLocator.lo: \
- gnu/xml/transform/$(am__dirstamp) \
- gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
java/lang/ConcreteProcess.lo: java/lang/$(am__dirstamp) \
java/lang/$(DEPDIR)/$(am__dirstamp)
gnu/classpath/Configuration.lo: gnu/classpath/$(am__dirstamp) \
@@ -16164,6 +14683,9 @@ gnu/gcj/tools/gcj_dbtool/$(DEPDIR)/$(am__dirstamp):
gnu/gcj/tools/gcj_dbtool/Main.$(OBJEXT): \
gnu/gcj/tools/gcj_dbtool/$(am__dirstamp) \
gnu/gcj/tools/gcj_dbtool/$(DEPDIR)/$(am__dirstamp)
+gnu/gcj/tools/gcj_dbtool/natMain.$(OBJEXT): \
+ gnu/gcj/tools/gcj_dbtool/$(am__dirstamp) \
+ gnu/gcj/tools/gcj_dbtool/$(DEPDIR)/$(am__dirstamp)
gcj-dbtool$(EXEEXT): $(gcj_dbtool_OBJECTS) $(gcj_dbtool_DEPENDENCIES)
@rm -f gcj-dbtool$(EXEEXT)
$(gcj_dbtool_LINK) $(gcj_dbtool_LDFLAGS) $(gcj_dbtool_OBJECTS) $(gcj_dbtool_LDADD) $(LIBS)
@@ -16327,10 +14849,14 @@ mostlyclean-compile:
-rm -f gnu/gcj/io/shs.lo
-rm -f gnu/gcj/natCore.$(OBJEXT)
-rm -f gnu/gcj/natCore.lo
+ -rm -f gnu/gcj/runtime/BootClassLoader.$(OBJEXT)
+ -rm -f gnu/gcj/runtime/BootClassLoader.lo
-rm -f gnu/gcj/runtime/FileDeleter.$(OBJEXT)
-rm -f gnu/gcj/runtime/FileDeleter.lo
-rm -f gnu/gcj/runtime/FinalizerThread.$(OBJEXT)
-rm -f gnu/gcj/runtime/FinalizerThread.lo
+ -rm -f gnu/gcj/runtime/HelperClassLoader.$(OBJEXT)
+ -rm -f gnu/gcj/runtime/HelperClassLoader.lo
-rm -f gnu/gcj/runtime/JNIWeakRef.$(OBJEXT)
-rm -f gnu/gcj/runtime/JNIWeakRef.lo
-rm -f gnu/gcj/runtime/NameFinder.$(OBJEXT)
@@ -16356,6 +14882,7 @@ mostlyclean-compile:
-rm -f gnu/gcj/runtime/natVMClassLoader.$(OBJEXT)
-rm -f gnu/gcj/runtime/natVMClassLoader.lo
-rm -f gnu/gcj/tools/gcj_dbtool/Main.$(OBJEXT)
+ -rm -f gnu/gcj/tools/gcj_dbtool/natMain.$(OBJEXT)
-rm -f gnu/gcj/util/Debug.$(OBJEXT)
-rm -f gnu/gcj/util/Debug.lo
-rm -f gnu/gcj/util/natDebug.$(OBJEXT)
@@ -16590,110 +15117,6 @@ mostlyclean-compile:
-rm -f gnu/java/awt/peer/gtk/lib_gnu_java_awt_peer_gtk_la-GtkToolkit.lo
-rm -f gnu/java/awt/peer/gtk/lib_gnu_java_awt_peer_gtk_la-GtkWindowPeer.$(OBJEXT)
-rm -f gnu/java/awt/peer/gtk/lib_gnu_java_awt_peer_gtk_la-GtkWindowPeer.lo
- -rm -f gnu/java/beans/BeanInfoEmbryo.$(OBJEXT)
- -rm -f gnu/java/beans/BeanInfoEmbryo.lo
- -rm -f gnu/java/beans/DummyAppletContext.$(OBJEXT)
- -rm -f gnu/java/beans/DummyAppletContext.lo
- -rm -f gnu/java/beans/DummyAppletStub.$(OBJEXT)
- -rm -f gnu/java/beans/DummyAppletStub.lo
- -rm -f gnu/java/beans/ExplicitBeanInfo.$(OBJEXT)
- -rm -f gnu/java/beans/ExplicitBeanInfo.lo
- -rm -f gnu/java/beans/IntrospectionIncubator.$(OBJEXT)
- -rm -f gnu/java/beans/IntrospectionIncubator.lo
- -rm -f gnu/java/beans/decoder/AbstractContext.$(OBJEXT)
- -rm -f gnu/java/beans/decoder/AbstractContext.lo
- -rm -f gnu/java/beans/decoder/AbstractCreatableObjectContext.$(OBJEXT)
- -rm -f gnu/java/beans/decoder/AbstractCreatableObjectContext.lo
- -rm -f gnu/java/beans/decoder/AbstractElementHandler.$(OBJEXT)
- -rm -f gnu/java/beans/decoder/AbstractElementHandler.lo
- -rm -f gnu/java/beans/decoder/AbstractObjectContext.$(OBJEXT)
- -rm -f gnu/java/beans/decoder/AbstractObjectContext.lo
- -rm -f gnu/java/beans/decoder/ArrayContext.$(OBJEXT)
- -rm -f gnu/java/beans/decoder/ArrayContext.lo
- -rm -f gnu/java/beans/decoder/ArrayHandler.$(OBJEXT)
- -rm -f gnu/java/beans/decoder/ArrayHandler.lo
- -rm -f gnu/java/beans/decoder/AssemblyException.$(OBJEXT)
- -rm -f gnu/java/beans/decoder/AssemblyException.lo
- -rm -f gnu/java/beans/decoder/BooleanHandler.$(OBJEXT)
- -rm -f gnu/java/beans/decoder/BooleanHandler.lo
- -rm -f gnu/java/beans/decoder/ByteHandler.$(OBJEXT)
- -rm -f gnu/java/beans/decoder/ByteHandler.lo
- -rm -f gnu/java/beans/decoder/CharHandler.$(OBJEXT)
- -rm -f gnu/java/beans/decoder/CharHandler.lo
- -rm -f gnu/java/beans/decoder/ClassHandler.$(OBJEXT)
- -rm -f gnu/java/beans/decoder/ClassHandler.lo
- -rm -f gnu/java/beans/decoder/ConstructorContext.$(OBJEXT)
- -rm -f gnu/java/beans/decoder/ConstructorContext.lo
- -rm -f gnu/java/beans/decoder/Context.$(OBJEXT)
- -rm -f gnu/java/beans/decoder/Context.lo
- -rm -f gnu/java/beans/decoder/DecoderContext.$(OBJEXT)
- -rm -f gnu/java/beans/decoder/DecoderContext.lo
- -rm -f gnu/java/beans/decoder/DefaultExceptionListener.$(OBJEXT)
- -rm -f gnu/java/beans/decoder/DefaultExceptionListener.lo
- -rm -f gnu/java/beans/decoder/DoubleHandler.$(OBJEXT)
- -rm -f gnu/java/beans/decoder/DoubleHandler.lo
- -rm -f gnu/java/beans/decoder/DummyContext.$(OBJEXT)
- -rm -f gnu/java/beans/decoder/DummyContext.lo
- -rm -f gnu/java/beans/decoder/DummyHandler.$(OBJEXT)
- -rm -f gnu/java/beans/decoder/DummyHandler.lo
- -rm -f gnu/java/beans/decoder/ElementHandler.$(OBJEXT)
- -rm -f gnu/java/beans/decoder/ElementHandler.lo
- -rm -f gnu/java/beans/decoder/FloatHandler.$(OBJEXT)
- -rm -f gnu/java/beans/decoder/FloatHandler.lo
- -rm -f gnu/java/beans/decoder/GrowableArrayContext.$(OBJEXT)
- -rm -f gnu/java/beans/decoder/GrowableArrayContext.lo
- -rm -f gnu/java/beans/decoder/IndexContext.$(OBJEXT)
- -rm -f gnu/java/beans/decoder/IndexContext.lo
- -rm -f gnu/java/beans/decoder/IntHandler.$(OBJEXT)
- -rm -f gnu/java/beans/decoder/IntHandler.lo
- -rm -f gnu/java/beans/decoder/JavaHandler.$(OBJEXT)
- -rm -f gnu/java/beans/decoder/JavaHandler.lo
- -rm -f gnu/java/beans/decoder/LongHandler.$(OBJEXT)
- -rm -f gnu/java/beans/decoder/LongHandler.lo
- -rm -f gnu/java/beans/decoder/MethodContext.$(OBJEXT)
- -rm -f gnu/java/beans/decoder/MethodContext.lo
- -rm -f gnu/java/beans/decoder/MethodFinder.$(OBJEXT)
- -rm -f gnu/java/beans/decoder/MethodFinder.lo
- -rm -f gnu/java/beans/decoder/NullHandler.$(OBJEXT)
- -rm -f gnu/java/beans/decoder/NullHandler.lo
- -rm -f gnu/java/beans/decoder/ObjectContext.$(OBJEXT)
- -rm -f gnu/java/beans/decoder/ObjectContext.lo
- -rm -f gnu/java/beans/decoder/ObjectHandler.$(OBJEXT)
- -rm -f gnu/java/beans/decoder/ObjectHandler.lo
- -rm -f gnu/java/beans/decoder/PersistenceParser.$(OBJEXT)
- -rm -f gnu/java/beans/decoder/PersistenceParser.lo
- -rm -f gnu/java/beans/decoder/PropertyContext.$(OBJEXT)
- -rm -f gnu/java/beans/decoder/PropertyContext.lo
- -rm -f gnu/java/beans/decoder/ShortHandler.$(OBJEXT)
- -rm -f gnu/java/beans/decoder/ShortHandler.lo
- -rm -f gnu/java/beans/decoder/SimpleHandler.$(OBJEXT)
- -rm -f gnu/java/beans/decoder/SimpleHandler.lo
- -rm -f gnu/java/beans/decoder/StaticMethodContext.$(OBJEXT)
- -rm -f gnu/java/beans/decoder/StaticMethodContext.lo
- -rm -f gnu/java/beans/decoder/StringHandler.$(OBJEXT)
- -rm -f gnu/java/beans/decoder/StringHandler.lo
- -rm -f gnu/java/beans/decoder/VoidHandler.$(OBJEXT)
- -rm -f gnu/java/beans/decoder/VoidHandler.lo
- -rm -f gnu/java/beans/editors/ColorEditor.$(OBJEXT)
- -rm -f gnu/java/beans/editors/ColorEditor.lo
- -rm -f gnu/java/beans/editors/FontEditor.$(OBJEXT)
- -rm -f gnu/java/beans/editors/FontEditor.lo
- -rm -f gnu/java/beans/editors/NativeBooleanEditor.$(OBJEXT)
- -rm -f gnu/java/beans/editors/NativeBooleanEditor.lo
- -rm -f gnu/java/beans/editors/NativeByteEditor.$(OBJEXT)
- -rm -f gnu/java/beans/editors/NativeByteEditor.lo
- -rm -f gnu/java/beans/editors/NativeDoubleEditor.$(OBJEXT)
- -rm -f gnu/java/beans/editors/NativeDoubleEditor.lo
- -rm -f gnu/java/beans/editors/NativeFloatEditor.$(OBJEXT)
- -rm -f gnu/java/beans/editors/NativeFloatEditor.lo
- -rm -f gnu/java/beans/editors/NativeIntEditor.$(OBJEXT)
- -rm -f gnu/java/beans/editors/NativeIntEditor.lo
- -rm -f gnu/java/beans/editors/NativeLongEditor.$(OBJEXT)
- -rm -f gnu/java/beans/editors/NativeLongEditor.lo
- -rm -f gnu/java/beans/editors/NativeShortEditor.$(OBJEXT)
- -rm -f gnu/java/beans/editors/NativeShortEditor.lo
- -rm -f gnu/java/beans/editors/StringEditor.$(OBJEXT)
- -rm -f gnu/java/beans/editors/StringEditor.lo
-rm -f gnu/java/io/ASN1ParsingException.$(OBJEXT)
-rm -f gnu/java/io/ASN1ParsingException.lo
-rm -f gnu/java/io/Base64InputStream.$(OBJEXT)
@@ -17470,354 +15893,6 @@ mostlyclean-compile:
-rm -f gnu/regexp/RETokenWordBoundary.lo
-rm -f gnu/regexp/UncheckedRE.$(OBJEXT)
-rm -f gnu/regexp/UncheckedRE.lo
- -rm -f gnu/xml/aelfred2/ContentHandler2.$(OBJEXT)
- -rm -f gnu/xml/aelfred2/ContentHandler2.lo
- -rm -f gnu/xml/aelfred2/JAXPFactory.$(OBJEXT)
- -rm -f gnu/xml/aelfred2/JAXPFactory.lo
- -rm -f gnu/xml/aelfred2/SAXDriver.$(OBJEXT)
- -rm -f gnu/xml/aelfred2/SAXDriver.lo
- -rm -f gnu/xml/aelfred2/XmlParser.$(OBJEXT)
- -rm -f gnu/xml/aelfred2/XmlParser.lo
- -rm -f gnu/xml/aelfred2/XmlReader.$(OBJEXT)
- -rm -f gnu/xml/aelfred2/XmlReader.lo
- -rm -f gnu/xml/dom/Consumer.$(OBJEXT)
- -rm -f gnu/xml/dom/Consumer.lo
- -rm -f gnu/xml/dom/DTDAttributeTypeInfo.$(OBJEXT)
- -rm -f gnu/xml/dom/DTDAttributeTypeInfo.lo
- -rm -f gnu/xml/dom/DTDElementTypeInfo.$(OBJEXT)
- -rm -f gnu/xml/dom/DTDElementTypeInfo.lo
- -rm -f gnu/xml/dom/DomAttr.$(OBJEXT)
- -rm -f gnu/xml/dom/DomAttr.lo
- -rm -f gnu/xml/dom/DomCDATASection.$(OBJEXT)
- -rm -f gnu/xml/dom/DomCDATASection.lo
- -rm -f gnu/xml/dom/DomCharacterData.$(OBJEXT)
- -rm -f gnu/xml/dom/DomCharacterData.lo
- -rm -f gnu/xml/dom/DomComment.$(OBJEXT)
- -rm -f gnu/xml/dom/DomComment.lo
- -rm -f gnu/xml/dom/DomDOMException.$(OBJEXT)
- -rm -f gnu/xml/dom/DomDOMException.lo
- -rm -f gnu/xml/dom/DomDoctype.$(OBJEXT)
- -rm -f gnu/xml/dom/DomDoctype.lo
- -rm -f gnu/xml/dom/DomDocument.$(OBJEXT)
- -rm -f gnu/xml/dom/DomDocument.lo
- -rm -f gnu/xml/dom/DomDocumentBuilder.$(OBJEXT)
- -rm -f gnu/xml/dom/DomDocumentBuilder.lo
- -rm -f gnu/xml/dom/DomDocumentBuilderFactory.$(OBJEXT)
- -rm -f gnu/xml/dom/DomDocumentBuilderFactory.lo
- -rm -f gnu/xml/dom/DomDocumentConfiguration.$(OBJEXT)
- -rm -f gnu/xml/dom/DomDocumentConfiguration.lo
- -rm -f gnu/xml/dom/DomDocumentFragment.$(OBJEXT)
- -rm -f gnu/xml/dom/DomDocumentFragment.lo
- -rm -f gnu/xml/dom/DomElement.$(OBJEXT)
- -rm -f gnu/xml/dom/DomElement.lo
- -rm -f gnu/xml/dom/DomEntity.$(OBJEXT)
- -rm -f gnu/xml/dom/DomEntity.lo
- -rm -f gnu/xml/dom/DomEntityReference.$(OBJEXT)
- -rm -f gnu/xml/dom/DomEntityReference.lo
- -rm -f gnu/xml/dom/DomEvent.$(OBJEXT)
- -rm -f gnu/xml/dom/DomEvent.lo
- -rm -f gnu/xml/dom/DomExtern.$(OBJEXT)
- -rm -f gnu/xml/dom/DomExtern.lo
- -rm -f gnu/xml/dom/DomImpl.$(OBJEXT)
- -rm -f gnu/xml/dom/DomImpl.lo
- -rm -f gnu/xml/dom/DomIterator.$(OBJEXT)
- -rm -f gnu/xml/dom/DomIterator.lo
- -rm -f gnu/xml/dom/DomNSResolverContext.$(OBJEXT)
- -rm -f gnu/xml/dom/DomNSResolverContext.lo
- -rm -f gnu/xml/dom/DomNamedNodeMap.$(OBJEXT)
- -rm -f gnu/xml/dom/DomNamedNodeMap.lo
- -rm -f gnu/xml/dom/DomNode.$(OBJEXT)
- -rm -f gnu/xml/dom/DomNode.lo
- -rm -f gnu/xml/dom/DomNodeIterator.$(OBJEXT)
- -rm -f gnu/xml/dom/DomNodeIterator.lo
- -rm -f gnu/xml/dom/DomNotation.$(OBJEXT)
- -rm -f gnu/xml/dom/DomNotation.lo
- -rm -f gnu/xml/dom/DomNsNode.$(OBJEXT)
- -rm -f gnu/xml/dom/DomNsNode.lo
- -rm -f gnu/xml/dom/DomProcessingInstruction.$(OBJEXT)
- -rm -f gnu/xml/dom/DomProcessingInstruction.lo
- -rm -f gnu/xml/dom/DomText.$(OBJEXT)
- -rm -f gnu/xml/dom/DomText.lo
- -rm -f gnu/xml/dom/DomXPathExpression.$(OBJEXT)
- -rm -f gnu/xml/dom/DomXPathExpression.lo
- -rm -f gnu/xml/dom/DomXPathNSResolver.$(OBJEXT)
- -rm -f gnu/xml/dom/DomXPathNSResolver.lo
- -rm -f gnu/xml/dom/DomXPathResult.$(OBJEXT)
- -rm -f gnu/xml/dom/DomXPathResult.lo
- -rm -f gnu/xml/dom/ImplementationList.$(OBJEXT)
- -rm -f gnu/xml/dom/ImplementationList.lo
- -rm -f gnu/xml/dom/ImplementationSource.$(OBJEXT)
- -rm -f gnu/xml/dom/ImplementationSource.lo
- -rm -f gnu/xml/dom/JAXPFactory.$(OBJEXT)
- -rm -f gnu/xml/dom/JAXPFactory.lo
- -rm -f gnu/xml/dom/ls/DomLSException.$(OBJEXT)
- -rm -f gnu/xml/dom/ls/DomLSException.lo
- -rm -f gnu/xml/dom/ls/DomLSInput.$(OBJEXT)
- -rm -f gnu/xml/dom/ls/DomLSInput.lo
- -rm -f gnu/xml/dom/ls/DomLSOutput.$(OBJEXT)
- -rm -f gnu/xml/dom/ls/DomLSOutput.lo
- -rm -f gnu/xml/dom/ls/DomLSParser.$(OBJEXT)
- -rm -f gnu/xml/dom/ls/DomLSParser.lo
- -rm -f gnu/xml/dom/ls/DomLSSerializer.$(OBJEXT)
- -rm -f gnu/xml/dom/ls/DomLSSerializer.lo
- -rm -f gnu/xml/dom/ls/FilteredSAXEventSink.$(OBJEXT)
- -rm -f gnu/xml/dom/ls/FilteredSAXEventSink.lo
- -rm -f gnu/xml/dom/ls/ReaderInputStream.$(OBJEXT)
- -rm -f gnu/xml/dom/ls/ReaderInputStream.lo
- -rm -f gnu/xml/dom/ls/SAXEventSink.$(OBJEXT)
- -rm -f gnu/xml/dom/ls/SAXEventSink.lo
- -rm -f gnu/xml/dom/ls/WriterOutputStream.$(OBJEXT)
- -rm -f gnu/xml/dom/ls/WriterOutputStream.lo
- -rm -f gnu/xml/pipeline/CallFilter.$(OBJEXT)
- -rm -f gnu/xml/pipeline/CallFilter.lo
- -rm -f gnu/xml/pipeline/DomConsumer.$(OBJEXT)
- -rm -f gnu/xml/pipeline/DomConsumer.lo
- -rm -f gnu/xml/pipeline/EventConsumer.$(OBJEXT)
- -rm -f gnu/xml/pipeline/EventConsumer.lo
- -rm -f gnu/xml/pipeline/EventFilter.$(OBJEXT)
- -rm -f gnu/xml/pipeline/EventFilter.lo
- -rm -f gnu/xml/pipeline/LinkFilter.$(OBJEXT)
- -rm -f gnu/xml/pipeline/LinkFilter.lo
- -rm -f gnu/xml/pipeline/NSFilter.$(OBJEXT)
- -rm -f gnu/xml/pipeline/NSFilter.lo
- -rm -f gnu/xml/pipeline/PipelineFactory.$(OBJEXT)
- -rm -f gnu/xml/pipeline/PipelineFactory.lo
- -rm -f gnu/xml/pipeline/TeeConsumer.$(OBJEXT)
- -rm -f gnu/xml/pipeline/TeeConsumer.lo
- -rm -f gnu/xml/pipeline/TextConsumer.$(OBJEXT)
- -rm -f gnu/xml/pipeline/TextConsumer.lo
- -rm -f gnu/xml/pipeline/ValidationConsumer.$(OBJEXT)
- -rm -f gnu/xml/pipeline/ValidationConsumer.lo
- -rm -f gnu/xml/pipeline/WellFormednessFilter.$(OBJEXT)
- -rm -f gnu/xml/pipeline/WellFormednessFilter.lo
- -rm -f gnu/xml/pipeline/XIncludeFilter.$(OBJEXT)
- -rm -f gnu/xml/pipeline/XIncludeFilter.lo
- -rm -f gnu/xml/pipeline/XsltFilter.$(OBJEXT)
- -rm -f gnu/xml/pipeline/XsltFilter.lo
- -rm -f gnu/xml/transform/AbstractNumberNode.$(OBJEXT)
- -rm -f gnu/xml/transform/AbstractNumberNode.lo
- -rm -f gnu/xml/transform/ApplyImportsNode.$(OBJEXT)
- -rm -f gnu/xml/transform/ApplyImportsNode.lo
- -rm -f gnu/xml/transform/ApplyTemplatesNode.$(OBJEXT)
- -rm -f gnu/xml/transform/ApplyTemplatesNode.lo
- -rm -f gnu/xml/transform/AttributeNode.$(OBJEXT)
- -rm -f gnu/xml/transform/AttributeNode.lo
- -rm -f gnu/xml/transform/AttributeSet.$(OBJEXT)
- -rm -f gnu/xml/transform/AttributeSet.lo
- -rm -f gnu/xml/transform/Bindings.$(OBJEXT)
- -rm -f gnu/xml/transform/Bindings.lo
- -rm -f gnu/xml/transform/CallTemplateNode.$(OBJEXT)
- -rm -f gnu/xml/transform/CallTemplateNode.lo
- -rm -f gnu/xml/transform/ChooseNode.$(OBJEXT)
- -rm -f gnu/xml/transform/ChooseNode.lo
- -rm -f gnu/xml/transform/CommentNode.$(OBJEXT)
- -rm -f gnu/xml/transform/CommentNode.lo
- -rm -f gnu/xml/transform/CopyNode.$(OBJEXT)
- -rm -f gnu/xml/transform/CopyNode.lo
- -rm -f gnu/xml/transform/CopyOfNode.$(OBJEXT)
- -rm -f gnu/xml/transform/CopyOfNode.lo
- -rm -f gnu/xml/transform/CurrentFunction.$(OBJEXT)
- -rm -f gnu/xml/transform/CurrentFunction.lo
- -rm -f gnu/xml/transform/DOMSourceLocator.$(OBJEXT)
- -rm -f gnu/xml/transform/DOMSourceLocator.lo
- -rm -f gnu/xml/transform/DocumentFunction.$(OBJEXT)
- -rm -f gnu/xml/transform/DocumentFunction.lo
- -rm -f gnu/xml/transform/ElementAvailableFunction.$(OBJEXT)
- -rm -f gnu/xml/transform/ElementAvailableFunction.lo
- -rm -f gnu/xml/transform/ElementNode.$(OBJEXT)
- -rm -f gnu/xml/transform/ElementNode.lo
- -rm -f gnu/xml/transform/ErrorListenerErrorHandler.$(OBJEXT)
- -rm -f gnu/xml/transform/ErrorListenerErrorHandler.lo
- -rm -f gnu/xml/transform/ForEachNode.$(OBJEXT)
- -rm -f gnu/xml/transform/ForEachNode.lo
- -rm -f gnu/xml/transform/FormatNumberFunction.$(OBJEXT)
- -rm -f gnu/xml/transform/FormatNumberFunction.lo
- -rm -f gnu/xml/transform/FunctionAvailableFunction.$(OBJEXT)
- -rm -f gnu/xml/transform/FunctionAvailableFunction.lo
- -rm -f gnu/xml/transform/GenerateIdFunction.$(OBJEXT)
- -rm -f gnu/xml/transform/GenerateIdFunction.lo
- -rm -f gnu/xml/transform/IfNode.$(OBJEXT)
- -rm -f gnu/xml/transform/IfNode.lo
- -rm -f gnu/xml/transform/Key.$(OBJEXT)
- -rm -f gnu/xml/transform/Key.lo
- -rm -f gnu/xml/transform/KeyFunction.$(OBJEXT)
- -rm -f gnu/xml/transform/KeyFunction.lo
- -rm -f gnu/xml/transform/LiteralNode.$(OBJEXT)
- -rm -f gnu/xml/transform/LiteralNode.lo
- -rm -f gnu/xml/transform/MessageNode.$(OBJEXT)
- -rm -f gnu/xml/transform/MessageNode.lo
- -rm -f gnu/xml/transform/NodeNumberNode.$(OBJEXT)
- -rm -f gnu/xml/transform/NodeNumberNode.lo
- -rm -f gnu/xml/transform/NumberNode.$(OBJEXT)
- -rm -f gnu/xml/transform/NumberNode.lo
- -rm -f gnu/xml/transform/OtherwiseNode.$(OBJEXT)
- -rm -f gnu/xml/transform/OtherwiseNode.lo
- -rm -f gnu/xml/transform/ParameterNode.$(OBJEXT)
- -rm -f gnu/xml/transform/ParameterNode.lo
- -rm -f gnu/xml/transform/ProcessingInstructionNode.$(OBJEXT)
- -rm -f gnu/xml/transform/ProcessingInstructionNode.lo
- -rm -f gnu/xml/transform/SAXSerializer.$(OBJEXT)
- -rm -f gnu/xml/transform/SAXSerializer.lo
- -rm -f gnu/xml/transform/SortKey.$(OBJEXT)
- -rm -f gnu/xml/transform/SortKey.lo
- -rm -f gnu/xml/transform/StreamSerializer.$(OBJEXT)
- -rm -f gnu/xml/transform/StreamSerializer.lo
- -rm -f gnu/xml/transform/Stylesheet.$(OBJEXT)
- -rm -f gnu/xml/transform/Stylesheet.lo
- -rm -f gnu/xml/transform/SystemPropertyFunction.$(OBJEXT)
- -rm -f gnu/xml/transform/SystemPropertyFunction.lo
- -rm -f gnu/xml/transform/Template.$(OBJEXT)
- -rm -f gnu/xml/transform/Template.lo
- -rm -f gnu/xml/transform/TemplateNode.$(OBJEXT)
- -rm -f gnu/xml/transform/TemplateNode.lo
- -rm -f gnu/xml/transform/TemplatesImpl.$(OBJEXT)
- -rm -f gnu/xml/transform/TemplatesImpl.lo
- -rm -f gnu/xml/transform/TextNode.$(OBJEXT)
- -rm -f gnu/xml/transform/TextNode.lo
- -rm -f gnu/xml/transform/TransformerFactoryImpl.$(OBJEXT)
- -rm -f gnu/xml/transform/TransformerFactoryImpl.lo
- -rm -f gnu/xml/transform/TransformerImpl.$(OBJEXT)
- -rm -f gnu/xml/transform/TransformerImpl.lo
- -rm -f gnu/xml/transform/TransformerOutputProperties.$(OBJEXT)
- -rm -f gnu/xml/transform/TransformerOutputProperties.lo
- -rm -f gnu/xml/transform/URIResolverEntityResolver.$(OBJEXT)
- -rm -f gnu/xml/transform/URIResolverEntityResolver.lo
- -rm -f gnu/xml/transform/UnparsedEntityUriFunction.$(OBJEXT)
- -rm -f gnu/xml/transform/UnparsedEntityUriFunction.lo
- -rm -f gnu/xml/transform/ValueOfNode.$(OBJEXT)
- -rm -f gnu/xml/transform/ValueOfNode.lo
- -rm -f gnu/xml/transform/WhenNode.$(OBJEXT)
- -rm -f gnu/xml/transform/WhenNode.lo
- -rm -f gnu/xml/transform/WithParam.$(OBJEXT)
- -rm -f gnu/xml/transform/WithParam.lo
- -rm -f gnu/xml/transform/XSLComparator.$(OBJEXT)
- -rm -f gnu/xml/transform/XSLComparator.lo
- -rm -f gnu/xml/transform/XSLURIResolver.$(OBJEXT)
- -rm -f gnu/xml/transform/XSLURIResolver.lo
- -rm -f gnu/xml/util/DoParse.$(OBJEXT)
- -rm -f gnu/xml/util/DoParse.lo
- -rm -f gnu/xml/util/DomParser.$(OBJEXT)
- -rm -f gnu/xml/util/DomParser.lo
- -rm -f gnu/xml/util/Resolver.$(OBJEXT)
- -rm -f gnu/xml/util/Resolver.lo
- -rm -f gnu/xml/util/SAXNullTransformerFactory.$(OBJEXT)
- -rm -f gnu/xml/util/SAXNullTransformerFactory.lo
- -rm -f gnu/xml/util/XCat.$(OBJEXT)
- -rm -f gnu/xml/util/XCat.lo
- -rm -f gnu/xml/util/XHTMLWriter.$(OBJEXT)
- -rm -f gnu/xml/util/XHTMLWriter.lo
- -rm -f gnu/xml/util/XMLWriter.$(OBJEXT)
- -rm -f gnu/xml/util/XMLWriter.lo
- -rm -f gnu/xml/xpath/AndExpr.$(OBJEXT)
- -rm -f gnu/xml/xpath/AndExpr.lo
- -rm -f gnu/xml/xpath/ArithmeticExpr.$(OBJEXT)
- -rm -f gnu/xml/xpath/ArithmeticExpr.lo
- -rm -f gnu/xml/xpath/BooleanFunction.$(OBJEXT)
- -rm -f gnu/xml/xpath/BooleanFunction.lo
- -rm -f gnu/xml/xpath/CeilingFunction.$(OBJEXT)
- -rm -f gnu/xml/xpath/CeilingFunction.lo
- -rm -f gnu/xml/xpath/ConcatFunction.$(OBJEXT)
- -rm -f gnu/xml/xpath/ConcatFunction.lo
- -rm -f gnu/xml/xpath/Constant.$(OBJEXT)
- -rm -f gnu/xml/xpath/Constant.lo
- -rm -f gnu/xml/xpath/ContainsFunction.$(OBJEXT)
- -rm -f gnu/xml/xpath/ContainsFunction.lo
- -rm -f gnu/xml/xpath/CountFunction.$(OBJEXT)
- -rm -f gnu/xml/xpath/CountFunction.lo
- -rm -f gnu/xml/xpath/DocumentOrderComparator.$(OBJEXT)
- -rm -f gnu/xml/xpath/DocumentOrderComparator.lo
- -rm -f gnu/xml/xpath/EqualityExpr.$(OBJEXT)
- -rm -f gnu/xml/xpath/EqualityExpr.lo
- -rm -f gnu/xml/xpath/Expr.$(OBJEXT)
- -rm -f gnu/xml/xpath/Expr.lo
- -rm -f gnu/xml/xpath/FalseFunction.$(OBJEXT)
- -rm -f gnu/xml/xpath/FalseFunction.lo
- -rm -f gnu/xml/xpath/FloorFunction.$(OBJEXT)
- -rm -f gnu/xml/xpath/FloorFunction.lo
- -rm -f gnu/xml/xpath/Function.$(OBJEXT)
- -rm -f gnu/xml/xpath/Function.lo
- -rm -f gnu/xml/xpath/FunctionCall.$(OBJEXT)
- -rm -f gnu/xml/xpath/FunctionCall.lo
- -rm -f gnu/xml/xpath/IdFunction.$(OBJEXT)
- -rm -f gnu/xml/xpath/IdFunction.lo
- -rm -f gnu/xml/xpath/LangFunction.$(OBJEXT)
- -rm -f gnu/xml/xpath/LangFunction.lo
- -rm -f gnu/xml/xpath/LastFunction.$(OBJEXT)
- -rm -f gnu/xml/xpath/LastFunction.lo
- -rm -f gnu/xml/xpath/LocalNameFunction.$(OBJEXT)
- -rm -f gnu/xml/xpath/LocalNameFunction.lo
- -rm -f gnu/xml/xpath/NameFunction.$(OBJEXT)
- -rm -f gnu/xml/xpath/NameFunction.lo
- -rm -f gnu/xml/xpath/NameTest.$(OBJEXT)
- -rm -f gnu/xml/xpath/NameTest.lo
- -rm -f gnu/xml/xpath/NamespaceTest.$(OBJEXT)
- -rm -f gnu/xml/xpath/NamespaceTest.lo
- -rm -f gnu/xml/xpath/NamespaceUriFunction.$(OBJEXT)
- -rm -f gnu/xml/xpath/NamespaceUriFunction.lo
- -rm -f gnu/xml/xpath/NegativeExpr.$(OBJEXT)
- -rm -f gnu/xml/xpath/NegativeExpr.lo
- -rm -f gnu/xml/xpath/NodeTypeTest.$(OBJEXT)
- -rm -f gnu/xml/xpath/NodeTypeTest.lo
- -rm -f gnu/xml/xpath/NormalizeSpaceFunction.$(OBJEXT)
- -rm -f gnu/xml/xpath/NormalizeSpaceFunction.lo
- -rm -f gnu/xml/xpath/NotFunction.$(OBJEXT)
- -rm -f gnu/xml/xpath/NotFunction.lo
- -rm -f gnu/xml/xpath/NumberFunction.$(OBJEXT)
- -rm -f gnu/xml/xpath/NumberFunction.lo
- -rm -f gnu/xml/xpath/OrExpr.$(OBJEXT)
- -rm -f gnu/xml/xpath/OrExpr.lo
- -rm -f gnu/xml/xpath/ParenthesizedExpr.$(OBJEXT)
- -rm -f gnu/xml/xpath/ParenthesizedExpr.lo
- -rm -f gnu/xml/xpath/Path.$(OBJEXT)
- -rm -f gnu/xml/xpath/Path.lo
- -rm -f gnu/xml/xpath/Pattern.$(OBJEXT)
- -rm -f gnu/xml/xpath/Pattern.lo
- -rm -f gnu/xml/xpath/PositionFunction.$(OBJEXT)
- -rm -f gnu/xml/xpath/PositionFunction.lo
- -rm -f gnu/xml/xpath/Predicate.$(OBJEXT)
- -rm -f gnu/xml/xpath/Predicate.lo
- -rm -f gnu/xml/xpath/RelationalExpr.$(OBJEXT)
- -rm -f gnu/xml/xpath/RelationalExpr.lo
- -rm -f gnu/xml/xpath/Root.$(OBJEXT)
- -rm -f gnu/xml/xpath/Root.lo
- -rm -f gnu/xml/xpath/RoundFunction.$(OBJEXT)
- -rm -f gnu/xml/xpath/RoundFunction.lo
- -rm -f gnu/xml/xpath/Selector.$(OBJEXT)
- -rm -f gnu/xml/xpath/Selector.lo
- -rm -f gnu/xml/xpath/StartsWithFunction.$(OBJEXT)
- -rm -f gnu/xml/xpath/StartsWithFunction.lo
- -rm -f gnu/xml/xpath/Steps.$(OBJEXT)
- -rm -f gnu/xml/xpath/Steps.lo
- -rm -f gnu/xml/xpath/StringFunction.$(OBJEXT)
- -rm -f gnu/xml/xpath/StringFunction.lo
- -rm -f gnu/xml/xpath/StringLengthFunction.$(OBJEXT)
- -rm -f gnu/xml/xpath/StringLengthFunction.lo
- -rm -f gnu/xml/xpath/SubstringAfterFunction.$(OBJEXT)
- -rm -f gnu/xml/xpath/SubstringAfterFunction.lo
- -rm -f gnu/xml/xpath/SubstringBeforeFunction.$(OBJEXT)
- -rm -f gnu/xml/xpath/SubstringBeforeFunction.lo
- -rm -f gnu/xml/xpath/SubstringFunction.$(OBJEXT)
- -rm -f gnu/xml/xpath/SubstringFunction.lo
- -rm -f gnu/xml/xpath/SumFunction.$(OBJEXT)
- -rm -f gnu/xml/xpath/SumFunction.lo
- -rm -f gnu/xml/xpath/Test.$(OBJEXT)
- -rm -f gnu/xml/xpath/Test.lo
- -rm -f gnu/xml/xpath/TranslateFunction.$(OBJEXT)
- -rm -f gnu/xml/xpath/TranslateFunction.lo
- -rm -f gnu/xml/xpath/TrueFunction.$(OBJEXT)
- -rm -f gnu/xml/xpath/TrueFunction.lo
- -rm -f gnu/xml/xpath/UnionExpr.$(OBJEXT)
- -rm -f gnu/xml/xpath/UnionExpr.lo
- -rm -f gnu/xml/xpath/VariableReference.$(OBJEXT)
- -rm -f gnu/xml/xpath/VariableReference.lo
- -rm -f gnu/xml/xpath/XPathFactoryImpl.$(OBJEXT)
- -rm -f gnu/xml/xpath/XPathFactoryImpl.lo
- -rm -f gnu/xml/xpath/XPathImpl.$(OBJEXT)
- -rm -f gnu/xml/xpath/XPathImpl.lo
- -rm -f gnu/xml/xpath/XPathParser.$(OBJEXT)
- -rm -f gnu/xml/xpath/XPathParser.lo
- -rm -f gnu/xml/xpath/XPathTokenizer.$(OBJEXT)
- -rm -f gnu/xml/xpath/XPathTokenizer.lo
-rm -f java/applet/Applet.$(OBJEXT)
-rm -f java/applet/Applet.lo
-rm -f java/applet/AppletContext.$(OBJEXT)
@@ -20210,98 +18285,6 @@ mostlyclean-compile:
-rm -f javax/crypto/spec/RC5ParameterSpec.lo
-rm -f javax/crypto/spec/SecretKeySpec.$(OBJEXT)
-rm -f javax/crypto/spec/SecretKeySpec.lo
- -rm -f javax/imageio/IIOException.$(OBJEXT)
- -rm -f javax/imageio/IIOException.lo
- -rm -f javax/imageio/IIOImage.$(OBJEXT)
- -rm -f javax/imageio/IIOImage.lo
- -rm -f javax/imageio/IIOParam.$(OBJEXT)
- -rm -f javax/imageio/IIOParam.lo
- -rm -f javax/imageio/IIOParamController.$(OBJEXT)
- -rm -f javax/imageio/IIOParamController.lo
- -rm -f javax/imageio/ImageIO.$(OBJEXT)
- -rm -f javax/imageio/ImageIO.lo
- -rm -f javax/imageio/ImageReadParam.$(OBJEXT)
- -rm -f javax/imageio/ImageReadParam.lo
- -rm -f javax/imageio/ImageReader.$(OBJEXT)
- -rm -f javax/imageio/ImageReader.lo
- -rm -f javax/imageio/ImageTranscoder.$(OBJEXT)
- -rm -f javax/imageio/ImageTranscoder.lo
- -rm -f javax/imageio/ImageTypeSpecifier.$(OBJEXT)
- -rm -f javax/imageio/ImageTypeSpecifier.lo
- -rm -f javax/imageio/ImageWriteParam.$(OBJEXT)
- -rm -f javax/imageio/ImageWriteParam.lo
- -rm -f javax/imageio/ImageWriter.$(OBJEXT)
- -rm -f javax/imageio/ImageWriter.lo
- -rm -f javax/imageio/event/IIOReadProgressListener.$(OBJEXT)
- -rm -f javax/imageio/event/IIOReadProgressListener.lo
- -rm -f javax/imageio/event/IIOReadUpdateListener.$(OBJEXT)
- -rm -f javax/imageio/event/IIOReadUpdateListener.lo
- -rm -f javax/imageio/event/IIOReadWarningListener.$(OBJEXT)
- -rm -f javax/imageio/event/IIOReadWarningListener.lo
- -rm -f javax/imageio/event/IIOWriteProgressListener.$(OBJEXT)
- -rm -f javax/imageio/event/IIOWriteProgressListener.lo
- -rm -f javax/imageio/event/IIOWriteWarningListener.$(OBJEXT)
- -rm -f javax/imageio/event/IIOWriteWarningListener.lo
- -rm -f javax/imageio/metadata/IIOAttr.$(OBJEXT)
- -rm -f javax/imageio/metadata/IIOAttr.lo
- -rm -f javax/imageio/metadata/IIOInvalidTreeException.$(OBJEXT)
- -rm -f javax/imageio/metadata/IIOInvalidTreeException.lo
- -rm -f javax/imageio/metadata/IIOMetadata.$(OBJEXT)
- -rm -f javax/imageio/metadata/IIOMetadata.lo
- -rm -f javax/imageio/metadata/IIOMetadataController.$(OBJEXT)
- -rm -f javax/imageio/metadata/IIOMetadataController.lo
- -rm -f javax/imageio/metadata/IIOMetadataFormat.$(OBJEXT)
- -rm -f javax/imageio/metadata/IIOMetadataFormat.lo
- -rm -f javax/imageio/metadata/IIOMetadataFormatImpl.$(OBJEXT)
- -rm -f javax/imageio/metadata/IIOMetadataFormatImpl.lo
- -rm -f javax/imageio/metadata/IIOMetadataNode.$(OBJEXT)
- -rm -f javax/imageio/metadata/IIOMetadataNode.lo
- -rm -f javax/imageio/metadata/IIONamedNodeMap.$(OBJEXT)
- -rm -f javax/imageio/metadata/IIONamedNodeMap.lo
- -rm -f javax/imageio/metadata/IIONodeList.$(OBJEXT)
- -rm -f javax/imageio/metadata/IIONodeList.lo
- -rm -f javax/imageio/spi/IIORegistry.$(OBJEXT)
- -rm -f javax/imageio/spi/IIORegistry.lo
- -rm -f javax/imageio/spi/IIOServiceProvider.$(OBJEXT)
- -rm -f javax/imageio/spi/IIOServiceProvider.lo
- -rm -f javax/imageio/spi/ImageInputStreamSpi.$(OBJEXT)
- -rm -f javax/imageio/spi/ImageInputStreamSpi.lo
- -rm -f javax/imageio/spi/ImageOutputStreamSpi.$(OBJEXT)
- -rm -f javax/imageio/spi/ImageOutputStreamSpi.lo
- -rm -f javax/imageio/spi/ImageReaderSpi.$(OBJEXT)
- -rm -f javax/imageio/spi/ImageReaderSpi.lo
- -rm -f javax/imageio/spi/ImageReaderWriterSpi.$(OBJEXT)
- -rm -f javax/imageio/spi/ImageReaderWriterSpi.lo
- -rm -f javax/imageio/spi/ImageTranscoderSpi.$(OBJEXT)
- -rm -f javax/imageio/spi/ImageTranscoderSpi.lo
- -rm -f javax/imageio/spi/ImageWriterSpi.$(OBJEXT)
- -rm -f javax/imageio/spi/ImageWriterSpi.lo
- -rm -f javax/imageio/spi/RegisterableService.$(OBJEXT)
- -rm -f javax/imageio/spi/RegisterableService.lo
- -rm -f javax/imageio/spi/ServiceRegistry.$(OBJEXT)
- -rm -f javax/imageio/spi/ServiceRegistry.lo
- -rm -f javax/imageio/stream/FileCacheImageInputStream.$(OBJEXT)
- -rm -f javax/imageio/stream/FileCacheImageInputStream.lo
- -rm -f javax/imageio/stream/FileCacheImageOutputStream.$(OBJEXT)
- -rm -f javax/imageio/stream/FileCacheImageOutputStream.lo
- -rm -f javax/imageio/stream/FileImageInputStream.$(OBJEXT)
- -rm -f javax/imageio/stream/FileImageInputStream.lo
- -rm -f javax/imageio/stream/FileImageOutputStream.$(OBJEXT)
- -rm -f javax/imageio/stream/FileImageOutputStream.lo
- -rm -f javax/imageio/stream/IIOByteBuffer.$(OBJEXT)
- -rm -f javax/imageio/stream/IIOByteBuffer.lo
- -rm -f javax/imageio/stream/ImageInputStream.$(OBJEXT)
- -rm -f javax/imageio/stream/ImageInputStream.lo
- -rm -f javax/imageio/stream/ImageInputStreamImpl.$(OBJEXT)
- -rm -f javax/imageio/stream/ImageInputStreamImpl.lo
- -rm -f javax/imageio/stream/ImageOutputStream.$(OBJEXT)
- -rm -f javax/imageio/stream/ImageOutputStream.lo
- -rm -f javax/imageio/stream/ImageOutputStreamImpl.$(OBJEXT)
- -rm -f javax/imageio/stream/ImageOutputStreamImpl.lo
- -rm -f javax/imageio/stream/MemoryCacheImageInputStream.$(OBJEXT)
- -rm -f javax/imageio/stream/MemoryCacheImageInputStream.lo
- -rm -f javax/imageio/stream/MemoryCacheImageOutputStream.$(OBJEXT)
- -rm -f javax/imageio/stream/MemoryCacheImageOutputStream.lo
-rm -f javax/naming/AuthenticationException.$(OBJEXT)
-rm -f javax/naming/AuthenticationException.lo
-rm -f javax/naming/AuthenticationNotSupportedException.$(OBJEXT)
@@ -21664,110 +19647,6 @@ mostlyclean-compile:
-rm -f javax/transaction/xa/XAResource.lo
-rm -f javax/transaction/xa/Xid.$(OBJEXT)
-rm -f javax/transaction/xa/Xid.lo
- -rm -f javax/xml/XMLConstants.$(OBJEXT)
- -rm -f javax/xml/XMLConstants.lo
- -rm -f javax/xml/datatype/DatatypeConfigurationException.$(OBJEXT)
- -rm -f javax/xml/datatype/DatatypeConfigurationException.lo
- -rm -f javax/xml/datatype/DatatypeConstants.$(OBJEXT)
- -rm -f javax/xml/datatype/DatatypeConstants.lo
- -rm -f javax/xml/datatype/DatatypeFactory.$(OBJEXT)
- -rm -f javax/xml/datatype/DatatypeFactory.lo
- -rm -f javax/xml/datatype/Duration.$(OBJEXT)
- -rm -f javax/xml/datatype/Duration.lo
- -rm -f javax/xml/datatype/XMLGregorianCalendar.$(OBJEXT)
- -rm -f javax/xml/datatype/XMLGregorianCalendar.lo
- -rm -f javax/xml/namespace/NamespaceContext.$(OBJEXT)
- -rm -f javax/xml/namespace/NamespaceContext.lo
- -rm -f javax/xml/namespace/QName.$(OBJEXT)
- -rm -f javax/xml/namespace/QName.lo
- -rm -f javax/xml/parsers/DocumentBuilder.$(OBJEXT)
- -rm -f javax/xml/parsers/DocumentBuilder.lo
- -rm -f javax/xml/parsers/DocumentBuilderFactory.$(OBJEXT)
- -rm -f javax/xml/parsers/DocumentBuilderFactory.lo
- -rm -f javax/xml/parsers/FactoryConfigurationError.$(OBJEXT)
- -rm -f javax/xml/parsers/FactoryConfigurationError.lo
- -rm -f javax/xml/parsers/ParserConfigurationException.$(OBJEXT)
- -rm -f javax/xml/parsers/ParserConfigurationException.lo
- -rm -f javax/xml/parsers/SAXParser.$(OBJEXT)
- -rm -f javax/xml/parsers/SAXParser.lo
- -rm -f javax/xml/parsers/SAXParserFactory.$(OBJEXT)
- -rm -f javax/xml/parsers/SAXParserFactory.lo
- -rm -f javax/xml/transform/ErrorListener.$(OBJEXT)
- -rm -f javax/xml/transform/ErrorListener.lo
- -rm -f javax/xml/transform/OutputKeys.$(OBJEXT)
- -rm -f javax/xml/transform/OutputKeys.lo
- -rm -f javax/xml/transform/Result.$(OBJEXT)
- -rm -f javax/xml/transform/Result.lo
- -rm -f javax/xml/transform/Source.$(OBJEXT)
- -rm -f javax/xml/transform/Source.lo
- -rm -f javax/xml/transform/SourceLocator.$(OBJEXT)
- -rm -f javax/xml/transform/SourceLocator.lo
- -rm -f javax/xml/transform/Templates.$(OBJEXT)
- -rm -f javax/xml/transform/Templates.lo
- -rm -f javax/xml/transform/Transformer.$(OBJEXT)
- -rm -f javax/xml/transform/Transformer.lo
- -rm -f javax/xml/transform/TransformerConfigurationException.$(OBJEXT)
- -rm -f javax/xml/transform/TransformerConfigurationException.lo
- -rm -f javax/xml/transform/TransformerException.$(OBJEXT)
- -rm -f javax/xml/transform/TransformerException.lo
- -rm -f javax/xml/transform/TransformerFactory.$(OBJEXT)
- -rm -f javax/xml/transform/TransformerFactory.lo
- -rm -f javax/xml/transform/TransformerFactoryConfigurationError.$(OBJEXT)
- -rm -f javax/xml/transform/TransformerFactoryConfigurationError.lo
- -rm -f javax/xml/transform/URIResolver.$(OBJEXT)
- -rm -f javax/xml/transform/URIResolver.lo
- -rm -f javax/xml/transform/dom/DOMLocator.$(OBJEXT)
- -rm -f javax/xml/transform/dom/DOMLocator.lo
- -rm -f javax/xml/transform/dom/DOMResult.$(OBJEXT)
- -rm -f javax/xml/transform/dom/DOMResult.lo
- -rm -f javax/xml/transform/dom/DOMSource.$(OBJEXT)
- -rm -f javax/xml/transform/dom/DOMSource.lo
- -rm -f javax/xml/transform/sax/SAXResult.$(OBJEXT)
- -rm -f javax/xml/transform/sax/SAXResult.lo
- -rm -f javax/xml/transform/sax/SAXSource.$(OBJEXT)
- -rm -f javax/xml/transform/sax/SAXSource.lo
- -rm -f javax/xml/transform/sax/SAXTransformerFactory.$(OBJEXT)
- -rm -f javax/xml/transform/sax/SAXTransformerFactory.lo
- -rm -f javax/xml/transform/sax/TemplatesHandler.$(OBJEXT)
- -rm -f javax/xml/transform/sax/TemplatesHandler.lo
- -rm -f javax/xml/transform/sax/TransformerHandler.$(OBJEXT)
- -rm -f javax/xml/transform/sax/TransformerHandler.lo
- -rm -f javax/xml/transform/stream/StreamResult.$(OBJEXT)
- -rm -f javax/xml/transform/stream/StreamResult.lo
- -rm -f javax/xml/transform/stream/StreamSource.$(OBJEXT)
- -rm -f javax/xml/transform/stream/StreamSource.lo
- -rm -f javax/xml/validation/Schema.$(OBJEXT)
- -rm -f javax/xml/validation/Schema.lo
- -rm -f javax/xml/validation/SchemaFactory.$(OBJEXT)
- -rm -f javax/xml/validation/SchemaFactory.lo
- -rm -f javax/xml/validation/TypeInfoProvider.$(OBJEXT)
- -rm -f javax/xml/validation/TypeInfoProvider.lo
- -rm -f javax/xml/validation/Validator.$(OBJEXT)
- -rm -f javax/xml/validation/Validator.lo
- -rm -f javax/xml/validation/ValidatorHandler.$(OBJEXT)
- -rm -f javax/xml/validation/ValidatorHandler.lo
- -rm -f javax/xml/xpath/XPath.$(OBJEXT)
- -rm -f javax/xml/xpath/XPath.lo
- -rm -f javax/xml/xpath/XPathConstants.$(OBJEXT)
- -rm -f javax/xml/xpath/XPathConstants.lo
- -rm -f javax/xml/xpath/XPathException.$(OBJEXT)
- -rm -f javax/xml/xpath/XPathException.lo
- -rm -f javax/xml/xpath/XPathExpression.$(OBJEXT)
- -rm -f javax/xml/xpath/XPathExpression.lo
- -rm -f javax/xml/xpath/XPathExpressionException.$(OBJEXT)
- -rm -f javax/xml/xpath/XPathExpressionException.lo
- -rm -f javax/xml/xpath/XPathFactory.$(OBJEXT)
- -rm -f javax/xml/xpath/XPathFactory.lo
- -rm -f javax/xml/xpath/XPathFactoryConfigurationException.$(OBJEXT)
- -rm -f javax/xml/xpath/XPathFactoryConfigurationException.lo
- -rm -f javax/xml/xpath/XPathFunction.$(OBJEXT)
- -rm -f javax/xml/xpath/XPathFunction.lo
- -rm -f javax/xml/xpath/XPathFunctionException.$(OBJEXT)
- -rm -f javax/xml/xpath/XPathFunctionException.lo
- -rm -f javax/xml/xpath/XPathFunctionResolver.$(OBJEXT)
- -rm -f javax/xml/xpath/XPathFunctionResolver.lo
- -rm -f javax/xml/xpath/XPathVariableResolver.$(OBJEXT)
- -rm -f javax/xml/xpath/XPathVariableResolver.lo
-rm -f jni/classpath/lib_gnu_java_awt_peer_gtk_la-native_state.$(OBJEXT)
-rm -f jni/classpath/lib_gnu_java_awt_peer_gtk_la-native_state.lo
-rm -f jni/gtk-peer/lib_gnu_java_awt_peer_gtk_la-gnu_java_awt_peer_gtk_GThreadNativeMethodRunner.$(OBJEXT)
@@ -21948,8 +19827,10 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/io/$(DEPDIR)/SimpleSHSStream.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/io/$(DEPDIR)/natSimpleSHSStream.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/io/$(DEPDIR)/shs.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/runtime/$(DEPDIR)/BootClassLoader.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/runtime/$(DEPDIR)/FileDeleter.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/runtime/$(DEPDIR)/FinalizerThread.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/runtime/$(DEPDIR)/HelperClassLoader.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/runtime/$(DEPDIR)/JNIWeakRef.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/runtime/$(DEPDIR)/NameFinder.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/runtime/$(DEPDIR)/PersistentByteMap.Plo@am__quote@
@@ -21963,6 +19844,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/runtime/$(DEPDIR)/natStringBuffer.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/runtime/$(DEPDIR)/natVMClassLoader.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/tools/gcj_dbtool/$(DEPDIR)/Main.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/tools/gcj_dbtool/$(DEPDIR)/natMain.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/util/$(DEPDIR)/Debug.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/util/$(DEPDIR)/natDebug.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/xlib/$(DEPDIR)/Clip.Plo@am__quote@
@@ -22080,58 +19962,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/awt/peer/gtk/$(DEPDIR)/lib_gnu_java_awt_peer_gtk_la-GtkTextFieldPeer.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/awt/peer/gtk/$(DEPDIR)/lib_gnu_java_awt_peer_gtk_la-GtkToolkit.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/awt/peer/gtk/$(DEPDIR)/lib_gnu_java_awt_peer_gtk_la-GtkWindowPeer.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/$(DEPDIR)/BeanInfoEmbryo.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/$(DEPDIR)/DummyAppletContext.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/$(DEPDIR)/DummyAppletStub.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/$(DEPDIR)/ExplicitBeanInfo.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/$(DEPDIR)/IntrospectionIncubator.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/decoder/$(DEPDIR)/AbstractContext.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/decoder/$(DEPDIR)/AbstractCreatableObjectContext.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/decoder/$(DEPDIR)/AbstractElementHandler.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/decoder/$(DEPDIR)/AbstractObjectContext.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/decoder/$(DEPDIR)/ArrayContext.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/decoder/$(DEPDIR)/ArrayHandler.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/decoder/$(DEPDIR)/AssemblyException.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/decoder/$(DEPDIR)/BooleanHandler.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/decoder/$(DEPDIR)/ByteHandler.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/decoder/$(DEPDIR)/CharHandler.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/decoder/$(DEPDIR)/ClassHandler.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/decoder/$(DEPDIR)/ConstructorContext.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/decoder/$(DEPDIR)/Context.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/decoder/$(DEPDIR)/DecoderContext.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/decoder/$(DEPDIR)/DefaultExceptionListener.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/decoder/$(DEPDIR)/DoubleHandler.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/decoder/$(DEPDIR)/DummyContext.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/decoder/$(DEPDIR)/DummyHandler.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/decoder/$(DEPDIR)/ElementHandler.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/decoder/$(DEPDIR)/FloatHandler.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/decoder/$(DEPDIR)/GrowableArrayContext.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/decoder/$(DEPDIR)/IndexContext.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/decoder/$(DEPDIR)/IntHandler.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/decoder/$(DEPDIR)/JavaHandler.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/decoder/$(DEPDIR)/LongHandler.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/decoder/$(DEPDIR)/MethodContext.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/decoder/$(DEPDIR)/MethodFinder.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/decoder/$(DEPDIR)/NullHandler.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/decoder/$(DEPDIR)/ObjectContext.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/decoder/$(DEPDIR)/ObjectHandler.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/decoder/$(DEPDIR)/PersistenceParser.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/decoder/$(DEPDIR)/PropertyContext.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/decoder/$(DEPDIR)/ShortHandler.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/decoder/$(DEPDIR)/SimpleHandler.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/decoder/$(DEPDIR)/StaticMethodContext.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/decoder/$(DEPDIR)/StringHandler.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/decoder/$(DEPDIR)/VoidHandler.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/editors/$(DEPDIR)/ColorEditor.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/editors/$(DEPDIR)/FontEditor.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/editors/$(DEPDIR)/NativeBooleanEditor.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/editors/$(DEPDIR)/NativeByteEditor.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/editors/$(DEPDIR)/NativeDoubleEditor.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/editors/$(DEPDIR)/NativeFloatEditor.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/editors/$(DEPDIR)/NativeIntEditor.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/editors/$(DEPDIR)/NativeLongEditor.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/editors/$(DEPDIR)/NativeShortEditor.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/beans/editors/$(DEPDIR)/StringEditor.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/io/$(DEPDIR)/ASN1ParsingException.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/io/$(DEPDIR)/Base64InputStream.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gnu/java/io/$(DEPDIR)/ClassLoaderObjectInputStream.Plo@am__quote@
@@ -22520,180 +20350,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@gnu/regexp/$(DEPDIR)/RETokenStart.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gnu/regexp/$(DEPDIR)/RETokenWordBoundary.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gnu/regexp/$(DEPDIR)/UncheckedRE.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/aelfred2/$(DEPDIR)/ContentHandler2.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/aelfred2/$(DEPDIR)/JAXPFactory.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/aelfred2/$(DEPDIR)/SAXDriver.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/aelfred2/$(DEPDIR)/XmlParser.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/aelfred2/$(DEPDIR)/XmlReader.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/Consumer.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DTDAttributeTypeInfo.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DTDElementTypeInfo.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomAttr.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomCDATASection.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomCharacterData.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomComment.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomDOMException.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomDoctype.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomDocument.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomDocumentBuilder.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomDocumentBuilderFactory.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomDocumentConfiguration.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomDocumentFragment.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomEntity.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomEntityReference.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomEvent.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomExtern.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomImpl.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomIterator.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomNSResolverContext.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomNamedNodeMap.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomNode.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomNodeIterator.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomNotation.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomNsNode.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomProcessingInstruction.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomText.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomXPathExpression.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomXPathNSResolver.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/DomXPathResult.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/ImplementationList.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/ImplementationSource.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/$(DEPDIR)/JAXPFactory.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/ls/$(DEPDIR)/DomLSException.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/ls/$(DEPDIR)/DomLSInput.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/ls/$(DEPDIR)/DomLSOutput.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/ls/$(DEPDIR)/DomLSParser.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/ls/$(DEPDIR)/DomLSSerializer.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/ls/$(DEPDIR)/FilteredSAXEventSink.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/ls/$(DEPDIR)/ReaderInputStream.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/ls/$(DEPDIR)/SAXEventSink.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/dom/ls/$(DEPDIR)/WriterOutputStream.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/pipeline/$(DEPDIR)/CallFilter.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/pipeline/$(DEPDIR)/DomConsumer.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/pipeline/$(DEPDIR)/EventConsumer.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/pipeline/$(DEPDIR)/EventFilter.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/pipeline/$(DEPDIR)/LinkFilter.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/pipeline/$(DEPDIR)/NSFilter.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/pipeline/$(DEPDIR)/PipelineFactory.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/pipeline/$(DEPDIR)/TeeConsumer.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/pipeline/$(DEPDIR)/TextConsumer.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/pipeline/$(DEPDIR)/ValidationConsumer.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/pipeline/$(DEPDIR)/WellFormednessFilter.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/pipeline/$(DEPDIR)/XIncludeFilter.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/pipeline/$(DEPDIR)/XsltFilter.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/AbstractNumberNode.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/ApplyImportsNode.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/ApplyTemplatesNode.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/AttributeNode.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/AttributeSet.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/Bindings.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/CallTemplateNode.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/ChooseNode.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/CommentNode.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/CopyNode.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/CopyOfNode.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/CurrentFunction.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/DOMSourceLocator.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/DocumentFunction.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/ElementAvailableFunction.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/ElementNode.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/ErrorListenerErrorHandler.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/ForEachNode.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/FormatNumberFunction.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/FunctionAvailableFunction.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/GenerateIdFunction.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/IfNode.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/Key.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/KeyFunction.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/LiteralNode.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/MessageNode.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/NodeNumberNode.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/NumberNode.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/OtherwiseNode.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/ParameterNode.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/ProcessingInstructionNode.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/SAXSerializer.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/SortKey.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/StreamSerializer.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/Stylesheet.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/SystemPropertyFunction.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/Template.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/TemplateNode.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/TemplatesImpl.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/TextNode.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/TransformerFactoryImpl.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/TransformerImpl.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/TransformerOutputProperties.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/URIResolverEntityResolver.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/UnparsedEntityUriFunction.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/ValueOfNode.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/WhenNode.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/WithParam.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/XSLComparator.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/transform/$(DEPDIR)/XSLURIResolver.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/util/$(DEPDIR)/DoParse.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/util/$(DEPDIR)/DomParser.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/util/$(DEPDIR)/Resolver.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/util/$(DEPDIR)/SAXNullTransformerFactory.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/util/$(DEPDIR)/XCat.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/util/$(DEPDIR)/XHTMLWriter.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/util/$(DEPDIR)/XMLWriter.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/AndExpr.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/ArithmeticExpr.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/BooleanFunction.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/CeilingFunction.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/ConcatFunction.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/Constant.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/ContainsFunction.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/CountFunction.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/DocumentOrderComparator.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/EqualityExpr.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/Expr.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/FalseFunction.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/FloorFunction.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/Function.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/FunctionCall.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/IdFunction.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/LangFunction.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/LastFunction.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/LocalNameFunction.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/NameFunction.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/NameTest.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/NamespaceTest.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/NamespaceUriFunction.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/NegativeExpr.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/NodeTypeTest.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/NormalizeSpaceFunction.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/NotFunction.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/NumberFunction.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/OrExpr.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/ParenthesizedExpr.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/Path.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/Pattern.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/PositionFunction.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/Predicate.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/RelationalExpr.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/Root.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/RoundFunction.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/Selector.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/StartsWithFunction.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/Steps.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/StringFunction.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/StringLengthFunction.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/SubstringAfterFunction.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/SubstringBeforeFunction.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/SubstringFunction.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/SumFunction.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/Test.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/TranslateFunction.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/TrueFunction.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/UnionExpr.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/VariableReference.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/XPathFactoryImpl.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/XPathImpl.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/XPathParser.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@gnu/xml/xpath/$(DEPDIR)/XPathTokenizer.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@java/applet/$(DEPDIR)/Applet.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@java/applet/$(DEPDIR)/AppletContext.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@java/applet/$(DEPDIR)/AppletStub.Plo@am__quote@
@@ -23890,52 +21546,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@javax/crypto/spec/$(DEPDIR)/RC2ParameterSpec.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@javax/crypto/spec/$(DEPDIR)/RC5ParameterSpec.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@javax/crypto/spec/$(DEPDIR)/SecretKeySpec.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/$(DEPDIR)/IIOException.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/$(DEPDIR)/IIOImage.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/$(DEPDIR)/IIOParam.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/$(DEPDIR)/IIOParamController.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/$(DEPDIR)/ImageIO.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/$(DEPDIR)/ImageReadParam.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/$(DEPDIR)/ImageReader.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/$(DEPDIR)/ImageTranscoder.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/$(DEPDIR)/ImageTypeSpecifier.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/$(DEPDIR)/ImageWriteParam.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/$(DEPDIR)/ImageWriter.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/event/$(DEPDIR)/IIOReadProgressListener.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/event/$(DEPDIR)/IIOReadUpdateListener.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/event/$(DEPDIR)/IIOReadWarningListener.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/event/$(DEPDIR)/IIOWriteProgressListener.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/event/$(DEPDIR)/IIOWriteWarningListener.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/metadata/$(DEPDIR)/IIOAttr.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/metadata/$(DEPDIR)/IIOInvalidTreeException.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/metadata/$(DEPDIR)/IIOMetadata.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/metadata/$(DEPDIR)/IIOMetadataController.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/metadata/$(DEPDIR)/IIOMetadataFormat.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/metadata/$(DEPDIR)/IIOMetadataFormatImpl.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/metadata/$(DEPDIR)/IIOMetadataNode.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/metadata/$(DEPDIR)/IIONamedNodeMap.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/metadata/$(DEPDIR)/IIONodeList.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/spi/$(DEPDIR)/IIORegistry.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/spi/$(DEPDIR)/IIOServiceProvider.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/spi/$(DEPDIR)/ImageInputStreamSpi.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/spi/$(DEPDIR)/ImageOutputStreamSpi.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/spi/$(DEPDIR)/ImageReaderSpi.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/spi/$(DEPDIR)/ImageReaderWriterSpi.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/spi/$(DEPDIR)/ImageTranscoderSpi.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/spi/$(DEPDIR)/ImageWriterSpi.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/spi/$(DEPDIR)/RegisterableService.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/spi/$(DEPDIR)/ServiceRegistry.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/stream/$(DEPDIR)/FileCacheImageInputStream.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/stream/$(DEPDIR)/FileCacheImageOutputStream.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/stream/$(DEPDIR)/FileImageInputStream.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/stream/$(DEPDIR)/FileImageOutputStream.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/stream/$(DEPDIR)/IIOByteBuffer.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/stream/$(DEPDIR)/ImageInputStream.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/stream/$(DEPDIR)/ImageInputStreamImpl.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/stream/$(DEPDIR)/ImageOutputStream.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/stream/$(DEPDIR)/ImageOutputStreamImpl.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/stream/$(DEPDIR)/MemoryCacheImageInputStream.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/imageio/stream/$(DEPDIR)/MemoryCacheImageOutputStream.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@javax/naming/$(DEPDIR)/AuthenticationException.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@javax/naming/$(DEPDIR)/AuthenticationNotSupportedException.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@javax/naming/$(DEPDIR)/BinaryRefAddr.Plo@am__quote@
@@ -24617,58 +22227,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@javax/transaction/xa/$(DEPDIR)/XAException.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@javax/transaction/xa/$(DEPDIR)/XAResource.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@javax/transaction/xa/$(DEPDIR)/Xid.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/$(DEPDIR)/XMLConstants.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/datatype/$(DEPDIR)/DatatypeConfigurationException.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/datatype/$(DEPDIR)/DatatypeConstants.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/datatype/$(DEPDIR)/DatatypeFactory.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/datatype/$(DEPDIR)/Duration.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/datatype/$(DEPDIR)/XMLGregorianCalendar.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/namespace/$(DEPDIR)/NamespaceContext.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/namespace/$(DEPDIR)/QName.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/parsers/$(DEPDIR)/DocumentBuilder.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/parsers/$(DEPDIR)/DocumentBuilderFactory.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/parsers/$(DEPDIR)/FactoryConfigurationError.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/parsers/$(DEPDIR)/ParserConfigurationException.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/parsers/$(DEPDIR)/SAXParser.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/parsers/$(DEPDIR)/SAXParserFactory.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/transform/$(DEPDIR)/ErrorListener.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/transform/$(DEPDIR)/OutputKeys.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/transform/$(DEPDIR)/Result.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/transform/$(DEPDIR)/Source.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/transform/$(DEPDIR)/SourceLocator.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/transform/$(DEPDIR)/Templates.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/transform/$(DEPDIR)/Transformer.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/transform/$(DEPDIR)/TransformerConfigurationException.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/transform/$(DEPDIR)/TransformerException.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/transform/$(DEPDIR)/TransformerFactory.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/transform/$(DEPDIR)/TransformerFactoryConfigurationError.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/transform/$(DEPDIR)/URIResolver.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/transform/dom/$(DEPDIR)/DOMLocator.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/transform/dom/$(DEPDIR)/DOMResult.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/transform/dom/$(DEPDIR)/DOMSource.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/transform/sax/$(DEPDIR)/SAXResult.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/transform/sax/$(DEPDIR)/SAXSource.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/transform/sax/$(DEPDIR)/SAXTransformerFactory.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/transform/sax/$(DEPDIR)/TemplatesHandler.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/transform/sax/$(DEPDIR)/TransformerHandler.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/transform/stream/$(DEPDIR)/StreamResult.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/transform/stream/$(DEPDIR)/StreamSource.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/validation/$(DEPDIR)/Schema.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/validation/$(DEPDIR)/SchemaFactory.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/validation/$(DEPDIR)/TypeInfoProvider.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/validation/$(DEPDIR)/Validator.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/validation/$(DEPDIR)/ValidatorHandler.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/xpath/$(DEPDIR)/XPath.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/xpath/$(DEPDIR)/XPathConstants.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/xpath/$(DEPDIR)/XPathException.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/xpath/$(DEPDIR)/XPathExpression.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/xpath/$(DEPDIR)/XPathExpressionException.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/xpath/$(DEPDIR)/XPathFactory.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/xpath/$(DEPDIR)/XPathFactoryConfigurationException.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/xpath/$(DEPDIR)/XPathFunction.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/xpath/$(DEPDIR)/XPathFunctionException.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/xpath/$(DEPDIR)/XPathFunctionResolver.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@javax/xml/xpath/$(DEPDIR)/XPathVariableResolver.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@jni/classpath/$(DEPDIR)/lib_gnu_java_awt_peer_gtk_la-native_state.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@jni/gtk-peer/$(DEPDIR)/lib_gnu_java_awt_peer_gtk_la-gnu_java_awt_peer_gtk_GThreadNativeMethodRunner.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@jni/gtk-peer/$(DEPDIR)/lib_gnu_java_awt_peer_gtk_la-gnu_java_awt_peer_gtk_GdkFontPeer.Plo@am__quote@
@@ -25553,9 +23111,6 @@ clean-libtool:
-rm -rf gnu/java/awt/image/.libs gnu/java/awt/image/_libs
-rm -rf gnu/java/awt/peer/.libs gnu/java/awt/peer/_libs
-rm -rf gnu/java/awt/peer/gtk/.libs gnu/java/awt/peer/gtk/_libs
- -rm -rf gnu/java/beans/.libs gnu/java/beans/_libs
- -rm -rf gnu/java/beans/decoder/.libs gnu/java/beans/decoder/_libs
- -rm -rf gnu/java/beans/editors/.libs gnu/java/beans/editors/_libs
-rm -rf gnu/java/io/.libs gnu/java/io/_libs
-rm -rf gnu/java/lang/.libs gnu/java/lang/_libs
-rm -rf gnu/java/lang/reflect/.libs gnu/java/lang/reflect/_libs
@@ -25590,13 +23145,6 @@ clean-libtool:
-rm -rf gnu/java/util/.libs gnu/java/util/_libs
-rm -rf gnu/java/util/prefs/.libs gnu/java/util/prefs/_libs
-rm -rf gnu/regexp/.libs gnu/regexp/_libs
- -rm -rf gnu/xml/aelfred2/.libs gnu/xml/aelfred2/_libs
- -rm -rf gnu/xml/dom/.libs gnu/xml/dom/_libs
- -rm -rf gnu/xml/dom/ls/.libs gnu/xml/dom/ls/_libs
- -rm -rf gnu/xml/pipeline/.libs gnu/xml/pipeline/_libs
- -rm -rf gnu/xml/transform/.libs gnu/xml/transform/_libs
- -rm -rf gnu/xml/util/.libs gnu/xml/util/_libs
- -rm -rf gnu/xml/xpath/.libs gnu/xml/xpath/_libs
-rm -rf java/applet/.libs java/applet/_libs
-rm -rf java/awt/.libs java/awt/_libs
-rm -rf java/awt/color/.libs java/awt/color/_libs
@@ -25647,11 +23195,6 @@ clean-libtool:
-rm -rf javax/crypto/.libs javax/crypto/_libs
-rm -rf javax/crypto/interfaces/.libs javax/crypto/interfaces/_libs
-rm -rf javax/crypto/spec/.libs javax/crypto/spec/_libs
- -rm -rf javax/imageio/.libs javax/imageio/_libs
- -rm -rf javax/imageio/event/.libs javax/imageio/event/_libs
- -rm -rf javax/imageio/metadata/.libs javax/imageio/metadata/_libs
- -rm -rf javax/imageio/spi/.libs javax/imageio/spi/_libs
- -rm -rf javax/imageio/stream/.libs javax/imageio/stream/_libs
-rm -rf javax/naming/.libs javax/naming/_libs
-rm -rf javax/naming/directory/.libs javax/naming/directory/_libs
-rm -rf javax/naming/event/.libs javax/naming/event/_libs
@@ -25687,16 +23230,6 @@ clean-libtool:
-rm -rf javax/swing/undo/.libs javax/swing/undo/_libs
-rm -rf javax/transaction/.libs javax/transaction/_libs
-rm -rf javax/transaction/xa/.libs javax/transaction/xa/_libs
- -rm -rf javax/xml/.libs javax/xml/_libs
- -rm -rf javax/xml/datatype/.libs javax/xml/datatype/_libs
- -rm -rf javax/xml/namespace/.libs javax/xml/namespace/_libs
- -rm -rf javax/xml/parsers/.libs javax/xml/parsers/_libs
- -rm -rf javax/xml/transform/.libs javax/xml/transform/_libs
- -rm -rf javax/xml/transform/dom/.libs javax/xml/transform/dom/_libs
- -rm -rf javax/xml/transform/sax/.libs javax/xml/transform/sax/_libs
- -rm -rf javax/xml/transform/stream/.libs javax/xml/transform/stream/_libs
- -rm -rf javax/xml/validation/.libs javax/xml/validation/_libs
- -rm -rf javax/xml/xpath/.libs javax/xml/xpath/_libs
-rm -rf jni/classpath/.libs jni/classpath/_libs
-rm -rf jni/gtk-peer/.libs jni/gtk-peer/_libs
-rm -rf org/ietf/jgss/.libs org/ietf/jgss/_libs
@@ -25781,13 +23314,7 @@ uninstall-toolexecmainlibDATA:
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
- @failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
+ @set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
@@ -25799,7 +23326,7 @@ $(RECURSIVE_TARGETS):
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
@@ -25807,13 +23334,7 @@ $(RECURSIVE_TARGETS):
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
- @failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
+ @set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
@@ -25834,7 +23355,7 @@ maintainer-clean-recursive:
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
@@ -26109,12 +23630,6 @@ distclean-generic:
-rm -f gnu/java/awt/peer/$(am__dirstamp)
-rm -f gnu/java/awt/peer/gtk/$(DEPDIR)/$(am__dirstamp)
-rm -f gnu/java/awt/peer/gtk/$(am__dirstamp)
- -rm -f gnu/java/beans/$(DEPDIR)/$(am__dirstamp)
- -rm -f gnu/java/beans/$(am__dirstamp)
- -rm -f gnu/java/beans/decoder/$(DEPDIR)/$(am__dirstamp)
- -rm -f gnu/java/beans/decoder/$(am__dirstamp)
- -rm -f gnu/java/beans/editors/$(DEPDIR)/$(am__dirstamp)
- -rm -f gnu/java/beans/editors/$(am__dirstamp)
-rm -f gnu/java/io/$(DEPDIR)/$(am__dirstamp)
-rm -f gnu/java/io/$(am__dirstamp)
-rm -f gnu/java/lang/$(DEPDIR)/$(am__dirstamp)
@@ -26183,20 +23698,6 @@ distclean-generic:
-rm -f gnu/java/util/prefs/$(am__dirstamp)
-rm -f gnu/regexp/$(DEPDIR)/$(am__dirstamp)
-rm -f gnu/regexp/$(am__dirstamp)
- -rm -f gnu/xml/aelfred2/$(DEPDIR)/$(am__dirstamp)
- -rm -f gnu/xml/aelfred2/$(am__dirstamp)
- -rm -f gnu/xml/dom/$(DEPDIR)/$(am__dirstamp)
- -rm -f gnu/xml/dom/$(am__dirstamp)
- -rm -f gnu/xml/dom/ls/$(DEPDIR)/$(am__dirstamp)
- -rm -f gnu/xml/dom/ls/$(am__dirstamp)
- -rm -f gnu/xml/pipeline/$(DEPDIR)/$(am__dirstamp)
- -rm -f gnu/xml/pipeline/$(am__dirstamp)
- -rm -f gnu/xml/transform/$(DEPDIR)/$(am__dirstamp)
- -rm -f gnu/xml/transform/$(am__dirstamp)
- -rm -f gnu/xml/util/$(DEPDIR)/$(am__dirstamp)
- -rm -f gnu/xml/util/$(am__dirstamp)
- -rm -f gnu/xml/xpath/$(DEPDIR)/$(am__dirstamp)
- -rm -f gnu/xml/xpath/$(am__dirstamp)
-rm -f java/applet/$(DEPDIR)/$(am__dirstamp)
-rm -f java/applet/$(am__dirstamp)
-rm -f java/awt/$(DEPDIR)/$(am__dirstamp)
@@ -26297,16 +23798,6 @@ distclean-generic:
-rm -f javax/crypto/interfaces/$(am__dirstamp)
-rm -f javax/crypto/spec/$(DEPDIR)/$(am__dirstamp)
-rm -f javax/crypto/spec/$(am__dirstamp)
- -rm -f javax/imageio/$(DEPDIR)/$(am__dirstamp)
- -rm -f javax/imageio/$(am__dirstamp)
- -rm -f javax/imageio/event/$(DEPDIR)/$(am__dirstamp)
- -rm -f javax/imageio/event/$(am__dirstamp)
- -rm -f javax/imageio/metadata/$(DEPDIR)/$(am__dirstamp)
- -rm -f javax/imageio/metadata/$(am__dirstamp)
- -rm -f javax/imageio/spi/$(DEPDIR)/$(am__dirstamp)
- -rm -f javax/imageio/spi/$(am__dirstamp)
- -rm -f javax/imageio/stream/$(DEPDIR)/$(am__dirstamp)
- -rm -f javax/imageio/stream/$(am__dirstamp)
-rm -f javax/naming/$(DEPDIR)/$(am__dirstamp)
-rm -f javax/naming/$(am__dirstamp)
-rm -f javax/naming/directory/$(DEPDIR)/$(am__dirstamp)
@@ -26377,26 +23868,6 @@ distclean-generic:
-rm -f javax/transaction/$(am__dirstamp)
-rm -f javax/transaction/xa/$(DEPDIR)/$(am__dirstamp)
-rm -f javax/transaction/xa/$(am__dirstamp)
- -rm -f javax/xml/$(DEPDIR)/$(am__dirstamp)
- -rm -f javax/xml/$(am__dirstamp)
- -rm -f javax/xml/datatype/$(DEPDIR)/$(am__dirstamp)
- -rm -f javax/xml/datatype/$(am__dirstamp)
- -rm -f javax/xml/namespace/$(DEPDIR)/$(am__dirstamp)
- -rm -f javax/xml/namespace/$(am__dirstamp)
- -rm -f javax/xml/parsers/$(DEPDIR)/$(am__dirstamp)
- -rm -f javax/xml/parsers/$(am__dirstamp)
- -rm -f javax/xml/transform/$(DEPDIR)/$(am__dirstamp)
- -rm -f javax/xml/transform/$(am__dirstamp)
- -rm -f javax/xml/transform/dom/$(DEPDIR)/$(am__dirstamp)
- -rm -f javax/xml/transform/dom/$(am__dirstamp)
- -rm -f javax/xml/transform/sax/$(DEPDIR)/$(am__dirstamp)
- -rm -f javax/xml/transform/sax/$(am__dirstamp)
- -rm -f javax/xml/transform/stream/$(DEPDIR)/$(am__dirstamp)
- -rm -f javax/xml/transform/stream/$(am__dirstamp)
- -rm -f javax/xml/validation/$(DEPDIR)/$(am__dirstamp)
- -rm -f javax/xml/validation/$(am__dirstamp)
- -rm -f javax/xml/xpath/$(DEPDIR)/$(am__dirstamp)
- -rm -f javax/xml/xpath/$(am__dirstamp)
-rm -f jni/classpath/$(DEPDIR)/$(am__dirstamp)
-rm -f jni/classpath/$(am__dirstamp)
-rm -f jni/gtk-peer/$(DEPDIR)/$(am__dirstamp)
@@ -26417,7 +23888,7 @@ clean-am: clean-binPROGRAMS clean-generic clean-libtool clean-local \
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
- -rm -rf ./$(DEPDIR) gnu/awt/$(DEPDIR) gnu/awt/j2d/$(DEPDIR) gnu/awt/xlib/$(DEPDIR) gnu/classpath/$(DEPDIR) gnu/gcj/$(DEPDIR) gnu/gcj/convert/$(DEPDIR) gnu/gcj/io/$(DEPDIR) gnu/gcj/runtime/$(DEPDIR) gnu/gcj/tools/gcj_dbtool/$(DEPDIR) gnu/gcj/util/$(DEPDIR) gnu/gcj/xlib/$(DEPDIR) gnu/java/awt/$(DEPDIR) gnu/java/awt/color/$(DEPDIR) gnu/java/awt/image/$(DEPDIR) gnu/java/awt/peer/$(DEPDIR) gnu/java/awt/peer/gtk/$(DEPDIR) gnu/java/beans/$(DEPDIR) gnu/java/beans/decoder/$(DEPDIR) gnu/java/beans/editors/$(DEPDIR) gnu/java/io/$(DEPDIR) gnu/java/lang/$(DEPDIR) gnu/java/lang/reflect/$(DEPDIR) gnu/java/locale/$(DEPDIR) gnu/java/math/$(DEPDIR) gnu/java/net/$(DEPDIR) gnu/java/net/protocol/core/$(DEPDIR) gnu/java/net/protocol/file/$(DEPDIR) gnu/java/net/protocol/ftp/$(DEPDIR) gnu/java/net/protocol/gcjlib/$(DEPDIR) gnu/java/net/protocol/http/$(DEPDIR) gnu/java/net/protocol/http/event/$(DEPDIR) gnu/java/net/protocol/jar/$(DEPDIR) gnu/java/nio/$(DEPDIR) gnu/java/nio/channels/$(DEPDIR) gnu/java/nio/charset/$(DEPDIR) gnu/java/rmi/$(DEPDIR) gnu/java/rmi/dgc/$(DEPDIR) gnu/java/rmi/registry/$(DEPDIR) gnu/java/rmi/rmic/$(DEPDIR) gnu/java/rmi/server/$(DEPDIR) gnu/java/security/$(DEPDIR) gnu/java/security/action/$(DEPDIR) gnu/java/security/ber/$(DEPDIR) gnu/java/security/der/$(DEPDIR) gnu/java/security/pkcs/$(DEPDIR) gnu/java/security/provider/$(DEPDIR) gnu/java/security/util/$(DEPDIR) gnu/java/security/x509/$(DEPDIR) gnu/java/security/x509/ext/$(DEPDIR) gnu/java/text/$(DEPDIR) gnu/java/util/$(DEPDIR) gnu/java/util/prefs/$(DEPDIR) gnu/regexp/$(DEPDIR) gnu/xml/aelfred2/$(DEPDIR) gnu/xml/dom/$(DEPDIR) gnu/xml/dom/ls/$(DEPDIR) gnu/xml/pipeline/$(DEPDIR) gnu/xml/transform/$(DEPDIR) gnu/xml/util/$(DEPDIR) gnu/xml/xpath/$(DEPDIR) java/applet/$(DEPDIR) java/awt/$(DEPDIR) java/awt/color/$(DEPDIR) java/awt/datatransfer/$(DEPDIR) java/awt/dnd/$(DEPDIR) java/awt/dnd/peer/$(DEPDIR) java/awt/event/$(DEPDIR) java/awt/font/$(DEPDIR) java/awt/geom/$(DEPDIR) java/awt/im/$(DEPDIR) java/awt/im/spi/$(DEPDIR) java/awt/image/$(DEPDIR) java/awt/image/renderable/$(DEPDIR) java/awt/peer/$(DEPDIR) java/awt/print/$(DEPDIR) java/beans/$(DEPDIR) java/beans/beancontext/$(DEPDIR) java/io/$(DEPDIR) java/lang/$(DEPDIR) java/lang/ref/$(DEPDIR) java/lang/reflect/$(DEPDIR) java/math/$(DEPDIR) java/net/$(DEPDIR) java/nio/$(DEPDIR) java/nio/channels/$(DEPDIR) java/nio/channels/spi/$(DEPDIR) java/nio/charset/$(DEPDIR) java/nio/charset/spi/$(DEPDIR) java/rmi/$(DEPDIR) java/rmi/activation/$(DEPDIR) java/rmi/dgc/$(DEPDIR) java/rmi/registry/$(DEPDIR) java/rmi/server/$(DEPDIR) java/security/$(DEPDIR) java/security/acl/$(DEPDIR) java/security/cert/$(DEPDIR) java/security/interfaces/$(DEPDIR) java/security/spec/$(DEPDIR) java/sql/$(DEPDIR) java/text/$(DEPDIR) java/util/$(DEPDIR) java/util/jar/$(DEPDIR) java/util/logging/$(DEPDIR) java/util/prefs/$(DEPDIR) java/util/regex/$(DEPDIR) java/util/zip/$(DEPDIR) javax/accessibility/$(DEPDIR) javax/crypto/$(DEPDIR) javax/crypto/interfaces/$(DEPDIR) javax/crypto/spec/$(DEPDIR) javax/imageio/$(DEPDIR) javax/imageio/event/$(DEPDIR) javax/imageio/metadata/$(DEPDIR) javax/imageio/spi/$(DEPDIR) javax/imageio/stream/$(DEPDIR) javax/naming/$(DEPDIR) javax/naming/directory/$(DEPDIR) javax/naming/event/$(DEPDIR) javax/naming/ldap/$(DEPDIR) javax/naming/spi/$(DEPDIR) javax/net/$(DEPDIR) javax/net/ssl/$(DEPDIR) javax/print/$(DEPDIR) javax/print/attribute/$(DEPDIR) javax/print/attribute/standard/$(DEPDIR) javax/print/event/$(DEPDIR) javax/security/auth/$(DEPDIR) javax/security/auth/callback/$(DEPDIR) javax/security/auth/login/$(DEPDIR) javax/security/auth/spi/$(DEPDIR) javax/security/auth/x500/$(DEPDIR) javax/security/cert/$(DEPDIR) javax/security/sasl/$(DEPDIR) javax/sql/$(DEPDIR) javax/swing/$(DEPDIR) javax/swing/border/$(DEPDIR) javax/swing/colorchooser/$(DEPDIR) javax/swing/event/$(DEPDIR) javax/swing/filechooser/$(DEPDIR) javax/swing/plaf/$(DEPDIR) javax/swing/plaf/basic/$(DEPDIR) javax/swing/plaf/metal/$(DEPDIR) javax/swing/table/$(DEPDIR) javax/swing/text/$(DEPDIR) javax/swing/text/html/$(DEPDIR) javax/swing/text/html/parser/$(DEPDIR) javax/swing/tree/$(DEPDIR) javax/swing/undo/$(DEPDIR) javax/transaction/$(DEPDIR) javax/transaction/xa/$(DEPDIR) javax/xml/$(DEPDIR) javax/xml/datatype/$(DEPDIR) javax/xml/namespace/$(DEPDIR) javax/xml/parsers/$(DEPDIR) javax/xml/transform/$(DEPDIR) javax/xml/transform/dom/$(DEPDIR) javax/xml/transform/sax/$(DEPDIR) javax/xml/transform/stream/$(DEPDIR) javax/xml/validation/$(DEPDIR) javax/xml/xpath/$(DEPDIR) jni/classpath/$(DEPDIR) jni/gtk-peer/$(DEPDIR) org/ietf/jgss/$(DEPDIR) sysdep/$(DEPDIR)
+ -rm -rf ./$(DEPDIR) gnu/awt/$(DEPDIR) gnu/awt/j2d/$(DEPDIR) gnu/awt/xlib/$(DEPDIR) gnu/classpath/$(DEPDIR) gnu/gcj/$(DEPDIR) gnu/gcj/convert/$(DEPDIR) gnu/gcj/io/$(DEPDIR) gnu/gcj/runtime/$(DEPDIR) gnu/gcj/tools/gcj_dbtool/$(DEPDIR) gnu/gcj/util/$(DEPDIR) gnu/gcj/xlib/$(DEPDIR) gnu/java/awt/$(DEPDIR) gnu/java/awt/color/$(DEPDIR) gnu/java/awt/image/$(DEPDIR) gnu/java/awt/peer/$(DEPDIR) gnu/java/awt/peer/gtk/$(DEPDIR) gnu/java/io/$(DEPDIR) gnu/java/lang/$(DEPDIR) gnu/java/lang/reflect/$(DEPDIR) gnu/java/locale/$(DEPDIR) gnu/java/math/$(DEPDIR) gnu/java/net/$(DEPDIR) gnu/java/net/protocol/core/$(DEPDIR) gnu/java/net/protocol/file/$(DEPDIR) gnu/java/net/protocol/ftp/$(DEPDIR) gnu/java/net/protocol/gcjlib/$(DEPDIR) gnu/java/net/protocol/http/$(DEPDIR) gnu/java/net/protocol/http/event/$(DEPDIR) gnu/java/net/protocol/jar/$(DEPDIR) gnu/java/nio/$(DEPDIR) gnu/java/nio/channels/$(DEPDIR) gnu/java/nio/charset/$(DEPDIR) gnu/java/rmi/$(DEPDIR) gnu/java/rmi/dgc/$(DEPDIR) gnu/java/rmi/registry/$(DEPDIR) gnu/java/rmi/rmic/$(DEPDIR) gnu/java/rmi/server/$(DEPDIR) gnu/java/security/$(DEPDIR) gnu/java/security/action/$(DEPDIR) gnu/java/security/ber/$(DEPDIR) gnu/java/security/der/$(DEPDIR) gnu/java/security/pkcs/$(DEPDIR) gnu/java/security/provider/$(DEPDIR) gnu/java/security/util/$(DEPDIR) gnu/java/security/x509/$(DEPDIR) gnu/java/security/x509/ext/$(DEPDIR) gnu/java/text/$(DEPDIR) gnu/java/util/$(DEPDIR) gnu/java/util/prefs/$(DEPDIR) gnu/regexp/$(DEPDIR) java/applet/$(DEPDIR) java/awt/$(DEPDIR) java/awt/color/$(DEPDIR) java/awt/datatransfer/$(DEPDIR) java/awt/dnd/$(DEPDIR) java/awt/dnd/peer/$(DEPDIR) java/awt/event/$(DEPDIR) java/awt/font/$(DEPDIR) java/awt/geom/$(DEPDIR) java/awt/im/$(DEPDIR) java/awt/im/spi/$(DEPDIR) java/awt/image/$(DEPDIR) java/awt/image/renderable/$(DEPDIR) java/awt/peer/$(DEPDIR) java/awt/print/$(DEPDIR) java/beans/$(DEPDIR) java/beans/beancontext/$(DEPDIR) java/io/$(DEPDIR) java/lang/$(DEPDIR) java/lang/ref/$(DEPDIR) java/lang/reflect/$(DEPDIR) java/math/$(DEPDIR) java/net/$(DEPDIR) java/nio/$(DEPDIR) java/nio/channels/$(DEPDIR) java/nio/channels/spi/$(DEPDIR) java/nio/charset/$(DEPDIR) java/nio/charset/spi/$(DEPDIR) java/rmi/$(DEPDIR) java/rmi/activation/$(DEPDIR) java/rmi/dgc/$(DEPDIR) java/rmi/registry/$(DEPDIR) java/rmi/server/$(DEPDIR) java/security/$(DEPDIR) java/security/acl/$(DEPDIR) java/security/cert/$(DEPDIR) java/security/interfaces/$(DEPDIR) java/security/spec/$(DEPDIR) java/sql/$(DEPDIR) java/text/$(DEPDIR) java/util/$(DEPDIR) java/util/jar/$(DEPDIR) java/util/logging/$(DEPDIR) java/util/prefs/$(DEPDIR) java/util/regex/$(DEPDIR) java/util/zip/$(DEPDIR) javax/accessibility/$(DEPDIR) javax/crypto/$(DEPDIR) javax/crypto/interfaces/$(DEPDIR) javax/crypto/spec/$(DEPDIR) javax/naming/$(DEPDIR) javax/naming/directory/$(DEPDIR) javax/naming/event/$(DEPDIR) javax/naming/ldap/$(DEPDIR) javax/naming/spi/$(DEPDIR) javax/net/$(DEPDIR) javax/net/ssl/$(DEPDIR) javax/print/$(DEPDIR) javax/print/attribute/$(DEPDIR) javax/print/attribute/standard/$(DEPDIR) javax/print/event/$(DEPDIR) javax/security/auth/$(DEPDIR) javax/security/auth/callback/$(DEPDIR) javax/security/auth/login/$(DEPDIR) javax/security/auth/spi/$(DEPDIR) javax/security/auth/x500/$(DEPDIR) javax/security/cert/$(DEPDIR) javax/security/sasl/$(DEPDIR) javax/sql/$(DEPDIR) javax/swing/$(DEPDIR) javax/swing/border/$(DEPDIR) javax/swing/colorchooser/$(DEPDIR) javax/swing/event/$(DEPDIR) javax/swing/filechooser/$(DEPDIR) javax/swing/plaf/$(DEPDIR) javax/swing/plaf/basic/$(DEPDIR) javax/swing/plaf/metal/$(DEPDIR) javax/swing/table/$(DEPDIR) javax/swing/text/$(DEPDIR) javax/swing/text/html/$(DEPDIR) javax/swing/text/html/parser/$(DEPDIR) javax/swing/tree/$(DEPDIR) javax/swing/undo/$(DEPDIR) javax/transaction/$(DEPDIR) javax/transaction/xa/$(DEPDIR) jni/classpath/$(DEPDIR) jni/gtk-peer/$(DEPDIR) org/ietf/jgss/$(DEPDIR) sysdep/$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-local distclean-tags
@@ -26448,7 +23919,7 @@ installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
- -rm -rf ./$(DEPDIR) gnu/awt/$(DEPDIR) gnu/awt/j2d/$(DEPDIR) gnu/awt/xlib/$(DEPDIR) gnu/classpath/$(DEPDIR) gnu/gcj/$(DEPDIR) gnu/gcj/convert/$(DEPDIR) gnu/gcj/io/$(DEPDIR) gnu/gcj/runtime/$(DEPDIR) gnu/gcj/tools/gcj_dbtool/$(DEPDIR) gnu/gcj/util/$(DEPDIR) gnu/gcj/xlib/$(DEPDIR) gnu/java/awt/$(DEPDIR) gnu/java/awt/color/$(DEPDIR) gnu/java/awt/image/$(DEPDIR) gnu/java/awt/peer/$(DEPDIR) gnu/java/awt/peer/gtk/$(DEPDIR) gnu/java/beans/$(DEPDIR) gnu/java/beans/decoder/$(DEPDIR) gnu/java/beans/editors/$(DEPDIR) gnu/java/io/$(DEPDIR) gnu/java/lang/$(DEPDIR) gnu/java/lang/reflect/$(DEPDIR) gnu/java/locale/$(DEPDIR) gnu/java/math/$(DEPDIR) gnu/java/net/$(DEPDIR) gnu/java/net/protocol/core/$(DEPDIR) gnu/java/net/protocol/file/$(DEPDIR) gnu/java/net/protocol/ftp/$(DEPDIR) gnu/java/net/protocol/gcjlib/$(DEPDIR) gnu/java/net/protocol/http/$(DEPDIR) gnu/java/net/protocol/http/event/$(DEPDIR) gnu/java/net/protocol/jar/$(DEPDIR) gnu/java/nio/$(DEPDIR) gnu/java/nio/channels/$(DEPDIR) gnu/java/nio/charset/$(DEPDIR) gnu/java/rmi/$(DEPDIR) gnu/java/rmi/dgc/$(DEPDIR) gnu/java/rmi/registry/$(DEPDIR) gnu/java/rmi/rmic/$(DEPDIR) gnu/java/rmi/server/$(DEPDIR) gnu/java/security/$(DEPDIR) gnu/java/security/action/$(DEPDIR) gnu/java/security/ber/$(DEPDIR) gnu/java/security/der/$(DEPDIR) gnu/java/security/pkcs/$(DEPDIR) gnu/java/security/provider/$(DEPDIR) gnu/java/security/util/$(DEPDIR) gnu/java/security/x509/$(DEPDIR) gnu/java/security/x509/ext/$(DEPDIR) gnu/java/text/$(DEPDIR) gnu/java/util/$(DEPDIR) gnu/java/util/prefs/$(DEPDIR) gnu/regexp/$(DEPDIR) gnu/xml/aelfred2/$(DEPDIR) gnu/xml/dom/$(DEPDIR) gnu/xml/dom/ls/$(DEPDIR) gnu/xml/pipeline/$(DEPDIR) gnu/xml/transform/$(DEPDIR) gnu/xml/util/$(DEPDIR) gnu/xml/xpath/$(DEPDIR) java/applet/$(DEPDIR) java/awt/$(DEPDIR) java/awt/color/$(DEPDIR) java/awt/datatransfer/$(DEPDIR) java/awt/dnd/$(DEPDIR) java/awt/dnd/peer/$(DEPDIR) java/awt/event/$(DEPDIR) java/awt/font/$(DEPDIR) java/awt/geom/$(DEPDIR) java/awt/im/$(DEPDIR) java/awt/im/spi/$(DEPDIR) java/awt/image/$(DEPDIR) java/awt/image/renderable/$(DEPDIR) java/awt/peer/$(DEPDIR) java/awt/print/$(DEPDIR) java/beans/$(DEPDIR) java/beans/beancontext/$(DEPDIR) java/io/$(DEPDIR) java/lang/$(DEPDIR) java/lang/ref/$(DEPDIR) java/lang/reflect/$(DEPDIR) java/math/$(DEPDIR) java/net/$(DEPDIR) java/nio/$(DEPDIR) java/nio/channels/$(DEPDIR) java/nio/channels/spi/$(DEPDIR) java/nio/charset/$(DEPDIR) java/nio/charset/spi/$(DEPDIR) java/rmi/$(DEPDIR) java/rmi/activation/$(DEPDIR) java/rmi/dgc/$(DEPDIR) java/rmi/registry/$(DEPDIR) java/rmi/server/$(DEPDIR) java/security/$(DEPDIR) java/security/acl/$(DEPDIR) java/security/cert/$(DEPDIR) java/security/interfaces/$(DEPDIR) java/security/spec/$(DEPDIR) java/sql/$(DEPDIR) java/text/$(DEPDIR) java/util/$(DEPDIR) java/util/jar/$(DEPDIR) java/util/logging/$(DEPDIR) java/util/prefs/$(DEPDIR) java/util/regex/$(DEPDIR) java/util/zip/$(DEPDIR) javax/accessibility/$(DEPDIR) javax/crypto/$(DEPDIR) javax/crypto/interfaces/$(DEPDIR) javax/crypto/spec/$(DEPDIR) javax/imageio/$(DEPDIR) javax/imageio/event/$(DEPDIR) javax/imageio/metadata/$(DEPDIR) javax/imageio/spi/$(DEPDIR) javax/imageio/stream/$(DEPDIR) javax/naming/$(DEPDIR) javax/naming/directory/$(DEPDIR) javax/naming/event/$(DEPDIR) javax/naming/ldap/$(DEPDIR) javax/naming/spi/$(DEPDIR) javax/net/$(DEPDIR) javax/net/ssl/$(DEPDIR) javax/print/$(DEPDIR) javax/print/attribute/$(DEPDIR) javax/print/attribute/standard/$(DEPDIR) javax/print/event/$(DEPDIR) javax/security/auth/$(DEPDIR) javax/security/auth/callback/$(DEPDIR) javax/security/auth/login/$(DEPDIR) javax/security/auth/spi/$(DEPDIR) javax/security/auth/x500/$(DEPDIR) javax/security/cert/$(DEPDIR) javax/security/sasl/$(DEPDIR) javax/sql/$(DEPDIR) javax/swing/$(DEPDIR) javax/swing/border/$(DEPDIR) javax/swing/colorchooser/$(DEPDIR) javax/swing/event/$(DEPDIR) javax/swing/filechooser/$(DEPDIR) javax/swing/plaf/$(DEPDIR) javax/swing/plaf/basic/$(DEPDIR) javax/swing/plaf/metal/$(DEPDIR) javax/swing/table/$(DEPDIR) javax/swing/text/$(DEPDIR) javax/swing/text/html/$(DEPDIR) javax/swing/text/html/parser/$(DEPDIR) javax/swing/tree/$(DEPDIR) javax/swing/undo/$(DEPDIR) javax/transaction/$(DEPDIR) javax/transaction/xa/$(DEPDIR) javax/xml/$(DEPDIR) javax/xml/datatype/$(DEPDIR) javax/xml/namespace/$(DEPDIR) javax/xml/parsers/$(DEPDIR) javax/xml/transform/$(DEPDIR) javax/xml/transform/dom/$(DEPDIR) javax/xml/transform/sax/$(DEPDIR) javax/xml/transform/stream/$(DEPDIR) javax/xml/validation/$(DEPDIR) javax/xml/xpath/$(DEPDIR) jni/classpath/$(DEPDIR) jni/gtk-peer/$(DEPDIR) org/ietf/jgss/$(DEPDIR) sysdep/$(DEPDIR)
+ -rm -rf ./$(DEPDIR) gnu/awt/$(DEPDIR) gnu/awt/j2d/$(DEPDIR) gnu/awt/xlib/$(DEPDIR) gnu/classpath/$(DEPDIR) gnu/gcj/$(DEPDIR) gnu/gcj/convert/$(DEPDIR) gnu/gcj/io/$(DEPDIR) gnu/gcj/runtime/$(DEPDIR) gnu/gcj/tools/gcj_dbtool/$(DEPDIR) gnu/gcj/util/$(DEPDIR) gnu/gcj/xlib/$(DEPDIR) gnu/java/awt/$(DEPDIR) gnu/java/awt/color/$(DEPDIR) gnu/java/awt/image/$(DEPDIR) gnu/java/awt/peer/$(DEPDIR) gnu/java/awt/peer/gtk/$(DEPDIR) gnu/java/io/$(DEPDIR) gnu/java/lang/$(DEPDIR) gnu/java/lang/reflect/$(DEPDIR) gnu/java/locale/$(DEPDIR) gnu/java/math/$(DEPDIR) gnu/java/net/$(DEPDIR) gnu/java/net/protocol/core/$(DEPDIR) gnu/java/net/protocol/file/$(DEPDIR) gnu/java/net/protocol/ftp/$(DEPDIR) gnu/java/net/protocol/gcjlib/$(DEPDIR) gnu/java/net/protocol/http/$(DEPDIR) gnu/java/net/protocol/http/event/$(DEPDIR) gnu/java/net/protocol/jar/$(DEPDIR) gnu/java/nio/$(DEPDIR) gnu/java/nio/channels/$(DEPDIR) gnu/java/nio/charset/$(DEPDIR) gnu/java/rmi/$(DEPDIR) gnu/java/rmi/dgc/$(DEPDIR) gnu/java/rmi/registry/$(DEPDIR) gnu/java/rmi/rmic/$(DEPDIR) gnu/java/rmi/server/$(DEPDIR) gnu/java/security/$(DEPDIR) gnu/java/security/action/$(DEPDIR) gnu/java/security/ber/$(DEPDIR) gnu/java/security/der/$(DEPDIR) gnu/java/security/pkcs/$(DEPDIR) gnu/java/security/provider/$(DEPDIR) gnu/java/security/util/$(DEPDIR) gnu/java/security/x509/$(DEPDIR) gnu/java/security/x509/ext/$(DEPDIR) gnu/java/text/$(DEPDIR) gnu/java/util/$(DEPDIR) gnu/java/util/prefs/$(DEPDIR) gnu/regexp/$(DEPDIR) java/applet/$(DEPDIR) java/awt/$(DEPDIR) java/awt/color/$(DEPDIR) java/awt/datatransfer/$(DEPDIR) java/awt/dnd/$(DEPDIR) java/awt/dnd/peer/$(DEPDIR) java/awt/event/$(DEPDIR) java/awt/font/$(DEPDIR) java/awt/geom/$(DEPDIR) java/awt/im/$(DEPDIR) java/awt/im/spi/$(DEPDIR) java/awt/image/$(DEPDIR) java/awt/image/renderable/$(DEPDIR) java/awt/peer/$(DEPDIR) java/awt/print/$(DEPDIR) java/beans/$(DEPDIR) java/beans/beancontext/$(DEPDIR) java/io/$(DEPDIR) java/lang/$(DEPDIR) java/lang/ref/$(DEPDIR) java/lang/reflect/$(DEPDIR) java/math/$(DEPDIR) java/net/$(DEPDIR) java/nio/$(DEPDIR) java/nio/channels/$(DEPDIR) java/nio/channels/spi/$(DEPDIR) java/nio/charset/$(DEPDIR) java/nio/charset/spi/$(DEPDIR) java/rmi/$(DEPDIR) java/rmi/activation/$(DEPDIR) java/rmi/dgc/$(DEPDIR) java/rmi/registry/$(DEPDIR) java/rmi/server/$(DEPDIR) java/security/$(DEPDIR) java/security/acl/$(DEPDIR) java/security/cert/$(DEPDIR) java/security/interfaces/$(DEPDIR) java/security/spec/$(DEPDIR) java/sql/$(DEPDIR) java/text/$(DEPDIR) java/util/$(DEPDIR) java/util/jar/$(DEPDIR) java/util/logging/$(DEPDIR) java/util/prefs/$(DEPDIR) java/util/regex/$(DEPDIR) java/util/zip/$(DEPDIR) javax/accessibility/$(DEPDIR) javax/crypto/$(DEPDIR) javax/crypto/interfaces/$(DEPDIR) javax/crypto/spec/$(DEPDIR) javax/naming/$(DEPDIR) javax/naming/directory/$(DEPDIR) javax/naming/event/$(DEPDIR) javax/naming/ldap/$(DEPDIR) javax/naming/spi/$(DEPDIR) javax/net/$(DEPDIR) javax/net/ssl/$(DEPDIR) javax/print/$(DEPDIR) javax/print/attribute/$(DEPDIR) javax/print/attribute/standard/$(DEPDIR) javax/print/event/$(DEPDIR) javax/security/auth/$(DEPDIR) javax/security/auth/callback/$(DEPDIR) javax/security/auth/login/$(DEPDIR) javax/security/auth/spi/$(DEPDIR) javax/security/auth/x500/$(DEPDIR) javax/security/cert/$(DEPDIR) javax/security/sasl/$(DEPDIR) javax/sql/$(DEPDIR) javax/swing/$(DEPDIR) javax/swing/border/$(DEPDIR) javax/swing/colorchooser/$(DEPDIR) javax/swing/event/$(DEPDIR) javax/swing/filechooser/$(DEPDIR) javax/swing/plaf/$(DEPDIR) javax/swing/plaf/basic/$(DEPDIR) javax/swing/plaf/metal/$(DEPDIR) javax/swing/table/$(DEPDIR) javax/swing/text/$(DEPDIR) javax/swing/text/html/$(DEPDIR) javax/swing/text/html/parser/$(DEPDIR) javax/swing/tree/$(DEPDIR) javax/swing/undo/$(DEPDIR) javax/transaction/$(DEPDIR) javax/transaction/xa/$(DEPDIR) jni/classpath/$(DEPDIR) jni/gtk-peer/$(DEPDIR) org/ietf/jgss/$(DEPDIR) sysdep/$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@@ -26592,7 +24063,7 @@ $(lib_gnu_java_awt_peer_gtk_la_OBJECTS): $(lib_gnu_java_awt_peer_gtk_la_DEPENDEN
# Compile all classfiles in one go.
-@ONESTEP_TRUE@classes.stamp: $(all_java_source_files)
+@ONESTEP_TRUE@classes.stamp: $(all_java_source_files) gnu/gcj/tools/gcj_dbtool/Main.java
@ONESTEP_TRUE@ @echo Compiling Java sourcefiles...
@ONESTEP_TRUE@ @: $(call write_entries_to_file,$?,libgcj.sourcelist)
@ONESTEP_TRUE@ $(JAVAC) $(JCFLAGS) -classpath '' -bootclasspath $(BOOTCLASSPATH) -d $(here) @libgcj.sourcelist
@@ -26601,7 +24072,7 @@ $(lib_gnu_java_awt_peer_gtk_la_OBJECTS): $(lib_gnu_java_awt_peer_gtk_la_DEPENDEN
# classfiles are compiled in one go when classes.stamp is built and 2)
# anything which depends on a particular .class file must wait until
# this file is built.
-@ONESTEP_TRUE@$(all_java_class_files): classes.stamp
+@ONESTEP_TRUE@$(all_java_class_files) gnu/gcj/tools/gcj_dbtool/Main.class: classes.stamp
# Compile each classfile individually.
@@ -26648,7 +24119,7 @@ clean-nat:
$(javao_files) $(xlib_javao_files): %.lo: %.java
$(LTGCJCOMPILE) -o $@ -c $<
-$(gtk_awt_peer_sources:.java=.lo) $(gnu_xml_source_files:.java=.lo): %.lo: %.java
+$(gtk_awt_peer_sources:.java=.lo): %.lo: %.java
$(LTGCJCOMPILE) -fjni -o $@ -c $<
libgcj.la: $(libgcj_la_OBJECTS) $(libgcj_la_DEPENDENCIES)
@@ -26664,6 +24135,26 @@ lib-gnu-awt-xlib.la: $(lib_gnu_awt_xlib_la_OBJECTS) $(lib_gnu_awt_xlib_la_DEPEND
$(lib_gnu_awt_xlib_la_LINK) -objectlist lib_gnu_awt_xlib.objectlist \
-rpath $(toolexeclibdir) $(lib_gnu_awt_xlib_la_LDFLAGS) $(LIBS)
+gnu-xml.lo: $(gnu_xml_source_files)
+ $(MAKE) classes.stamp
+ $(LTGCJCOMPILE) -fjni -findirect-dispatch -c -o gnu-xml.lo \
+ `find gnu/xml -name '*.class' -print`
+
+javax-imageio.lo: $(javax_imageio_source_files)
+ $(MAKE) classes.stamp
+ $(LTGCJCOMPILE) -findirect-dispatch -c -o javax-imageio.lo \
+ `find javax/imageio -name '*.class' -print`
+
+javax-xml.lo: $(javax_xml_source_files)
+ $(MAKE) classes.stamp
+ $(LTGCJCOMPILE) -findirect-dispatch -c -o javax-xml.lo \
+ `find javax/xml -name '*.class' -print`
+
+gnu-java-beans.lo: $(gnu_java_beans_source_files)
+ $(MAKE) classes.stamp
+ $(LTGCJCOMPILE) -findirect-dispatch -c -o gnu-java-beans.lo \
+ `find gnu/java/beans -name '*.class' -print`
+
%.h: %.class
$(GCJH) -classpath '' -bootclasspath $(top_builddir) $(basename $<)
diff --git a/libjava/aclocal.m4 b/libjava/aclocal.m4
index 286f26a8618..32840e5e6e0 100644
--- a/libjava/aclocal.m4
+++ b/libjava/aclocal.m4
@@ -1,7 +1,7 @@
-# generated automatically by aclocal 1.9.5 -*- Autoconf -*-
+# generated automatically by aclocal 1.9.3 -*- Autoconf -*-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+# Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -11,11 +11,23 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
-# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# -*- Autoconf -*-
+# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Generated from amversion.in; do not edit by hand.
+
+# This program 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.
+
+# This program 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 this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# AM_AUTOMAKE_VERSION(VERSION)
# ----------------------------
@@ -28,15 +40,26 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
# Call AM_AUTOMAKE_VERSION so it can be traced.
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.9.5])])
+ [AM_AUTOMAKE_VERSION([1.9.3])])
-# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+# AM_AUX_DIR_EXPAND
-# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
+
+# This program 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.
+
+# This program 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 this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
@@ -83,16 +106,26 @@ AC_PREREQ([2.50])dnl
am_aux_dir=`cd $ac_aux_dir && pwd`
])
-# AM_CONDITIONAL -*- Autoconf -*-
+# AM_CONDITIONAL -*- Autoconf -*-
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Copyright (C) 1997, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
-# serial 7
+# This program 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.
+
+# This program 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 this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 6
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
# -------------------------------------
@@ -116,15 +149,26 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
+# serial 7 -*- Autoconf -*-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-# serial 8
+# This program 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.
+
+# This program 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 this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4,
@@ -133,6 +177,7 @@ fi])])
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
# _AM_DEPENDENCIES(NAME)
# ----------------------
# See how the compiler implements dependency checking.
@@ -272,16 +317,27 @@ AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
AC_SUBST([AMDEPBACKSLASH])
])
-# Generate code to set up dependency tracking. -*- Autoconf -*-
+# Generate code to set up dependency tracking. -*- Autoconf -*-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
+# Free Software Foundation, Inc.
-#serial 3
+# This program 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.
+
+# This program 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 this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+#serial 2
# _AM_OUTPUT_DEPENDENCY_COMMANDS
# ------------------------------
@@ -340,14 +396,25 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
])
-# Check for Java compiler. -*- Autoconf -*-
+# Check for Java compiler.
# For now we only handle the GNU compiler.
-# Copyright (C) 1999, 2000, 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc.
+
+# This program 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.
+
+# This program 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 this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
AC_DEFUN([AM_PROG_GCJ],[
AC_CHECK_PROGS(GCJ, gcj, gcj)
@@ -359,19 +426,30 @@ AC_SUBST(GCJFLAGS)
_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES(GCJ)])
])
-# Do all the work for Automake. -*- Autoconf -*-
+# Do all the work for Automake. -*- Autoconf -*-
+
+# This macro actually does too much some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-# serial 12
+# This program 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.
-# This macro actually does too much. Some checks are only needed if
-# your package does certain things. But this isn't really a big deal.
+# This program 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 this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 11
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
# AM_INIT_AUTOMAKE([OPTIONS])
@@ -473,27 +551,51 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
-# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
# AM_PROG_INSTALL_SH
# ------------------
# Define $install_sh.
+
+# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
+
+# This program 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.
+
+# This program 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 this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
AC_DEFUN([AM_PROG_INSTALL_SH],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
install_sh=${install_sh-"$am_aux_dir/install-sh"}
AC_SUBST(install_sh)])
-# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# -*- Autoconf -*-
+# Copyright (C) 2003 Free Software Foundation, Inc.
-# serial 2
+# This program 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.
+
+# This program 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 this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 1
# Check whether the underlying file-system supports filenames
# with a leading dot. For instance MS-DOS doesn't.
@@ -508,17 +610,28 @@ fi
rmdir .tst 2>/dev/null
AC_SUBST([am__leading_dot])])
-# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
+# Add --enable-maintainer-mode option to configure.
# From Jim Meyering
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004
# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-# serial 4
+# This program 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.
+
+# This program 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 this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 3
AC_DEFUN([AM_MAINTAINER_MODE],
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
@@ -537,15 +650,26 @@ AC_DEFUN([AM_MAINTAINER_MODE],
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
-# Check to see how 'make' treats includes. -*- Autoconf -*-
+# Check to see how 'make' treats includes. -*- Autoconf -*-
-# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
-# serial 3
+# This program 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.
+
+# This program 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 this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 2
# AM_MAKE_INCLUDE()
# -----------------
@@ -589,17 +713,29 @@ AC_MSG_RESULT([$_am_result])
rm -f confinc confmf
])
-# Copyright (C) 1999, 2000, 2001, 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 3
+# serial 2
# AM_PROG_CC_C_O
# --------------
# Like AC_PROG_CC_C_O, but changed for automake.
+
+# Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
+
+# This program 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.
+
+# This program 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 this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
AC_DEFUN([AM_PROG_CC_C_O],
[AC_REQUIRE([AC_PROG_CC_C_O])dnl
AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
@@ -617,16 +753,27 @@ if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
fi
])
-# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+# -*- Autoconf -*-
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-# serial 4
+# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
+
+# This program 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.
+
+# This program 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 this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 3
# AM_MISSING_PROG(NAME, PROGRAM)
# ------------------------------
@@ -652,16 +799,27 @@ else
fi
])
-# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
# AM_PROG_MKDIR_P
# ---------------
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
-#
+
+# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+
+# This program 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.
+
+# This program 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 this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
# created by `make install' are always world readable, even if the
# installer happens to have an overly restrictive umask (e.g. 077).
@@ -715,15 +873,26 @@ else
fi
AC_SUBST([mkdir_p])])
-# Helper functions for option handling. -*- Autoconf -*-
+# Helper functions for option handling. -*- Autoconf -*-
-# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
-# serial 3
+# This program 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.
+
+# This program 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 this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 2
# _AM_MANGLE_OPTION(NAME)
# -----------------------
@@ -748,16 +917,28 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-# Check to make sure that the build environment is sane. -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Check to make sure that the build environment is sane.
+#
-# serial 4
+# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
+
+# This program 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.
+
+# This program 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 this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 3
# AM_SANITY_CHECK
# ---------------
@@ -800,14 +981,25 @@ Check your system clock])
fi
AC_MSG_RESULT(yes)])
-# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
# AM_PROG_INSTALL_STRIP
-# ---------------------
+
+# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
+
+# This program 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.
+
+# This program 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 this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
# One issue with vendor `install' (even GNU) is that you can't
# specify the program used to strip binaries. This is especially
# annoying in cross-compiling environments, where the build's strip
@@ -830,13 +1022,25 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])])
# Check how to create a tarball. -*- Autoconf -*-
-# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Copyright (C) 2004 Free Software Foundation, Inc.
+
+# This program 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.
+
+# This program 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 this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 1
-# serial 2
# _AM_PROG_TAR(FORMAT)
# --------------------
diff --git a/libjava/boehm.cc b/libjava/boehm.cc
index 2e64b1ca6cc..af26c2b7b36 100644
--- a/libjava/boehm.cc
+++ b/libjava/boehm.cc
@@ -189,9 +189,11 @@ _Jv_MarkObj (void *addr, void *msp, void *msl, void *env)
// mark also the value pointed to. We check for isResolved
// since marking can happen before memory is allocated for
// static members.
- if (JvFieldIsRef (field) && field->isResolved())
+ // Note that field->u.addr may be null if the class c is
+ // JV_STATE_LOADED but not JV_STATE_PREPARED (initialized).
+ if (JvFieldIsRef (field) && p && field->isResolved())
{
- jobject val = *(jobject*) field->u.addr;
+ jobject val = *(jobject*) p;
p = (GC_PTR) val;
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
}
diff --git a/libjava/configure b/libjava/configure
index d689da0ad2c..1373373f0bf 100755
--- a/libjava/configure
+++ b/libjava/configure
@@ -13313,8 +13313,8 @@ fi
case "${which_gcj}" in
built)
GCJ="$built_gcc_dir/gcj -B`${PWDCMD-pwd}`/ -B$built_gcc_dir/"
- GCJH='$(MULTIBUILDTOP)../../$(host_subdir)/gcc/gcjh'
- ZIP='$(MULTIBUILDTOP)../../$(host_subdir)/fastjar/fastjar'
+ GCJH='$(top_builddir)/$(MULTIBUILDTOP)../../$(host_subdir)/gcc/gcjh'
+ ZIP='$(top_builddir)/$(MULTIBUILDTOP)../../$(host_subdir)/fastjar/fastjar'
;;
cross)
if test "x${with_newlib}" = "xyes"; then
@@ -13331,7 +13331,7 @@ case "${which_gcj}" in
GCJ="gcj -B`${PWDCMD-pwd}`/"
## In this case, gcj is found outside the build tree. However, zip is
## found in the build tree.
- ZIP='$(MULTIBUILDTOP)../$(COMPPATH)/fastjar/fastjar'
+ ZIP='$(top_builddir)/$(MULTIBUILDTOP)../$(COMPPATH)/fastjar/fastjar'
GCJH=gcjh
;;
esac
@@ -17572,6 +17572,12 @@ case " $CONFIG_FILES " in
ac_file=Makefile . ${libgcj_basedir}/../config-ml.in
;;
esac
+for ac_multi_file in $CONFIG_FILES; do
+ case $ac_multi_file in
+ */Makefile)
+ grep "^MULTI[^ ]* =" Makefile >> "$ac_multi_file" ;;
+ esac
+done
;;
esac
done
diff --git a/libjava/configure.ac b/libjava/configure.ac
index 8366523de90..2df1385c099 100644
--- a/libjava/configure.ac
+++ b/libjava/configure.ac
@@ -1067,8 +1067,8 @@ fi
case "${which_gcj}" in
built)
GCJ="$built_gcc_dir/gcj -B`${PWDCMD-pwd}`/ -B$built_gcc_dir/"
- GCJH='$(MULTIBUILDTOP)../../$(host_subdir)/gcc/gcjh'
- ZIP='$(MULTIBUILDTOP)../../$(host_subdir)/fastjar/fastjar'
+ GCJH='$(top_builddir)/$(MULTIBUILDTOP)../../$(host_subdir)/gcc/gcjh'
+ ZIP='$(top_builddir)/$(MULTIBUILDTOP)../../$(host_subdir)/fastjar/fastjar'
;;
cross)
if test "x${with_newlib}" = "xyes"; then
@@ -1085,7 +1085,7 @@ case "${which_gcj}" in
GCJ="gcj -B`${PWDCMD-pwd}`/"
## In this case, gcj is found outside the build tree. However, zip is
## found in the build tree.
- ZIP='$(MULTIBUILDTOP)../$(COMPPATH)/fastjar/fastjar'
+ ZIP='$(top_builddir)/$(MULTIBUILDTOP)../$(COMPPATH)/fastjar/fastjar'
GCJH=gcjh
;;
esac
@@ -1399,6 +1399,12 @@ case " $CONFIG_FILES " in
ac_file=Makefile . ${libgcj_basedir}/../config-ml.in
;;
esac
+for ac_multi_file in $CONFIG_FILES; do
+ case $ac_multi_file in
+ */Makefile)
+ grep "^MULTI[[^ ]]* =" Makefile >> "$ac_multi_file" ;;
+ esac
+done
],
srcdir=${srcdir}
host=${host}
diff --git a/libjava/external/Makefile.in b/libjava/external/Makefile.in
index 57f7c071529..86248b22f6f 100644
--- a/libjava/external/Makefile.in
+++ b/libjava/external/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# Makefile.in generated by automake 1.9.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -382,13 +382,7 @@ uninstall-info-am:
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
- @failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
+ @set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
@@ -400,7 +394,7 @@ $(RECURSIVE_TARGETS):
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
@@ -408,13 +402,7 @@ $(RECURSIVE_TARGETS):
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
- @failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
+ @set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
@@ -435,7 +423,7 @@ maintainer-clean-recursive:
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
diff --git a/libjava/external/sax/Makefile.am b/libjava/external/sax/Makefile.am
index 41760e53492..2d93a90532f 100644
--- a/libjava/external/sax/Makefile.am
+++ b/libjava/external/sax/Makefile.am
@@ -7,7 +7,7 @@ gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
## The compiler with whatever flags we want for both -c and -C
## compiles.
-GCJ_WITH_FLAGS = $(GCJ) --encoding=UTF-8 -Wno-deprecated -fbootclasspath=$(BOOTCLASSPATH)
+GCJ_WITH_FLAGS = $(GCJ) --encoding=UTF-8 -Wno-deprecated -fclasspath= -fbootclasspath=$(BOOTCLASSPATH)
BOOTCLASSPATH = $(here)'$(CLASSPATH_SEPARATOR)'$(srcdir)'$(CLASSPATH_SEPARATOR)'$(top_srcdir)'$(CLASSPATH_SEPARATOR)'$(top_builddir)
@@ -20,18 +20,24 @@ AM_GCJFLAGS = \
BUILT_SOURCES = classes.stamp
-classes.stamp: $(libsax_convenience_la_SOURCES)
+sax.jar: classes.stamp
+ find org -name '*.class' -print | $(ZIP) -cfME@ $@
+
+classes.stamp: $(source_files)
here=`pwd`; cd $(srcdir); \
- $(GCJ_WITH_FLAGS) -C -d $$here $(libsax_convenience_la_SOURCES)
+ $(GCJ_WITH_FLAGS) -C -d $$here $(source_files)
echo > classes.stamp
mostlyclean-local:
-find . -name '*.class' | xargs rm
- -rm classes.stamp
+ -rm classes.stamp sax.jar
+
+noinst_LTLIBRARIES = libsax-gcj.la
-noinst_LTLIBRARIES = libsax_convenience.la
+libsax_gcj_la_SOURCES = sax.jar
+libsax_gcj_la_GCJFLAGS = -findirect-dispatch $(AM_GCJFLAGS)
-libsax_convenience_la_SOURCES = \
+source_files = \
org/xml/sax/SAXNotSupportedException.java \
org/xml/sax/helpers/NamespaceSupport.java \
org/xml/sax/helpers/AttributesImpl.java \
diff --git a/libjava/external/sax/Makefile.in b/libjava/external/sax/Makefile.in
index 88bac2296e5..3336f0146c4 100644
--- a/libjava/external/sax/Makefile.in
+++ b/libjava/external/sax/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# Makefile.in generated by automake 1.9.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -14,7 +14,7 @@
@SET_MAKE@
-SOURCES = $(libsax_convenience_la_SOURCES)
+SOURCES = $(libsax_gcj_la_SOURCES)
srcdir = @srcdir@
top_srcdir = @top_srcdir@
@@ -59,37 +59,9 @@ CONFIG_HEADER = $(top_builddir)/include/config.h \
$(top_builddir)/gcj/libgcj-config.h
CONFIG_CLEAN_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
-libsax_convenience_la_LIBADD =
-am__dirstamp = $(am__leading_dot)dirstamp
-am_libsax_convenience_la_OBJECTS = \
- org/xml/sax/SAXNotSupportedException.lo \
- org/xml/sax/helpers/NamespaceSupport.lo \
- org/xml/sax/helpers/AttributesImpl.lo \
- org/xml/sax/helpers/LocatorImpl.lo \
- org/xml/sax/helpers/DefaultHandler.lo \
- org/xml/sax/helpers/AttributeListImpl.lo \
- org/xml/sax/helpers/ParserFactory.lo \
- org/xml/sax/helpers/NewInstance.lo \
- org/xml/sax/helpers/XMLFilterImpl.lo \
- org/xml/sax/helpers/ParserAdapter.lo \
- org/xml/sax/helpers/XMLReaderAdapter.lo \
- org/xml/sax/helpers/XMLReaderFactory.lo \
- org/xml/sax/HandlerBase.lo org/xml/sax/SAXException.lo \
- org/xml/sax/ContentHandler.lo \
- org/xml/sax/SAXNotRecognizedException.lo \
- org/xml/sax/ErrorHandler.lo org/xml/sax/AttributeList.lo \
- org/xml/sax/Locator.lo org/xml/sax/Attributes.lo \
- org/xml/sax/SAXParseException.lo org/xml/sax/XMLFilter.lo \
- org/xml/sax/EntityResolver.lo org/xml/sax/XMLReader.lo \
- org/xml/sax/ext/Locator2.lo org/xml/sax/ext/LexicalHandler.lo \
- org/xml/sax/ext/Attributes2Impl.lo \
- org/xml/sax/ext/DeclHandler.lo org/xml/sax/ext/Attributes2.lo \
- org/xml/sax/ext/EntityResolver2.lo \
- org/xml/sax/ext/Locator2Impl.lo \
- org/xml/sax/ext/DefaultHandler2.lo org/xml/sax/InputSource.lo \
- org/xml/sax/DocumentHandler.lo org/xml/sax/DTDHandler.lo \
- org/xml/sax/Parser.lo
-libsax_convenience_la_OBJECTS = $(am_libsax_convenience_la_OBJECTS)
+libsax_gcj_la_LIBADD =
+am_libsax_gcj_la_OBJECTS = libsax_gcj_la-sax.lo
+libsax_gcj_la_OBJECTS = $(am_libsax_gcj_la_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_builddir)/gcj
depcomp = $(SHELL) $(top_srcdir)/../depcomp
am__depfiles_maybe = depfiles
@@ -99,8 +71,8 @@ LTGCJCOMPILE = $(LIBTOOL) --mode=compile $(GCJ) $(AM_GCJFLAGS) \
GCJLD = $(GCJ)
GCJLINK = $(LIBTOOL) --mode=link $(GCJLD) $(AM_GCJFLAGS) $(GCJFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(libsax_convenience_la_SOURCES)
-DIST_SOURCES = $(libsax_convenience_la_SOURCES)
+SOURCES = $(libsax_gcj_la_SOURCES)
+DIST_SOURCES = $(libsax_gcj_la_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -327,7 +299,7 @@ AUTOMAKE_OPTIONS = foreign subdir-objects
# May be used by various substitution variables.
gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
-GCJ_WITH_FLAGS = $(GCJ) --encoding=UTF-8 -Wno-deprecated -fbootclasspath=$(BOOTCLASSPATH)
+GCJ_WITH_FLAGS = $(GCJ) --encoding=UTF-8 -Wno-deprecated -fclasspath= -fbootclasspath=$(BOOTCLASSPATH)
BOOTCLASSPATH = $(here)'$(CLASSPATH_SEPARATOR)'$(srcdir)'$(CLASSPATH_SEPARATOR)'$(top_srcdir)'$(CLASSPATH_SEPARATOR)'$(top_builddir)
AM_GCJFLAGS = \
-B$(top_builddir) \
@@ -337,8 +309,10 @@ AM_GCJFLAGS = \
-Wno-deprecated
BUILT_SOURCES = classes.stamp
-noinst_LTLIBRARIES = libsax_convenience.la
-libsax_convenience_la_SOURCES = \
+noinst_LTLIBRARIES = libsax-gcj.la
+libsax_gcj_la_SOURCES = sax.jar
+libsax_gcj_la_GCJFLAGS = -findirect-dispatch $(AM_GCJFLAGS)
+source_files = \
org/xml/sax/SAXNotSupportedException.java \
org/xml/sax/helpers/NamespaceSupport.java \
org/xml/sax/helpers/AttributesImpl.java \
@@ -380,7 +354,7 @@ all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
-.SUFFIXES: .java .lo .o .obj
+.SUFFIXES: .jar .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
@@ -419,226 +393,18 @@ clean-noinstLTLIBRARIES:
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
-org/xml/sax/$(am__dirstamp):
- @$(mkdir_p) org/xml/sax
- @: > org/xml/sax/$(am__dirstamp)
-org/xml/sax/$(DEPDIR)/$(am__dirstamp):
- @$(mkdir_p) org/xml/sax/$(DEPDIR)
- @: > org/xml/sax/$(DEPDIR)/$(am__dirstamp)
-org/xml/sax/SAXNotSupportedException.lo: org/xml/sax/$(am__dirstamp) \
- org/xml/sax/$(DEPDIR)/$(am__dirstamp)
-org/xml/sax/helpers/$(am__dirstamp):
- @$(mkdir_p) org/xml/sax/helpers
- @: > org/xml/sax/helpers/$(am__dirstamp)
-org/xml/sax/helpers/$(DEPDIR)/$(am__dirstamp):
- @$(mkdir_p) org/xml/sax/helpers/$(DEPDIR)
- @: > org/xml/sax/helpers/$(DEPDIR)/$(am__dirstamp)
-org/xml/sax/helpers/NamespaceSupport.lo: \
- org/xml/sax/helpers/$(am__dirstamp) \
- org/xml/sax/helpers/$(DEPDIR)/$(am__dirstamp)
-org/xml/sax/helpers/AttributesImpl.lo: \
- org/xml/sax/helpers/$(am__dirstamp) \
- org/xml/sax/helpers/$(DEPDIR)/$(am__dirstamp)
-org/xml/sax/helpers/LocatorImpl.lo: \
- org/xml/sax/helpers/$(am__dirstamp) \
- org/xml/sax/helpers/$(DEPDIR)/$(am__dirstamp)
-org/xml/sax/helpers/DefaultHandler.lo: \
- org/xml/sax/helpers/$(am__dirstamp) \
- org/xml/sax/helpers/$(DEPDIR)/$(am__dirstamp)
-org/xml/sax/helpers/AttributeListImpl.lo: \
- org/xml/sax/helpers/$(am__dirstamp) \
- org/xml/sax/helpers/$(DEPDIR)/$(am__dirstamp)
-org/xml/sax/helpers/ParserFactory.lo: \
- org/xml/sax/helpers/$(am__dirstamp) \
- org/xml/sax/helpers/$(DEPDIR)/$(am__dirstamp)
-org/xml/sax/helpers/NewInstance.lo: \
- org/xml/sax/helpers/$(am__dirstamp) \
- org/xml/sax/helpers/$(DEPDIR)/$(am__dirstamp)
-org/xml/sax/helpers/XMLFilterImpl.lo: \
- org/xml/sax/helpers/$(am__dirstamp) \
- org/xml/sax/helpers/$(DEPDIR)/$(am__dirstamp)
-org/xml/sax/helpers/ParserAdapter.lo: \
- org/xml/sax/helpers/$(am__dirstamp) \
- org/xml/sax/helpers/$(DEPDIR)/$(am__dirstamp)
-org/xml/sax/helpers/XMLReaderAdapter.lo: \
- org/xml/sax/helpers/$(am__dirstamp) \
- org/xml/sax/helpers/$(DEPDIR)/$(am__dirstamp)
-org/xml/sax/helpers/XMLReaderFactory.lo: \
- org/xml/sax/helpers/$(am__dirstamp) \
- org/xml/sax/helpers/$(DEPDIR)/$(am__dirstamp)
-org/xml/sax/HandlerBase.lo: org/xml/sax/$(am__dirstamp) \
- org/xml/sax/$(DEPDIR)/$(am__dirstamp)
-org/xml/sax/SAXException.lo: org/xml/sax/$(am__dirstamp) \
- org/xml/sax/$(DEPDIR)/$(am__dirstamp)
-org/xml/sax/ContentHandler.lo: org/xml/sax/$(am__dirstamp) \
- org/xml/sax/$(DEPDIR)/$(am__dirstamp)
-org/xml/sax/SAXNotRecognizedException.lo: org/xml/sax/$(am__dirstamp) \
- org/xml/sax/$(DEPDIR)/$(am__dirstamp)
-org/xml/sax/ErrorHandler.lo: org/xml/sax/$(am__dirstamp) \
- org/xml/sax/$(DEPDIR)/$(am__dirstamp)
-org/xml/sax/AttributeList.lo: org/xml/sax/$(am__dirstamp) \
- org/xml/sax/$(DEPDIR)/$(am__dirstamp)
-org/xml/sax/Locator.lo: org/xml/sax/$(am__dirstamp) \
- org/xml/sax/$(DEPDIR)/$(am__dirstamp)
-org/xml/sax/Attributes.lo: org/xml/sax/$(am__dirstamp) \
- org/xml/sax/$(DEPDIR)/$(am__dirstamp)
-org/xml/sax/SAXParseException.lo: org/xml/sax/$(am__dirstamp) \
- org/xml/sax/$(DEPDIR)/$(am__dirstamp)
-org/xml/sax/XMLFilter.lo: org/xml/sax/$(am__dirstamp) \
- org/xml/sax/$(DEPDIR)/$(am__dirstamp)
-org/xml/sax/EntityResolver.lo: org/xml/sax/$(am__dirstamp) \
- org/xml/sax/$(DEPDIR)/$(am__dirstamp)
-org/xml/sax/XMLReader.lo: org/xml/sax/$(am__dirstamp) \
- org/xml/sax/$(DEPDIR)/$(am__dirstamp)
-org/xml/sax/ext/$(am__dirstamp):
- @$(mkdir_p) org/xml/sax/ext
- @: > org/xml/sax/ext/$(am__dirstamp)
-org/xml/sax/ext/$(DEPDIR)/$(am__dirstamp):
- @$(mkdir_p) org/xml/sax/ext/$(DEPDIR)
- @: > org/xml/sax/ext/$(DEPDIR)/$(am__dirstamp)
-org/xml/sax/ext/Locator2.lo: org/xml/sax/ext/$(am__dirstamp) \
- org/xml/sax/ext/$(DEPDIR)/$(am__dirstamp)
-org/xml/sax/ext/LexicalHandler.lo: org/xml/sax/ext/$(am__dirstamp) \
- org/xml/sax/ext/$(DEPDIR)/$(am__dirstamp)
-org/xml/sax/ext/Attributes2Impl.lo: org/xml/sax/ext/$(am__dirstamp) \
- org/xml/sax/ext/$(DEPDIR)/$(am__dirstamp)
-org/xml/sax/ext/DeclHandler.lo: org/xml/sax/ext/$(am__dirstamp) \
- org/xml/sax/ext/$(DEPDIR)/$(am__dirstamp)
-org/xml/sax/ext/Attributes2.lo: org/xml/sax/ext/$(am__dirstamp) \
- org/xml/sax/ext/$(DEPDIR)/$(am__dirstamp)
-org/xml/sax/ext/EntityResolver2.lo: org/xml/sax/ext/$(am__dirstamp) \
- org/xml/sax/ext/$(DEPDIR)/$(am__dirstamp)
-org/xml/sax/ext/Locator2Impl.lo: org/xml/sax/ext/$(am__dirstamp) \
- org/xml/sax/ext/$(DEPDIR)/$(am__dirstamp)
-org/xml/sax/ext/DefaultHandler2.lo: org/xml/sax/ext/$(am__dirstamp) \
- org/xml/sax/ext/$(DEPDIR)/$(am__dirstamp)
-org/xml/sax/InputSource.lo: org/xml/sax/$(am__dirstamp) \
- org/xml/sax/$(DEPDIR)/$(am__dirstamp)
-org/xml/sax/DocumentHandler.lo: org/xml/sax/$(am__dirstamp) \
- org/xml/sax/$(DEPDIR)/$(am__dirstamp)
-org/xml/sax/DTDHandler.lo: org/xml/sax/$(am__dirstamp) \
- org/xml/sax/$(DEPDIR)/$(am__dirstamp)
-org/xml/sax/Parser.lo: org/xml/sax/$(am__dirstamp) \
- org/xml/sax/$(DEPDIR)/$(am__dirstamp)
-libsax_convenience.la: $(libsax_convenience_la_OBJECTS) $(libsax_convenience_la_DEPENDENCIES)
- $(GCJLINK) $(libsax_convenience_la_LDFLAGS) $(libsax_convenience_la_OBJECTS) $(libsax_convenience_la_LIBADD) $(LIBS)
+libsax-gcj.la: $(libsax_gcj_la_OBJECTS) $(libsax_gcj_la_DEPENDENCIES)
+ $(GCJLINK) $(libsax_gcj_la_LDFLAGS) $(libsax_gcj_la_OBJECTS) $(libsax_gcj_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
- -rm -f org/xml/sax/AttributeList.$(OBJEXT)
- -rm -f org/xml/sax/AttributeList.lo
- -rm -f org/xml/sax/Attributes.$(OBJEXT)
- -rm -f org/xml/sax/Attributes.lo
- -rm -f org/xml/sax/ContentHandler.$(OBJEXT)
- -rm -f org/xml/sax/ContentHandler.lo
- -rm -f org/xml/sax/DTDHandler.$(OBJEXT)
- -rm -f org/xml/sax/DTDHandler.lo
- -rm -f org/xml/sax/DocumentHandler.$(OBJEXT)
- -rm -f org/xml/sax/DocumentHandler.lo
- -rm -f org/xml/sax/EntityResolver.$(OBJEXT)
- -rm -f org/xml/sax/EntityResolver.lo
- -rm -f org/xml/sax/ErrorHandler.$(OBJEXT)
- -rm -f org/xml/sax/ErrorHandler.lo
- -rm -f org/xml/sax/HandlerBase.$(OBJEXT)
- -rm -f org/xml/sax/HandlerBase.lo
- -rm -f org/xml/sax/InputSource.$(OBJEXT)
- -rm -f org/xml/sax/InputSource.lo
- -rm -f org/xml/sax/Locator.$(OBJEXT)
- -rm -f org/xml/sax/Locator.lo
- -rm -f org/xml/sax/Parser.$(OBJEXT)
- -rm -f org/xml/sax/Parser.lo
- -rm -f org/xml/sax/SAXException.$(OBJEXT)
- -rm -f org/xml/sax/SAXException.lo
- -rm -f org/xml/sax/SAXNotRecognizedException.$(OBJEXT)
- -rm -f org/xml/sax/SAXNotRecognizedException.lo
- -rm -f org/xml/sax/SAXNotSupportedException.$(OBJEXT)
- -rm -f org/xml/sax/SAXNotSupportedException.lo
- -rm -f org/xml/sax/SAXParseException.$(OBJEXT)
- -rm -f org/xml/sax/SAXParseException.lo
- -rm -f org/xml/sax/XMLFilter.$(OBJEXT)
- -rm -f org/xml/sax/XMLFilter.lo
- -rm -f org/xml/sax/XMLReader.$(OBJEXT)
- -rm -f org/xml/sax/XMLReader.lo
- -rm -f org/xml/sax/ext/Attributes2.$(OBJEXT)
- -rm -f org/xml/sax/ext/Attributes2.lo
- -rm -f org/xml/sax/ext/Attributes2Impl.$(OBJEXT)
- -rm -f org/xml/sax/ext/Attributes2Impl.lo
- -rm -f org/xml/sax/ext/DeclHandler.$(OBJEXT)
- -rm -f org/xml/sax/ext/DeclHandler.lo
- -rm -f org/xml/sax/ext/DefaultHandler2.$(OBJEXT)
- -rm -f org/xml/sax/ext/DefaultHandler2.lo
- -rm -f org/xml/sax/ext/EntityResolver2.$(OBJEXT)
- -rm -f org/xml/sax/ext/EntityResolver2.lo
- -rm -f org/xml/sax/ext/LexicalHandler.$(OBJEXT)
- -rm -f org/xml/sax/ext/LexicalHandler.lo
- -rm -f org/xml/sax/ext/Locator2.$(OBJEXT)
- -rm -f org/xml/sax/ext/Locator2.lo
- -rm -f org/xml/sax/ext/Locator2Impl.$(OBJEXT)
- -rm -f org/xml/sax/ext/Locator2Impl.lo
- -rm -f org/xml/sax/helpers/AttributeListImpl.$(OBJEXT)
- -rm -f org/xml/sax/helpers/AttributeListImpl.lo
- -rm -f org/xml/sax/helpers/AttributesImpl.$(OBJEXT)
- -rm -f org/xml/sax/helpers/AttributesImpl.lo
- -rm -f org/xml/sax/helpers/DefaultHandler.$(OBJEXT)
- -rm -f org/xml/sax/helpers/DefaultHandler.lo
- -rm -f org/xml/sax/helpers/LocatorImpl.$(OBJEXT)
- -rm -f org/xml/sax/helpers/LocatorImpl.lo
- -rm -f org/xml/sax/helpers/NamespaceSupport.$(OBJEXT)
- -rm -f org/xml/sax/helpers/NamespaceSupport.lo
- -rm -f org/xml/sax/helpers/NewInstance.$(OBJEXT)
- -rm -f org/xml/sax/helpers/NewInstance.lo
- -rm -f org/xml/sax/helpers/ParserAdapter.$(OBJEXT)
- -rm -f org/xml/sax/helpers/ParserAdapter.lo
- -rm -f org/xml/sax/helpers/ParserFactory.$(OBJEXT)
- -rm -f org/xml/sax/helpers/ParserFactory.lo
- -rm -f org/xml/sax/helpers/XMLFilterImpl.$(OBJEXT)
- -rm -f org/xml/sax/helpers/XMLFilterImpl.lo
- -rm -f org/xml/sax/helpers/XMLReaderAdapter.$(OBJEXT)
- -rm -f org/xml/sax/helpers/XMLReaderAdapter.lo
- -rm -f org/xml/sax/helpers/XMLReaderFactory.$(OBJEXT)
- -rm -f org/xml/sax/helpers/XMLReaderFactory.lo
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@org/xml/sax/$(DEPDIR)/AttributeList.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/xml/sax/$(DEPDIR)/Attributes.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/xml/sax/$(DEPDIR)/ContentHandler.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/xml/sax/$(DEPDIR)/DTDHandler.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/xml/sax/$(DEPDIR)/DocumentHandler.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/xml/sax/$(DEPDIR)/EntityResolver.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/xml/sax/$(DEPDIR)/ErrorHandler.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/xml/sax/$(DEPDIR)/HandlerBase.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/xml/sax/$(DEPDIR)/InputSource.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/xml/sax/$(DEPDIR)/Locator.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/xml/sax/$(DEPDIR)/Parser.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/xml/sax/$(DEPDIR)/SAXException.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/xml/sax/$(DEPDIR)/SAXNotRecognizedException.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/xml/sax/$(DEPDIR)/SAXNotSupportedException.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/xml/sax/$(DEPDIR)/SAXParseException.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/xml/sax/$(DEPDIR)/XMLFilter.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/xml/sax/$(DEPDIR)/XMLReader.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/xml/sax/ext/$(DEPDIR)/Attributes2.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/xml/sax/ext/$(DEPDIR)/Attributes2Impl.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/xml/sax/ext/$(DEPDIR)/DeclHandler.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/xml/sax/ext/$(DEPDIR)/DefaultHandler2.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/xml/sax/ext/$(DEPDIR)/EntityResolver2.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/xml/sax/ext/$(DEPDIR)/LexicalHandler.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/xml/sax/ext/$(DEPDIR)/Locator2.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/xml/sax/ext/$(DEPDIR)/Locator2Impl.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/xml/sax/helpers/$(DEPDIR)/AttributeListImpl.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/xml/sax/helpers/$(DEPDIR)/AttributesImpl.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/xml/sax/helpers/$(DEPDIR)/DefaultHandler.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/xml/sax/helpers/$(DEPDIR)/LocatorImpl.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/xml/sax/helpers/$(DEPDIR)/NamespaceSupport.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/xml/sax/helpers/$(DEPDIR)/NewInstance.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/xml/sax/helpers/$(DEPDIR)/ParserAdapter.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/xml/sax/helpers/$(DEPDIR)/ParserFactory.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/xml/sax/helpers/$(DEPDIR)/XMLFilterImpl.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/xml/sax/helpers/$(DEPDIR)/XMLReaderAdapter.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/xml/sax/helpers/$(DEPDIR)/XMLReaderFactory.Plo@am__quote@
-
-.java.o:
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsax_gcj_la-sax.Plo@am__quote@
+
+.jar.o:
@am__fastdepGCJ_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`; \
@am__fastdepGCJ_TRUE@ if $(GCJCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ $<; \
@am__fastdepGCJ_TRUE@ then mv -f "$$depbase.Tpo" "$$depbase.Po"; else rm -f "$$depbase.Tpo"; exit 1; fi
@@ -646,7 +412,7 @@ distclean-compile:
@AMDEP_TRUE@@am__fastdepGCJ_FALSE@ DEPDIR=$(DEPDIR) $(GCJDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepGCJ_FALSE@ $(GCJCOMPILE) -c -o $@ $<
-.java.obj:
+.jar.obj:
@am__fastdepGCJ_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`; \
@am__fastdepGCJ_TRUE@ if $(GCJCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
@am__fastdepGCJ_TRUE@ then mv -f "$$depbase.Tpo" "$$depbase.Po"; else rm -f "$$depbase.Tpo"; exit 1; fi
@@ -654,7 +420,7 @@ distclean-compile:
@AMDEP_TRUE@@am__fastdepGCJ_FALSE@ DEPDIR=$(DEPDIR) $(GCJDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepGCJ_FALSE@ $(GCJCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
-.java.lo:
+.jar.lo:
@am__fastdepGCJ_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`; \
@am__fastdepGCJ_TRUE@ if $(LTGCJCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ $<; \
@am__fastdepGCJ_TRUE@ then mv -f "$$depbase.Tpo" "$$depbase.Plo"; else rm -f "$$depbase.Tpo"; exit 1; fi
@@ -662,14 +428,18 @@ distclean-compile:
@AMDEP_TRUE@@am__fastdepGCJ_FALSE@ DEPDIR=$(DEPDIR) $(GCJDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepGCJ_FALSE@ $(LTGCJCOMPILE) -c -o $@ $<
+libsax_gcj_la-sax.lo: sax.jar
+@am__fastdepGCJ_TRUE@ if $(LIBTOOL) --mode=compile $(GCJ) $(libsax_gcj_la_GCJFLAGS) $(GCJFLAGS) -MT libsax_gcj_la-sax.lo -MD -MP -MF "$(DEPDIR)/libsax_gcj_la-sax.Tpo" -c -o libsax_gcj_la-sax.lo `test -f 'sax.jar' || echo '$(srcdir)/'`sax.jar; \
+@am__fastdepGCJ_TRUE@ then mv -f "$(DEPDIR)/libsax_gcj_la-sax.Tpo" "$(DEPDIR)/libsax_gcj_la-sax.Plo"; else rm -f "$(DEPDIR)/libsax_gcj_la-sax.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepGCJ_FALSE@ source='sax.jar' object='libsax_gcj_la-sax.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepGCJ_FALSE@ DEPDIR=$(DEPDIR) $(GCJDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepGCJ_FALSE@ $(LIBTOOL) --mode=compile $(GCJ) $(libsax_gcj_la_GCJFLAGS) $(GCJFLAGS) -c -o libsax_gcj_la-sax.lo `test -f 'sax.jar' || echo '$(srcdir)/'`sax.jar
+
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
- -rm -rf org/xml/sax/.libs org/xml/sax/_libs
- -rm -rf org/xml/sax/ext/.libs org/xml/sax/ext/_libs
- -rm -rf org/xml/sax/helpers/.libs org/xml/sax/helpers/_libs
distclean-libtool:
-rm -f libtool
@@ -776,12 +546,6 @@ clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -rm -f org/xml/sax/$(DEPDIR)/$(am__dirstamp)
- -rm -f org/xml/sax/$(am__dirstamp)
- -rm -f org/xml/sax/ext/$(DEPDIR)/$(am__dirstamp)
- -rm -f org/xml/sax/ext/$(am__dirstamp)
- -rm -f org/xml/sax/helpers/$(DEPDIR)/$(am__dirstamp)
- -rm -f org/xml/sax/helpers/$(am__dirstamp)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -793,7 +557,7 @@ clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
mostlyclean-am
distclean: distclean-am
- -rm -rf org/xml/sax/$(DEPDIR) org/xml/sax/ext/$(DEPDIR) org/xml/sax/helpers/$(DEPDIR)
+ -rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
@@ -819,7 +583,7 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
- -rm -rf org/xml/sax/$(DEPDIR) org/xml/sax/ext/$(DEPDIR) org/xml/sax/helpers/$(DEPDIR)
+ -rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@@ -851,14 +615,17 @@ uninstall-am: uninstall-info-am
uninstall-am uninstall-info-am
-classes.stamp: $(libsax_convenience_la_SOURCES)
+sax.jar: classes.stamp
+ find org -name '*.class' -print | $(ZIP) -cfME@ $@
+
+classes.stamp: $(source_files)
here=`pwd`; cd $(srcdir); \
- $(GCJ_WITH_FLAGS) -C -d $$here $(libsax_convenience_la_SOURCES)
+ $(GCJ_WITH_FLAGS) -C -d $$here $(source_files)
echo > classes.stamp
mostlyclean-local:
-find . -name '*.class' | xargs rm
- -rm classes.stamp
+ -rm classes.stamp sax.jar
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/libjava/external/sax/org/xml/sax/helpers/NamespaceSupport.java b/libjava/external/sax/org/xml/sax/helpers/NamespaceSupport.java
index 17d80362664..5eb9e7c1ff5 100644
--- a/libjava/external/sax/org/xml/sax/helpers/NamespaceSupport.java
+++ b/libjava/external/sax/org/xml/sax/helpers/NamespaceSupport.java
@@ -2,7 +2,7 @@
// http://www.saxproject.org
// Written by David Megginson
// This class is in the Public Domain. NO WARRANTY!
-// $Id: NamespaceSupport.java,v 1.1 2005/02/02 00:41:54 tromey Exp $
+// $Id: NamespaceSupport.java,v 1.2 2005/03/24 00:04:07 tromey Exp $
package org.xml.sax.helpers;
@@ -113,7 +113,8 @@ public class NamespaceSupport
/**
* An empty enumeration.
*/
- private final static Enumeration EMPTY_ENUMERATION =
+ // GCJ LOCAL: work around gcj bug by making this package-private
+ final static Enumeration EMPTY_ENUMERATION =
new Vector().elements();
diff --git a/libjava/external/w3c_dom/Makefile.am b/libjava/external/w3c_dom/Makefile.am
index 9eaa39a39eb..b7ec429794c 100644
--- a/libjava/external/w3c_dom/Makefile.am
+++ b/libjava/external/w3c_dom/Makefile.am
@@ -7,7 +7,7 @@ gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
## The compiler with whatever flags we want for both -c and -C
## compiles.
-GCJ_WITH_FLAGS = $(GCJ) --encoding=UTF-8 -Wno-deprecated -fbootclasspath=$(BOOTCLASSPATH)
+GCJ_WITH_FLAGS = $(GCJ) --encoding=UTF-8 -Wno-deprecated -fclasspath= -fbootclasspath=$(BOOTCLASSPATH)
BOOTCLASSPATH = $(here)'$(CLASSPATH_SEPARATOR)'$(srcdir)'$(CLASSPATH_SEPARATOR)'$(top_srcdir)'$(CLASSPATH_SEPARATOR)'$(top_builddir)
@@ -20,18 +20,24 @@ AM_GCJFLAGS = \
BUILT_SOURCES = classes.stamp
-classes.stamp: $(libw3c_convenience_la_SOURCES)
+w3c.jar: classes.stamp
+ find org -name '*.class' -print | $(ZIP) -cfME@ $@
+
+classes.stamp: $(source_files)
here=`pwd`; cd $(srcdir); \
- $(GCJ_WITH_FLAGS) -C -d $$here $(libw3c_convenience_la_SOURCES)
+ $(GCJ_WITH_FLAGS) -C -d $$here $(source_files)
echo > classes.stamp
mostlyclean-local:
-find . -name '*.class' | xargs rm
- -rm classes.stamp
+ -rm classes.stamp w3c.jar
+
+noinst_LTLIBRARIES = libw3c-gcj.la
-noinst_LTLIBRARIES = libw3c_convenience.la
+libw3c_gcj_la_SOURCES = w3c.jar
+libw3c_gcj_la_GCJFLAGS = -findirect-dispatch $(AM_GCJFLAGS)
-libw3c_convenience_la_SOURCES = \
+source_files = \
org/w3c/dom/xpath/XPathNamespace.java \
org/w3c/dom/xpath/XPathResult.java \
org/w3c/dom/xpath/XPathException.java \
diff --git a/libjava/external/w3c_dom/Makefile.in b/libjava/external/w3c_dom/Makefile.in
index 8d64e75cbb3..acd6c025d6c 100644
--- a/libjava/external/w3c_dom/Makefile.in
+++ b/libjava/external/w3c_dom/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# Makefile.in generated by automake 1.9.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -14,7 +14,7 @@
@SET_MAKE@
-SOURCES = $(libw3c_convenience_la_SOURCES)
+SOURCES = $(libw3c_gcj_la_SOURCES)
srcdir = @srcdir@
top_srcdir = @top_srcdir@
@@ -59,131 +59,9 @@ CONFIG_HEADER = $(top_builddir)/include/config.h \
$(top_builddir)/gcj/libgcj-config.h
CONFIG_CLEAN_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
-libw3c_convenience_la_LIBADD =
-am__dirstamp = $(am__leading_dot)dirstamp
-am_libw3c_convenience_la_OBJECTS = \
- org/w3c/dom/xpath/XPathNamespace.lo \
- org/w3c/dom/xpath/XPathResult.lo \
- org/w3c/dom/xpath/XPathException.lo \
- org/w3c/dom/xpath/XPathExpression.lo \
- org/w3c/dom/xpath/XPathNSResolver.lo \
- org/w3c/dom/xpath/XPathEvaluator.lo \
- org/w3c/dom/DOMException.lo org/w3c/dom/Comment.lo \
- org/w3c/dom/stylesheets/DocumentStyle.lo \
- org/w3c/dom/stylesheets/MediaList.lo \
- org/w3c/dom/stylesheets/LinkStyle.lo \
- org/w3c/dom/stylesheets/StyleSheet.lo \
- org/w3c/dom/stylesheets/StyleSheetList.lo org/w3c/dom/Attr.lo \
- org/w3c/dom/Notation.lo org/w3c/dom/TypeInfo.lo \
- org/w3c/dom/html2/HTMLIsIndexElement.lo \
- org/w3c/dom/html2/HTMLTableColElement.lo \
- org/w3c/dom/html2/HTMLLinkElement.lo \
- org/w3c/dom/html2/HTMLTitleElement.lo \
- org/w3c/dom/html2/HTMLBRElement.lo \
- org/w3c/dom/html2/HTMLHeadElement.lo \
- org/w3c/dom/html2/HTMLHtmlElement.lo \
- org/w3c/dom/html2/HTMLScriptElement.lo \
- org/w3c/dom/html2/HTMLTableRowElement.lo \
- org/w3c/dom/html2/HTMLOptionsCollection.lo \
- org/w3c/dom/html2/HTMLTableCellElement.lo \
- org/w3c/dom/html2/HTMLDListElement.lo \
- org/w3c/dom/html2/HTMLFieldSetElement.lo \
- org/w3c/dom/html2/HTMLImageElement.lo \
- org/w3c/dom/html2/HTMLHRElement.lo \
- org/w3c/dom/html2/HTMLModElement.lo \
- org/w3c/dom/html2/HTMLHeadingElement.lo \
- org/w3c/dom/html2/HTMLTableElement.lo \
- org/w3c/dom/html2/HTMLAreaElement.lo \
- org/w3c/dom/html2/HTMLOptGroupElement.lo \
- org/w3c/dom/html2/HTMLIFrameElement.lo \
- org/w3c/dom/html2/HTMLDirectoryElement.lo \
- org/w3c/dom/html2/HTMLParamElement.lo \
- org/w3c/dom/html2/HTMLLegendElement.lo \
- org/w3c/dom/html2/HTMLFrameElement.lo \
- org/w3c/dom/html2/HTMLFormElement.lo \
- org/w3c/dom/html2/HTMLStyleElement.lo \
- org/w3c/dom/html2/HTMLFrameSetElement.lo \
- org/w3c/dom/html2/HTMLCollection.lo \
- org/w3c/dom/html2/HTMLAnchorElement.lo \
- org/w3c/dom/html2/HTMLLabelElement.lo \
- org/w3c/dom/html2/HTMLBodyElement.lo \
- org/w3c/dom/html2/HTMLOptionElement.lo \
- org/w3c/dom/html2/HTMLTableSectionElement.lo \
- org/w3c/dom/html2/HTMLAppletElement.lo \
- org/w3c/dom/html2/HTMLSelectElement.lo \
- org/w3c/dom/html2/HTMLMetaElement.lo \
- org/w3c/dom/html2/HTMLMenuElement.lo \
- org/w3c/dom/html2/HTMLDivElement.lo \
- org/w3c/dom/html2/HTMLLIElement.lo \
- org/w3c/dom/html2/HTMLFontElement.lo \
- org/w3c/dom/html2/HTMLOListElement.lo \
- org/w3c/dom/html2/HTMLBaseFontElement.lo \
- org/w3c/dom/html2/HTMLElement.lo \
- org/w3c/dom/html2/HTMLTableCaptionElement.lo \
- org/w3c/dom/html2/HTMLTextAreaElement.lo \
- org/w3c/dom/html2/HTMLPreElement.lo \
- org/w3c/dom/html2/HTMLObjectElement.lo \
- org/w3c/dom/html2/HTMLBaseElement.lo \
- org/w3c/dom/html2/HTMLUListElement.lo \
- org/w3c/dom/html2/HTMLMapElement.lo \
- org/w3c/dom/html2/HTMLParagraphElement.lo \
- org/w3c/dom/html2/HTMLButtonElement.lo \
- org/w3c/dom/html2/HTMLQuoteElement.lo \
- org/w3c/dom/html2/HTMLInputElement.lo \
- org/w3c/dom/html2/HTMLDocument.lo org/w3c/dom/ls/LSParser.lo \
- org/w3c/dom/ls/LSSerializerFilter.lo \
- org/w3c/dom/ls/LSLoadEvent.lo \
- org/w3c/dom/ls/DOMImplementationLS.lo \
- org/w3c/dom/ls/LSException.lo org/w3c/dom/ls/LSSerializer.lo \
- org/w3c/dom/ls/LSResourceResolver.lo \
- org/w3c/dom/ls/LSOutput.lo org/w3c/dom/ls/LSInput.lo \
- org/w3c/dom/ls/LSProgressEvent.lo \
- org/w3c/dom/ls/LSParserFilter.lo org/w3c/dom/DOMLocator.lo \
- org/w3c/dom/DOMStringList.lo org/w3c/dom/DocumentFragment.lo \
- org/w3c/dom/events/MutationEvent.lo \
- org/w3c/dom/events/UIEvent.lo \
- org/w3c/dom/events/EventListener.lo \
- org/w3c/dom/events/Event.lo org/w3c/dom/events/MouseEvent.lo \
- org/w3c/dom/events/EventTarget.lo \
- org/w3c/dom/events/DocumentEvent.lo \
- org/w3c/dom/events/EventException.lo \
- org/w3c/dom/EntityReference.lo org/w3c/dom/DOMErrorHandler.lo \
- org/w3c/dom/views/AbstractView.lo \
- org/w3c/dom/views/DocumentView.lo org/w3c/dom/DOMError.lo \
- org/w3c/dom/bootstrap/DOMImplementationRegistry.lo \
- org/w3c/dom/traversal/TreeWalker.lo \
- org/w3c/dom/traversal/NodeFilter.lo \
- org/w3c/dom/traversal/DocumentTraversal.lo \
- org/w3c/dom/traversal/NodeIterator.lo \
- org/w3c/dom/CharacterData.lo org/w3c/dom/DOMConfiguration.lo \
- org/w3c/dom/css/CSSRule.lo org/w3c/dom/css/Rect.lo \
- org/w3c/dom/css/CSSStyleSheet.lo \
- org/w3c/dom/css/CSSFontFaceRule.lo \
- org/w3c/dom/css/CSSPrimitiveValue.lo \
- org/w3c/dom/css/CSSRuleList.lo org/w3c/dom/css/ViewCSS.lo \
- org/w3c/dom/css/CSSStyleRule.lo \
- org/w3c/dom/css/CSSUnknownRule.lo org/w3c/dom/css/RGBColor.lo \
- org/w3c/dom/css/ElementCSSInlineStyle.lo \
- org/w3c/dom/css/CSSMediaRule.lo \
- org/w3c/dom/css/CSS2Properties.lo org/w3c/dom/css/CSSValue.lo \
- org/w3c/dom/css/CSSStyleDeclaration.lo \
- org/w3c/dom/css/DOMImplementationCSS.lo \
- org/w3c/dom/css/CSSCharsetRule.lo org/w3c/dom/css/Counter.lo \
- org/w3c/dom/css/CSSPageRule.lo org/w3c/dom/css/DocumentCSS.lo \
- org/w3c/dom/css/CSSValueList.lo \
- org/w3c/dom/css/CSSImportRule.lo org/w3c/dom/NameList.lo \
- org/w3c/dom/Element.lo org/w3c/dom/Document.lo \
- org/w3c/dom/ranges/Range.lo \
- org/w3c/dom/ranges/RangeException.lo \
- org/w3c/dom/ranges/DocumentRange.lo \
- org/w3c/dom/DOMImplementationList.lo org/w3c/dom/Entity.lo \
- org/w3c/dom/UserDataHandler.lo \
- org/w3c/dom/DOMImplementation.lo org/w3c/dom/CDATASection.lo \
- org/w3c/dom/ProcessingInstruction.lo org/w3c/dom/Node.lo \
- org/w3c/dom/NamedNodeMap.lo org/w3c/dom/NodeList.lo \
- org/w3c/dom/Text.lo org/w3c/dom/DocumentType.lo \
- org/w3c/dom/DOMImplementationSource.lo
-libw3c_convenience_la_OBJECTS = $(am_libw3c_convenience_la_OBJECTS)
+libw3c_gcj_la_LIBADD =
+am_libw3c_gcj_la_OBJECTS = libw3c_gcj_la-w3c.lo
+libw3c_gcj_la_OBJECTS = $(am_libw3c_gcj_la_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_builddir)/gcj
depcomp = $(SHELL) $(top_srcdir)/../depcomp
am__depfiles_maybe = depfiles
@@ -193,8 +71,8 @@ LTGCJCOMPILE = $(LIBTOOL) --mode=compile $(GCJ) $(AM_GCJFLAGS) \
GCJLD = $(GCJ)
GCJLINK = $(LIBTOOL) --mode=link $(GCJLD) $(AM_GCJFLAGS) $(GCJFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(libw3c_convenience_la_SOURCES)
-DIST_SOURCES = $(libw3c_convenience_la_SOURCES)
+SOURCES = $(libw3c_gcj_la_SOURCES)
+DIST_SOURCES = $(libw3c_gcj_la_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -421,7 +299,7 @@ AUTOMAKE_OPTIONS = foreign subdir-objects
# May be used by various substitution variables.
gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
-GCJ_WITH_FLAGS = $(GCJ) --encoding=UTF-8 -Wno-deprecated -fbootclasspath=$(BOOTCLASSPATH)
+GCJ_WITH_FLAGS = $(GCJ) --encoding=UTF-8 -Wno-deprecated -fclasspath= -fbootclasspath=$(BOOTCLASSPATH)
BOOTCLASSPATH = $(here)'$(CLASSPATH_SEPARATOR)'$(srcdir)'$(CLASSPATH_SEPARATOR)'$(top_srcdir)'$(CLASSPATH_SEPARATOR)'$(top_builddir)
AM_GCJFLAGS = \
-B$(top_builddir) \
@@ -431,8 +309,10 @@ AM_GCJFLAGS = \
-Wno-deprecated
BUILT_SOURCES = classes.stamp
-noinst_LTLIBRARIES = libw3c_convenience.la
-libw3c_convenience_la_SOURCES = \
+noinst_LTLIBRARIES = libw3c-gcj.la
+libw3c_gcj_la_SOURCES = w3c.jar
+libw3c_gcj_la_GCJFLAGS = -findirect-dispatch $(AM_GCJFLAGS)
+source_files = \
org/w3c/dom/xpath/XPathNamespace.java \
org/w3c/dom/xpath/XPathResult.java \
org/w3c/dom/xpath/XPathException.java \
@@ -584,7 +464,7 @@ all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
-.SUFFIXES: .java .lo .o .obj
+.SUFFIXES: .jar .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
@@ -623,888 +503,18 @@ clean-noinstLTLIBRARIES:
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
-org/w3c/dom/xpath/$(am__dirstamp):
- @$(mkdir_p) org/w3c/dom/xpath
- @: > org/w3c/dom/xpath/$(am__dirstamp)
-org/w3c/dom/xpath/$(DEPDIR)/$(am__dirstamp):
- @$(mkdir_p) org/w3c/dom/xpath/$(DEPDIR)
- @: > org/w3c/dom/xpath/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/xpath/XPathNamespace.lo: \
- org/w3c/dom/xpath/$(am__dirstamp) \
- org/w3c/dom/xpath/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/xpath/XPathResult.lo: org/w3c/dom/xpath/$(am__dirstamp) \
- org/w3c/dom/xpath/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/xpath/XPathException.lo: \
- org/w3c/dom/xpath/$(am__dirstamp) \
- org/w3c/dom/xpath/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/xpath/XPathExpression.lo: \
- org/w3c/dom/xpath/$(am__dirstamp) \
- org/w3c/dom/xpath/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/xpath/XPathNSResolver.lo: \
- org/w3c/dom/xpath/$(am__dirstamp) \
- org/w3c/dom/xpath/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/xpath/XPathEvaluator.lo: \
- org/w3c/dom/xpath/$(am__dirstamp) \
- org/w3c/dom/xpath/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/$(am__dirstamp):
- @$(mkdir_p) org/w3c/dom
- @: > org/w3c/dom/$(am__dirstamp)
-org/w3c/dom/$(DEPDIR)/$(am__dirstamp):
- @$(mkdir_p) org/w3c/dom/$(DEPDIR)
- @: > org/w3c/dom/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/DOMException.lo: org/w3c/dom/$(am__dirstamp) \
- org/w3c/dom/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/Comment.lo: org/w3c/dom/$(am__dirstamp) \
- org/w3c/dom/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/stylesheets/$(am__dirstamp):
- @$(mkdir_p) org/w3c/dom/stylesheets
- @: > org/w3c/dom/stylesheets/$(am__dirstamp)
-org/w3c/dom/stylesheets/$(DEPDIR)/$(am__dirstamp):
- @$(mkdir_p) org/w3c/dom/stylesheets/$(DEPDIR)
- @: > org/w3c/dom/stylesheets/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/stylesheets/DocumentStyle.lo: \
- org/w3c/dom/stylesheets/$(am__dirstamp) \
- org/w3c/dom/stylesheets/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/stylesheets/MediaList.lo: \
- org/w3c/dom/stylesheets/$(am__dirstamp) \
- org/w3c/dom/stylesheets/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/stylesheets/LinkStyle.lo: \
- org/w3c/dom/stylesheets/$(am__dirstamp) \
- org/w3c/dom/stylesheets/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/stylesheets/StyleSheet.lo: \
- org/w3c/dom/stylesheets/$(am__dirstamp) \
- org/w3c/dom/stylesheets/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/stylesheets/StyleSheetList.lo: \
- org/w3c/dom/stylesheets/$(am__dirstamp) \
- org/w3c/dom/stylesheets/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/Attr.lo: org/w3c/dom/$(am__dirstamp) \
- org/w3c/dom/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/Notation.lo: org/w3c/dom/$(am__dirstamp) \
- org/w3c/dom/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/TypeInfo.lo: org/w3c/dom/$(am__dirstamp) \
- org/w3c/dom/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/$(am__dirstamp):
- @$(mkdir_p) org/w3c/dom/html2
- @: > org/w3c/dom/html2/$(am__dirstamp)
-org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp):
- @$(mkdir_p) org/w3c/dom/html2/$(DEPDIR)
- @: > org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLIsIndexElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLTableColElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLLinkElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLTitleElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLBRElement.lo: org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLHeadElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLHtmlElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLScriptElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLTableRowElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLOptionsCollection.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLTableCellElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLDListElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLFieldSetElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLImageElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLHRElement.lo: org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLModElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLHeadingElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLTableElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLAreaElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLOptGroupElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLIFrameElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLDirectoryElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLParamElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLLegendElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLFrameElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLFormElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLStyleElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLFrameSetElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLCollection.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLAnchorElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLLabelElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLBodyElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLOptionElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLTableSectionElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLAppletElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLSelectElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLMetaElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLMenuElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLDivElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLLIElement.lo: org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLFontElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLOListElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLBaseFontElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLElement.lo: org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLTableCaptionElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLTextAreaElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLPreElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLObjectElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLBaseElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLUListElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLMapElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLParagraphElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLButtonElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLQuoteElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLInputElement.lo: \
- org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/html2/HTMLDocument.lo: org/w3c/dom/html2/$(am__dirstamp) \
- org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/ls/$(am__dirstamp):
- @$(mkdir_p) org/w3c/dom/ls
- @: > org/w3c/dom/ls/$(am__dirstamp)
-org/w3c/dom/ls/$(DEPDIR)/$(am__dirstamp):
- @$(mkdir_p) org/w3c/dom/ls/$(DEPDIR)
- @: > org/w3c/dom/ls/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/ls/LSParser.lo: org/w3c/dom/ls/$(am__dirstamp) \
- org/w3c/dom/ls/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/ls/LSSerializerFilter.lo: org/w3c/dom/ls/$(am__dirstamp) \
- org/w3c/dom/ls/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/ls/LSLoadEvent.lo: org/w3c/dom/ls/$(am__dirstamp) \
- org/w3c/dom/ls/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/ls/DOMImplementationLS.lo: org/w3c/dom/ls/$(am__dirstamp) \
- org/w3c/dom/ls/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/ls/LSException.lo: org/w3c/dom/ls/$(am__dirstamp) \
- org/w3c/dom/ls/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/ls/LSSerializer.lo: org/w3c/dom/ls/$(am__dirstamp) \
- org/w3c/dom/ls/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/ls/LSResourceResolver.lo: org/w3c/dom/ls/$(am__dirstamp) \
- org/w3c/dom/ls/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/ls/LSOutput.lo: org/w3c/dom/ls/$(am__dirstamp) \
- org/w3c/dom/ls/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/ls/LSInput.lo: org/w3c/dom/ls/$(am__dirstamp) \
- org/w3c/dom/ls/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/ls/LSProgressEvent.lo: org/w3c/dom/ls/$(am__dirstamp) \
- org/w3c/dom/ls/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/ls/LSParserFilter.lo: org/w3c/dom/ls/$(am__dirstamp) \
- org/w3c/dom/ls/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/DOMLocator.lo: org/w3c/dom/$(am__dirstamp) \
- org/w3c/dom/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/DOMStringList.lo: org/w3c/dom/$(am__dirstamp) \
- org/w3c/dom/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/DocumentFragment.lo: org/w3c/dom/$(am__dirstamp) \
- org/w3c/dom/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/events/$(am__dirstamp):
- @$(mkdir_p) org/w3c/dom/events
- @: > org/w3c/dom/events/$(am__dirstamp)
-org/w3c/dom/events/$(DEPDIR)/$(am__dirstamp):
- @$(mkdir_p) org/w3c/dom/events/$(DEPDIR)
- @: > org/w3c/dom/events/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/events/MutationEvent.lo: \
- org/w3c/dom/events/$(am__dirstamp) \
- org/w3c/dom/events/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/events/UIEvent.lo: org/w3c/dom/events/$(am__dirstamp) \
- org/w3c/dom/events/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/events/EventListener.lo: \
- org/w3c/dom/events/$(am__dirstamp) \
- org/w3c/dom/events/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/events/Event.lo: org/w3c/dom/events/$(am__dirstamp) \
- org/w3c/dom/events/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/events/MouseEvent.lo: org/w3c/dom/events/$(am__dirstamp) \
- org/w3c/dom/events/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/events/EventTarget.lo: org/w3c/dom/events/$(am__dirstamp) \
- org/w3c/dom/events/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/events/DocumentEvent.lo: \
- org/w3c/dom/events/$(am__dirstamp) \
- org/w3c/dom/events/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/events/EventException.lo: \
- org/w3c/dom/events/$(am__dirstamp) \
- org/w3c/dom/events/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/EntityReference.lo: org/w3c/dom/$(am__dirstamp) \
- org/w3c/dom/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/DOMErrorHandler.lo: org/w3c/dom/$(am__dirstamp) \
- org/w3c/dom/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/views/$(am__dirstamp):
- @$(mkdir_p) org/w3c/dom/views
- @: > org/w3c/dom/views/$(am__dirstamp)
-org/w3c/dom/views/$(DEPDIR)/$(am__dirstamp):
- @$(mkdir_p) org/w3c/dom/views/$(DEPDIR)
- @: > org/w3c/dom/views/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/views/AbstractView.lo: org/w3c/dom/views/$(am__dirstamp) \
- org/w3c/dom/views/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/views/DocumentView.lo: org/w3c/dom/views/$(am__dirstamp) \
- org/w3c/dom/views/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/DOMError.lo: org/w3c/dom/$(am__dirstamp) \
- org/w3c/dom/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/bootstrap/$(am__dirstamp):
- @$(mkdir_p) org/w3c/dom/bootstrap
- @: > org/w3c/dom/bootstrap/$(am__dirstamp)
-org/w3c/dom/bootstrap/$(DEPDIR)/$(am__dirstamp):
- @$(mkdir_p) org/w3c/dom/bootstrap/$(DEPDIR)
- @: > org/w3c/dom/bootstrap/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/bootstrap/DOMImplementationRegistry.lo: \
- org/w3c/dom/bootstrap/$(am__dirstamp) \
- org/w3c/dom/bootstrap/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/traversal/$(am__dirstamp):
- @$(mkdir_p) org/w3c/dom/traversal
- @: > org/w3c/dom/traversal/$(am__dirstamp)
-org/w3c/dom/traversal/$(DEPDIR)/$(am__dirstamp):
- @$(mkdir_p) org/w3c/dom/traversal/$(DEPDIR)
- @: > org/w3c/dom/traversal/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/traversal/TreeWalker.lo: \
- org/w3c/dom/traversal/$(am__dirstamp) \
- org/w3c/dom/traversal/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/traversal/NodeFilter.lo: \
- org/w3c/dom/traversal/$(am__dirstamp) \
- org/w3c/dom/traversal/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/traversal/DocumentTraversal.lo: \
- org/w3c/dom/traversal/$(am__dirstamp) \
- org/w3c/dom/traversal/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/traversal/NodeIterator.lo: \
- org/w3c/dom/traversal/$(am__dirstamp) \
- org/w3c/dom/traversal/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/CharacterData.lo: org/w3c/dom/$(am__dirstamp) \
- org/w3c/dom/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/DOMConfiguration.lo: org/w3c/dom/$(am__dirstamp) \
- org/w3c/dom/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/css/$(am__dirstamp):
- @$(mkdir_p) org/w3c/dom/css
- @: > org/w3c/dom/css/$(am__dirstamp)
-org/w3c/dom/css/$(DEPDIR)/$(am__dirstamp):
- @$(mkdir_p) org/w3c/dom/css/$(DEPDIR)
- @: > org/w3c/dom/css/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/css/CSSRule.lo: org/w3c/dom/css/$(am__dirstamp) \
- org/w3c/dom/css/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/css/Rect.lo: org/w3c/dom/css/$(am__dirstamp) \
- org/w3c/dom/css/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/css/CSSStyleSheet.lo: org/w3c/dom/css/$(am__dirstamp) \
- org/w3c/dom/css/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/css/CSSFontFaceRule.lo: org/w3c/dom/css/$(am__dirstamp) \
- org/w3c/dom/css/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/css/CSSPrimitiveValue.lo: org/w3c/dom/css/$(am__dirstamp) \
- org/w3c/dom/css/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/css/CSSRuleList.lo: org/w3c/dom/css/$(am__dirstamp) \
- org/w3c/dom/css/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/css/ViewCSS.lo: org/w3c/dom/css/$(am__dirstamp) \
- org/w3c/dom/css/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/css/CSSStyleRule.lo: org/w3c/dom/css/$(am__dirstamp) \
- org/w3c/dom/css/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/css/CSSUnknownRule.lo: org/w3c/dom/css/$(am__dirstamp) \
- org/w3c/dom/css/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/css/RGBColor.lo: org/w3c/dom/css/$(am__dirstamp) \
- org/w3c/dom/css/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/css/ElementCSSInlineStyle.lo: \
- org/w3c/dom/css/$(am__dirstamp) \
- org/w3c/dom/css/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/css/CSSMediaRule.lo: org/w3c/dom/css/$(am__dirstamp) \
- org/w3c/dom/css/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/css/CSS2Properties.lo: org/w3c/dom/css/$(am__dirstamp) \
- org/w3c/dom/css/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/css/CSSValue.lo: org/w3c/dom/css/$(am__dirstamp) \
- org/w3c/dom/css/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/css/CSSStyleDeclaration.lo: \
- org/w3c/dom/css/$(am__dirstamp) \
- org/w3c/dom/css/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/css/DOMImplementationCSS.lo: \
- org/w3c/dom/css/$(am__dirstamp) \
- org/w3c/dom/css/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/css/CSSCharsetRule.lo: org/w3c/dom/css/$(am__dirstamp) \
- org/w3c/dom/css/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/css/Counter.lo: org/w3c/dom/css/$(am__dirstamp) \
- org/w3c/dom/css/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/css/CSSPageRule.lo: org/w3c/dom/css/$(am__dirstamp) \
- org/w3c/dom/css/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/css/DocumentCSS.lo: org/w3c/dom/css/$(am__dirstamp) \
- org/w3c/dom/css/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/css/CSSValueList.lo: org/w3c/dom/css/$(am__dirstamp) \
- org/w3c/dom/css/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/css/CSSImportRule.lo: org/w3c/dom/css/$(am__dirstamp) \
- org/w3c/dom/css/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/NameList.lo: org/w3c/dom/$(am__dirstamp) \
- org/w3c/dom/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/Element.lo: org/w3c/dom/$(am__dirstamp) \
- org/w3c/dom/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/Document.lo: org/w3c/dom/$(am__dirstamp) \
- org/w3c/dom/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/ranges/$(am__dirstamp):
- @$(mkdir_p) org/w3c/dom/ranges
- @: > org/w3c/dom/ranges/$(am__dirstamp)
-org/w3c/dom/ranges/$(DEPDIR)/$(am__dirstamp):
- @$(mkdir_p) org/w3c/dom/ranges/$(DEPDIR)
- @: > org/w3c/dom/ranges/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/ranges/Range.lo: org/w3c/dom/ranges/$(am__dirstamp) \
- org/w3c/dom/ranges/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/ranges/RangeException.lo: \
- org/w3c/dom/ranges/$(am__dirstamp) \
- org/w3c/dom/ranges/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/ranges/DocumentRange.lo: \
- org/w3c/dom/ranges/$(am__dirstamp) \
- org/w3c/dom/ranges/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/DOMImplementationList.lo: org/w3c/dom/$(am__dirstamp) \
- org/w3c/dom/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/Entity.lo: org/w3c/dom/$(am__dirstamp) \
- org/w3c/dom/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/UserDataHandler.lo: org/w3c/dom/$(am__dirstamp) \
- org/w3c/dom/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/DOMImplementation.lo: org/w3c/dom/$(am__dirstamp) \
- org/w3c/dom/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/CDATASection.lo: org/w3c/dom/$(am__dirstamp) \
- org/w3c/dom/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/ProcessingInstruction.lo: org/w3c/dom/$(am__dirstamp) \
- org/w3c/dom/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/Node.lo: org/w3c/dom/$(am__dirstamp) \
- org/w3c/dom/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/NamedNodeMap.lo: org/w3c/dom/$(am__dirstamp) \
- org/w3c/dom/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/NodeList.lo: org/w3c/dom/$(am__dirstamp) \
- org/w3c/dom/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/Text.lo: org/w3c/dom/$(am__dirstamp) \
- org/w3c/dom/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/DocumentType.lo: org/w3c/dom/$(am__dirstamp) \
- org/w3c/dom/$(DEPDIR)/$(am__dirstamp)
-org/w3c/dom/DOMImplementationSource.lo: org/w3c/dom/$(am__dirstamp) \
- org/w3c/dom/$(DEPDIR)/$(am__dirstamp)
-libw3c_convenience.la: $(libw3c_convenience_la_OBJECTS) $(libw3c_convenience_la_DEPENDENCIES)
- $(GCJLINK) $(libw3c_convenience_la_LDFLAGS) $(libw3c_convenience_la_OBJECTS) $(libw3c_convenience_la_LIBADD) $(LIBS)
+libw3c-gcj.la: $(libw3c_gcj_la_OBJECTS) $(libw3c_gcj_la_DEPENDENCIES)
+ $(GCJLINK) $(libw3c_gcj_la_LDFLAGS) $(libw3c_gcj_la_OBJECTS) $(libw3c_gcj_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
- -rm -f org/w3c/dom/Attr.$(OBJEXT)
- -rm -f org/w3c/dom/Attr.lo
- -rm -f org/w3c/dom/CDATASection.$(OBJEXT)
- -rm -f org/w3c/dom/CDATASection.lo
- -rm -f org/w3c/dom/CharacterData.$(OBJEXT)
- -rm -f org/w3c/dom/CharacterData.lo
- -rm -f org/w3c/dom/Comment.$(OBJEXT)
- -rm -f org/w3c/dom/Comment.lo
- -rm -f org/w3c/dom/DOMConfiguration.$(OBJEXT)
- -rm -f org/w3c/dom/DOMConfiguration.lo
- -rm -f org/w3c/dom/DOMError.$(OBJEXT)
- -rm -f org/w3c/dom/DOMError.lo
- -rm -f org/w3c/dom/DOMErrorHandler.$(OBJEXT)
- -rm -f org/w3c/dom/DOMErrorHandler.lo
- -rm -f org/w3c/dom/DOMException.$(OBJEXT)
- -rm -f org/w3c/dom/DOMException.lo
- -rm -f org/w3c/dom/DOMImplementation.$(OBJEXT)
- -rm -f org/w3c/dom/DOMImplementation.lo
- -rm -f org/w3c/dom/DOMImplementationList.$(OBJEXT)
- -rm -f org/w3c/dom/DOMImplementationList.lo
- -rm -f org/w3c/dom/DOMImplementationSource.$(OBJEXT)
- -rm -f org/w3c/dom/DOMImplementationSource.lo
- -rm -f org/w3c/dom/DOMLocator.$(OBJEXT)
- -rm -f org/w3c/dom/DOMLocator.lo
- -rm -f org/w3c/dom/DOMStringList.$(OBJEXT)
- -rm -f org/w3c/dom/DOMStringList.lo
- -rm -f org/w3c/dom/Document.$(OBJEXT)
- -rm -f org/w3c/dom/Document.lo
- -rm -f org/w3c/dom/DocumentFragment.$(OBJEXT)
- -rm -f org/w3c/dom/DocumentFragment.lo
- -rm -f org/w3c/dom/DocumentType.$(OBJEXT)
- -rm -f org/w3c/dom/DocumentType.lo
- -rm -f org/w3c/dom/Element.$(OBJEXT)
- -rm -f org/w3c/dom/Element.lo
- -rm -f org/w3c/dom/Entity.$(OBJEXT)
- -rm -f org/w3c/dom/Entity.lo
- -rm -f org/w3c/dom/EntityReference.$(OBJEXT)
- -rm -f org/w3c/dom/EntityReference.lo
- -rm -f org/w3c/dom/NameList.$(OBJEXT)
- -rm -f org/w3c/dom/NameList.lo
- -rm -f org/w3c/dom/NamedNodeMap.$(OBJEXT)
- -rm -f org/w3c/dom/NamedNodeMap.lo
- -rm -f org/w3c/dom/Node.$(OBJEXT)
- -rm -f org/w3c/dom/Node.lo
- -rm -f org/w3c/dom/NodeList.$(OBJEXT)
- -rm -f org/w3c/dom/NodeList.lo
- -rm -f org/w3c/dom/Notation.$(OBJEXT)
- -rm -f org/w3c/dom/Notation.lo
- -rm -f org/w3c/dom/ProcessingInstruction.$(OBJEXT)
- -rm -f org/w3c/dom/ProcessingInstruction.lo
- -rm -f org/w3c/dom/Text.$(OBJEXT)
- -rm -f org/w3c/dom/Text.lo
- -rm -f org/w3c/dom/TypeInfo.$(OBJEXT)
- -rm -f org/w3c/dom/TypeInfo.lo
- -rm -f org/w3c/dom/UserDataHandler.$(OBJEXT)
- -rm -f org/w3c/dom/UserDataHandler.lo
- -rm -f org/w3c/dom/bootstrap/DOMImplementationRegistry.$(OBJEXT)
- -rm -f org/w3c/dom/bootstrap/DOMImplementationRegistry.lo
- -rm -f org/w3c/dom/css/CSS2Properties.$(OBJEXT)
- -rm -f org/w3c/dom/css/CSS2Properties.lo
- -rm -f org/w3c/dom/css/CSSCharsetRule.$(OBJEXT)
- -rm -f org/w3c/dom/css/CSSCharsetRule.lo
- -rm -f org/w3c/dom/css/CSSFontFaceRule.$(OBJEXT)
- -rm -f org/w3c/dom/css/CSSFontFaceRule.lo
- -rm -f org/w3c/dom/css/CSSImportRule.$(OBJEXT)
- -rm -f org/w3c/dom/css/CSSImportRule.lo
- -rm -f org/w3c/dom/css/CSSMediaRule.$(OBJEXT)
- -rm -f org/w3c/dom/css/CSSMediaRule.lo
- -rm -f org/w3c/dom/css/CSSPageRule.$(OBJEXT)
- -rm -f org/w3c/dom/css/CSSPageRule.lo
- -rm -f org/w3c/dom/css/CSSPrimitiveValue.$(OBJEXT)
- -rm -f org/w3c/dom/css/CSSPrimitiveValue.lo
- -rm -f org/w3c/dom/css/CSSRule.$(OBJEXT)
- -rm -f org/w3c/dom/css/CSSRule.lo
- -rm -f org/w3c/dom/css/CSSRuleList.$(OBJEXT)
- -rm -f org/w3c/dom/css/CSSRuleList.lo
- -rm -f org/w3c/dom/css/CSSStyleDeclaration.$(OBJEXT)
- -rm -f org/w3c/dom/css/CSSStyleDeclaration.lo
- -rm -f org/w3c/dom/css/CSSStyleRule.$(OBJEXT)
- -rm -f org/w3c/dom/css/CSSStyleRule.lo
- -rm -f org/w3c/dom/css/CSSStyleSheet.$(OBJEXT)
- -rm -f org/w3c/dom/css/CSSStyleSheet.lo
- -rm -f org/w3c/dom/css/CSSUnknownRule.$(OBJEXT)
- -rm -f org/w3c/dom/css/CSSUnknownRule.lo
- -rm -f org/w3c/dom/css/CSSValue.$(OBJEXT)
- -rm -f org/w3c/dom/css/CSSValue.lo
- -rm -f org/w3c/dom/css/CSSValueList.$(OBJEXT)
- -rm -f org/w3c/dom/css/CSSValueList.lo
- -rm -f org/w3c/dom/css/Counter.$(OBJEXT)
- -rm -f org/w3c/dom/css/Counter.lo
- -rm -f org/w3c/dom/css/DOMImplementationCSS.$(OBJEXT)
- -rm -f org/w3c/dom/css/DOMImplementationCSS.lo
- -rm -f org/w3c/dom/css/DocumentCSS.$(OBJEXT)
- -rm -f org/w3c/dom/css/DocumentCSS.lo
- -rm -f org/w3c/dom/css/ElementCSSInlineStyle.$(OBJEXT)
- -rm -f org/w3c/dom/css/ElementCSSInlineStyle.lo
- -rm -f org/w3c/dom/css/RGBColor.$(OBJEXT)
- -rm -f org/w3c/dom/css/RGBColor.lo
- -rm -f org/w3c/dom/css/Rect.$(OBJEXT)
- -rm -f org/w3c/dom/css/Rect.lo
- -rm -f org/w3c/dom/css/ViewCSS.$(OBJEXT)
- -rm -f org/w3c/dom/css/ViewCSS.lo
- -rm -f org/w3c/dom/events/DocumentEvent.$(OBJEXT)
- -rm -f org/w3c/dom/events/DocumentEvent.lo
- -rm -f org/w3c/dom/events/Event.$(OBJEXT)
- -rm -f org/w3c/dom/events/Event.lo
- -rm -f org/w3c/dom/events/EventException.$(OBJEXT)
- -rm -f org/w3c/dom/events/EventException.lo
- -rm -f org/w3c/dom/events/EventListener.$(OBJEXT)
- -rm -f org/w3c/dom/events/EventListener.lo
- -rm -f org/w3c/dom/events/EventTarget.$(OBJEXT)
- -rm -f org/w3c/dom/events/EventTarget.lo
- -rm -f org/w3c/dom/events/MouseEvent.$(OBJEXT)
- -rm -f org/w3c/dom/events/MouseEvent.lo
- -rm -f org/w3c/dom/events/MutationEvent.$(OBJEXT)
- -rm -f org/w3c/dom/events/MutationEvent.lo
- -rm -f org/w3c/dom/events/UIEvent.$(OBJEXT)
- -rm -f org/w3c/dom/events/UIEvent.lo
- -rm -f org/w3c/dom/html2/HTMLAnchorElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLAnchorElement.lo
- -rm -f org/w3c/dom/html2/HTMLAppletElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLAppletElement.lo
- -rm -f org/w3c/dom/html2/HTMLAreaElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLAreaElement.lo
- -rm -f org/w3c/dom/html2/HTMLBRElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLBRElement.lo
- -rm -f org/w3c/dom/html2/HTMLBaseElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLBaseElement.lo
- -rm -f org/w3c/dom/html2/HTMLBaseFontElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLBaseFontElement.lo
- -rm -f org/w3c/dom/html2/HTMLBodyElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLBodyElement.lo
- -rm -f org/w3c/dom/html2/HTMLButtonElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLButtonElement.lo
- -rm -f org/w3c/dom/html2/HTMLCollection.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLCollection.lo
- -rm -f org/w3c/dom/html2/HTMLDListElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLDListElement.lo
- -rm -f org/w3c/dom/html2/HTMLDirectoryElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLDirectoryElement.lo
- -rm -f org/w3c/dom/html2/HTMLDivElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLDivElement.lo
- -rm -f org/w3c/dom/html2/HTMLDocument.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLDocument.lo
- -rm -f org/w3c/dom/html2/HTMLElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLElement.lo
- -rm -f org/w3c/dom/html2/HTMLFieldSetElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLFieldSetElement.lo
- -rm -f org/w3c/dom/html2/HTMLFontElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLFontElement.lo
- -rm -f org/w3c/dom/html2/HTMLFormElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLFormElement.lo
- -rm -f org/w3c/dom/html2/HTMLFrameElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLFrameElement.lo
- -rm -f org/w3c/dom/html2/HTMLFrameSetElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLFrameSetElement.lo
- -rm -f org/w3c/dom/html2/HTMLHRElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLHRElement.lo
- -rm -f org/w3c/dom/html2/HTMLHeadElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLHeadElement.lo
- -rm -f org/w3c/dom/html2/HTMLHeadingElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLHeadingElement.lo
- -rm -f org/w3c/dom/html2/HTMLHtmlElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLHtmlElement.lo
- -rm -f org/w3c/dom/html2/HTMLIFrameElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLIFrameElement.lo
- -rm -f org/w3c/dom/html2/HTMLImageElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLImageElement.lo
- -rm -f org/w3c/dom/html2/HTMLInputElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLInputElement.lo
- -rm -f org/w3c/dom/html2/HTMLIsIndexElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLIsIndexElement.lo
- -rm -f org/w3c/dom/html2/HTMLLIElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLLIElement.lo
- -rm -f org/w3c/dom/html2/HTMLLabelElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLLabelElement.lo
- -rm -f org/w3c/dom/html2/HTMLLegendElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLLegendElement.lo
- -rm -f org/w3c/dom/html2/HTMLLinkElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLLinkElement.lo
- -rm -f org/w3c/dom/html2/HTMLMapElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLMapElement.lo
- -rm -f org/w3c/dom/html2/HTMLMenuElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLMenuElement.lo
- -rm -f org/w3c/dom/html2/HTMLMetaElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLMetaElement.lo
- -rm -f org/w3c/dom/html2/HTMLModElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLModElement.lo
- -rm -f org/w3c/dom/html2/HTMLOListElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLOListElement.lo
- -rm -f org/w3c/dom/html2/HTMLObjectElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLObjectElement.lo
- -rm -f org/w3c/dom/html2/HTMLOptGroupElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLOptGroupElement.lo
- -rm -f org/w3c/dom/html2/HTMLOptionElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLOptionElement.lo
- -rm -f org/w3c/dom/html2/HTMLOptionsCollection.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLOptionsCollection.lo
- -rm -f org/w3c/dom/html2/HTMLParagraphElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLParagraphElement.lo
- -rm -f org/w3c/dom/html2/HTMLParamElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLParamElement.lo
- -rm -f org/w3c/dom/html2/HTMLPreElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLPreElement.lo
- -rm -f org/w3c/dom/html2/HTMLQuoteElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLQuoteElement.lo
- -rm -f org/w3c/dom/html2/HTMLScriptElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLScriptElement.lo
- -rm -f org/w3c/dom/html2/HTMLSelectElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLSelectElement.lo
- -rm -f org/w3c/dom/html2/HTMLStyleElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLStyleElement.lo
- -rm -f org/w3c/dom/html2/HTMLTableCaptionElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLTableCaptionElement.lo
- -rm -f org/w3c/dom/html2/HTMLTableCellElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLTableCellElement.lo
- -rm -f org/w3c/dom/html2/HTMLTableColElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLTableColElement.lo
- -rm -f org/w3c/dom/html2/HTMLTableElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLTableElement.lo
- -rm -f org/w3c/dom/html2/HTMLTableRowElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLTableRowElement.lo
- -rm -f org/w3c/dom/html2/HTMLTableSectionElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLTableSectionElement.lo
- -rm -f org/w3c/dom/html2/HTMLTextAreaElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLTextAreaElement.lo
- -rm -f org/w3c/dom/html2/HTMLTitleElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLTitleElement.lo
- -rm -f org/w3c/dom/html2/HTMLUListElement.$(OBJEXT)
- -rm -f org/w3c/dom/html2/HTMLUListElement.lo
- -rm -f org/w3c/dom/ls/DOMImplementationLS.$(OBJEXT)
- -rm -f org/w3c/dom/ls/DOMImplementationLS.lo
- -rm -f org/w3c/dom/ls/LSException.$(OBJEXT)
- -rm -f org/w3c/dom/ls/LSException.lo
- -rm -f org/w3c/dom/ls/LSInput.$(OBJEXT)
- -rm -f org/w3c/dom/ls/LSInput.lo
- -rm -f org/w3c/dom/ls/LSLoadEvent.$(OBJEXT)
- -rm -f org/w3c/dom/ls/LSLoadEvent.lo
- -rm -f org/w3c/dom/ls/LSOutput.$(OBJEXT)
- -rm -f org/w3c/dom/ls/LSOutput.lo
- -rm -f org/w3c/dom/ls/LSParser.$(OBJEXT)
- -rm -f org/w3c/dom/ls/LSParser.lo
- -rm -f org/w3c/dom/ls/LSParserFilter.$(OBJEXT)
- -rm -f org/w3c/dom/ls/LSParserFilter.lo
- -rm -f org/w3c/dom/ls/LSProgressEvent.$(OBJEXT)
- -rm -f org/w3c/dom/ls/LSProgressEvent.lo
- -rm -f org/w3c/dom/ls/LSResourceResolver.$(OBJEXT)
- -rm -f org/w3c/dom/ls/LSResourceResolver.lo
- -rm -f org/w3c/dom/ls/LSSerializer.$(OBJEXT)
- -rm -f org/w3c/dom/ls/LSSerializer.lo
- -rm -f org/w3c/dom/ls/LSSerializerFilter.$(OBJEXT)
- -rm -f org/w3c/dom/ls/LSSerializerFilter.lo
- -rm -f org/w3c/dom/ranges/DocumentRange.$(OBJEXT)
- -rm -f org/w3c/dom/ranges/DocumentRange.lo
- -rm -f org/w3c/dom/ranges/Range.$(OBJEXT)
- -rm -f org/w3c/dom/ranges/Range.lo
- -rm -f org/w3c/dom/ranges/RangeException.$(OBJEXT)
- -rm -f org/w3c/dom/ranges/RangeException.lo
- -rm -f org/w3c/dom/stylesheets/DocumentStyle.$(OBJEXT)
- -rm -f org/w3c/dom/stylesheets/DocumentStyle.lo
- -rm -f org/w3c/dom/stylesheets/LinkStyle.$(OBJEXT)
- -rm -f org/w3c/dom/stylesheets/LinkStyle.lo
- -rm -f org/w3c/dom/stylesheets/MediaList.$(OBJEXT)
- -rm -f org/w3c/dom/stylesheets/MediaList.lo
- -rm -f org/w3c/dom/stylesheets/StyleSheet.$(OBJEXT)
- -rm -f org/w3c/dom/stylesheets/StyleSheet.lo
- -rm -f org/w3c/dom/stylesheets/StyleSheetList.$(OBJEXT)
- -rm -f org/w3c/dom/stylesheets/StyleSheetList.lo
- -rm -f org/w3c/dom/traversal/DocumentTraversal.$(OBJEXT)
- -rm -f org/w3c/dom/traversal/DocumentTraversal.lo
- -rm -f org/w3c/dom/traversal/NodeFilter.$(OBJEXT)
- -rm -f org/w3c/dom/traversal/NodeFilter.lo
- -rm -f org/w3c/dom/traversal/NodeIterator.$(OBJEXT)
- -rm -f org/w3c/dom/traversal/NodeIterator.lo
- -rm -f org/w3c/dom/traversal/TreeWalker.$(OBJEXT)
- -rm -f org/w3c/dom/traversal/TreeWalker.lo
- -rm -f org/w3c/dom/views/AbstractView.$(OBJEXT)
- -rm -f org/w3c/dom/views/AbstractView.lo
- -rm -f org/w3c/dom/views/DocumentView.$(OBJEXT)
- -rm -f org/w3c/dom/views/DocumentView.lo
- -rm -f org/w3c/dom/xpath/XPathEvaluator.$(OBJEXT)
- -rm -f org/w3c/dom/xpath/XPathEvaluator.lo
- -rm -f org/w3c/dom/xpath/XPathException.$(OBJEXT)
- -rm -f org/w3c/dom/xpath/XPathException.lo
- -rm -f org/w3c/dom/xpath/XPathExpression.$(OBJEXT)
- -rm -f org/w3c/dom/xpath/XPathExpression.lo
- -rm -f org/w3c/dom/xpath/XPathNSResolver.$(OBJEXT)
- -rm -f org/w3c/dom/xpath/XPathNSResolver.lo
- -rm -f org/w3c/dom/xpath/XPathNamespace.$(OBJEXT)
- -rm -f org/w3c/dom/xpath/XPathNamespace.lo
- -rm -f org/w3c/dom/xpath/XPathResult.$(OBJEXT)
- -rm -f org/w3c/dom/xpath/XPathResult.lo
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/$(DEPDIR)/Attr.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/$(DEPDIR)/CDATASection.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/$(DEPDIR)/CharacterData.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/$(DEPDIR)/Comment.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/$(DEPDIR)/DOMConfiguration.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/$(DEPDIR)/DOMError.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/$(DEPDIR)/DOMErrorHandler.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/$(DEPDIR)/DOMException.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/$(DEPDIR)/DOMImplementation.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/$(DEPDIR)/DOMImplementationList.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/$(DEPDIR)/DOMImplementationSource.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/$(DEPDIR)/DOMLocator.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/$(DEPDIR)/DOMStringList.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/$(DEPDIR)/Document.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/$(DEPDIR)/DocumentFragment.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/$(DEPDIR)/DocumentType.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/$(DEPDIR)/Element.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/$(DEPDIR)/Entity.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/$(DEPDIR)/EntityReference.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/$(DEPDIR)/NameList.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/$(DEPDIR)/NamedNodeMap.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/$(DEPDIR)/Node.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/$(DEPDIR)/NodeList.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/$(DEPDIR)/Notation.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/$(DEPDIR)/ProcessingInstruction.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/$(DEPDIR)/Text.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/$(DEPDIR)/TypeInfo.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/$(DEPDIR)/UserDataHandler.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/bootstrap/$(DEPDIR)/DOMImplementationRegistry.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/css/$(DEPDIR)/CSS2Properties.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/css/$(DEPDIR)/CSSCharsetRule.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/css/$(DEPDIR)/CSSFontFaceRule.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/css/$(DEPDIR)/CSSImportRule.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/css/$(DEPDIR)/CSSMediaRule.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/css/$(DEPDIR)/CSSPageRule.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/css/$(DEPDIR)/CSSPrimitiveValue.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/css/$(DEPDIR)/CSSRule.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/css/$(DEPDIR)/CSSRuleList.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/css/$(DEPDIR)/CSSStyleDeclaration.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/css/$(DEPDIR)/CSSStyleRule.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/css/$(DEPDIR)/CSSStyleSheet.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/css/$(DEPDIR)/CSSUnknownRule.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/css/$(DEPDIR)/CSSValue.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/css/$(DEPDIR)/CSSValueList.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/css/$(DEPDIR)/Counter.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/css/$(DEPDIR)/DOMImplementationCSS.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/css/$(DEPDIR)/DocumentCSS.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/css/$(DEPDIR)/ElementCSSInlineStyle.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/css/$(DEPDIR)/RGBColor.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/css/$(DEPDIR)/Rect.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/css/$(DEPDIR)/ViewCSS.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/events/$(DEPDIR)/DocumentEvent.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/events/$(DEPDIR)/Event.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/events/$(DEPDIR)/EventException.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/events/$(DEPDIR)/EventListener.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/events/$(DEPDIR)/EventTarget.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/events/$(DEPDIR)/MouseEvent.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/events/$(DEPDIR)/MutationEvent.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/events/$(DEPDIR)/UIEvent.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLAnchorElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLAppletElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLAreaElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLBRElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLBaseElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLBaseFontElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLBodyElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLButtonElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLCollection.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLDListElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLDirectoryElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLDivElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLDocument.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLFieldSetElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLFontElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLFormElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLFrameElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLFrameSetElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLHRElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLHeadElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLHeadingElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLHtmlElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLIFrameElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLImageElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLInputElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLIsIndexElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLLIElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLLabelElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLLegendElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLLinkElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLMapElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLMenuElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLMetaElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLModElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLOListElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLObjectElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLOptGroupElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLOptionElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLOptionsCollection.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLParagraphElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLParamElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLPreElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLQuoteElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLScriptElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLSelectElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLStyleElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLTableCaptionElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLTableCellElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLTableColElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLTableElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLTableRowElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLTableSectionElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLTextAreaElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLTitleElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/html2/$(DEPDIR)/HTMLUListElement.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/ls/$(DEPDIR)/DOMImplementationLS.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/ls/$(DEPDIR)/LSException.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/ls/$(DEPDIR)/LSInput.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/ls/$(DEPDIR)/LSLoadEvent.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/ls/$(DEPDIR)/LSOutput.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/ls/$(DEPDIR)/LSParser.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/ls/$(DEPDIR)/LSParserFilter.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/ls/$(DEPDIR)/LSProgressEvent.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/ls/$(DEPDIR)/LSResourceResolver.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/ls/$(DEPDIR)/LSSerializer.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/ls/$(DEPDIR)/LSSerializerFilter.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/ranges/$(DEPDIR)/DocumentRange.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/ranges/$(DEPDIR)/Range.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/ranges/$(DEPDIR)/RangeException.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/stylesheets/$(DEPDIR)/DocumentStyle.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/stylesheets/$(DEPDIR)/LinkStyle.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/stylesheets/$(DEPDIR)/MediaList.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/stylesheets/$(DEPDIR)/StyleSheet.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/stylesheets/$(DEPDIR)/StyleSheetList.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/traversal/$(DEPDIR)/DocumentTraversal.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/traversal/$(DEPDIR)/NodeFilter.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/traversal/$(DEPDIR)/NodeIterator.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/traversal/$(DEPDIR)/TreeWalker.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/views/$(DEPDIR)/AbstractView.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/views/$(DEPDIR)/DocumentView.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/xpath/$(DEPDIR)/XPathEvaluator.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/xpath/$(DEPDIR)/XPathException.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/xpath/$(DEPDIR)/XPathExpression.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/xpath/$(DEPDIR)/XPathNSResolver.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/xpath/$(DEPDIR)/XPathNamespace.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@org/w3c/dom/xpath/$(DEPDIR)/XPathResult.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libw3c_gcj_la-w3c.Plo@am__quote@
-.java.o:
+.jar.o:
@am__fastdepGCJ_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`; \
@am__fastdepGCJ_TRUE@ if $(GCJCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ $<; \
@am__fastdepGCJ_TRUE@ then mv -f "$$depbase.Tpo" "$$depbase.Po"; else rm -f "$$depbase.Tpo"; exit 1; fi
@@ -1512,7 +522,7 @@ distclean-compile:
@AMDEP_TRUE@@am__fastdepGCJ_FALSE@ DEPDIR=$(DEPDIR) $(GCJDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepGCJ_FALSE@ $(GCJCOMPILE) -c -o $@ $<
-.java.obj:
+.jar.obj:
@am__fastdepGCJ_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`; \
@am__fastdepGCJ_TRUE@ if $(GCJCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
@am__fastdepGCJ_TRUE@ then mv -f "$$depbase.Tpo" "$$depbase.Po"; else rm -f "$$depbase.Tpo"; exit 1; fi
@@ -1520,7 +530,7 @@ distclean-compile:
@AMDEP_TRUE@@am__fastdepGCJ_FALSE@ DEPDIR=$(DEPDIR) $(GCJDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepGCJ_FALSE@ $(GCJCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
-.java.lo:
+.jar.lo:
@am__fastdepGCJ_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`; \
@am__fastdepGCJ_TRUE@ if $(LTGCJCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ $<; \
@am__fastdepGCJ_TRUE@ then mv -f "$$depbase.Tpo" "$$depbase.Plo"; else rm -f "$$depbase.Tpo"; exit 1; fi
@@ -1528,22 +538,18 @@ distclean-compile:
@AMDEP_TRUE@@am__fastdepGCJ_FALSE@ DEPDIR=$(DEPDIR) $(GCJDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepGCJ_FALSE@ $(LTGCJCOMPILE) -c -o $@ $<
+libw3c_gcj_la-w3c.lo: w3c.jar
+@am__fastdepGCJ_TRUE@ if $(LIBTOOL) --mode=compile $(GCJ) $(libw3c_gcj_la_GCJFLAGS) $(GCJFLAGS) -MT libw3c_gcj_la-w3c.lo -MD -MP -MF "$(DEPDIR)/libw3c_gcj_la-w3c.Tpo" -c -o libw3c_gcj_la-w3c.lo `test -f 'w3c.jar' || echo '$(srcdir)/'`w3c.jar; \
+@am__fastdepGCJ_TRUE@ then mv -f "$(DEPDIR)/libw3c_gcj_la-w3c.Tpo" "$(DEPDIR)/libw3c_gcj_la-w3c.Plo"; else rm -f "$(DEPDIR)/libw3c_gcj_la-w3c.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepGCJ_FALSE@ source='w3c.jar' object='libw3c_gcj_la-w3c.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepGCJ_FALSE@ DEPDIR=$(DEPDIR) $(GCJDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepGCJ_FALSE@ $(LIBTOOL) --mode=compile $(GCJ) $(libw3c_gcj_la_GCJFLAGS) $(GCJFLAGS) -c -o libw3c_gcj_la-w3c.lo `test -f 'w3c.jar' || echo '$(srcdir)/'`w3c.jar
+
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
- -rm -rf org/w3c/dom/.libs org/w3c/dom/_libs
- -rm -rf org/w3c/dom/bootstrap/.libs org/w3c/dom/bootstrap/_libs
- -rm -rf org/w3c/dom/css/.libs org/w3c/dom/css/_libs
- -rm -rf org/w3c/dom/events/.libs org/w3c/dom/events/_libs
- -rm -rf org/w3c/dom/html2/.libs org/w3c/dom/html2/_libs
- -rm -rf org/w3c/dom/ls/.libs org/w3c/dom/ls/_libs
- -rm -rf org/w3c/dom/ranges/.libs org/w3c/dom/ranges/_libs
- -rm -rf org/w3c/dom/stylesheets/.libs org/w3c/dom/stylesheets/_libs
- -rm -rf org/w3c/dom/traversal/.libs org/w3c/dom/traversal/_libs
- -rm -rf org/w3c/dom/views/.libs org/w3c/dom/views/_libs
- -rm -rf org/w3c/dom/xpath/.libs org/w3c/dom/xpath/_libs
distclean-libtool:
-rm -f libtool
@@ -1650,28 +656,6 @@ clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -rm -f org/w3c/dom/$(DEPDIR)/$(am__dirstamp)
- -rm -f org/w3c/dom/$(am__dirstamp)
- -rm -f org/w3c/dom/bootstrap/$(DEPDIR)/$(am__dirstamp)
- -rm -f org/w3c/dom/bootstrap/$(am__dirstamp)
- -rm -f org/w3c/dom/css/$(DEPDIR)/$(am__dirstamp)
- -rm -f org/w3c/dom/css/$(am__dirstamp)
- -rm -f org/w3c/dom/events/$(DEPDIR)/$(am__dirstamp)
- -rm -f org/w3c/dom/events/$(am__dirstamp)
- -rm -f org/w3c/dom/html2/$(DEPDIR)/$(am__dirstamp)
- -rm -f org/w3c/dom/html2/$(am__dirstamp)
- -rm -f org/w3c/dom/ls/$(DEPDIR)/$(am__dirstamp)
- -rm -f org/w3c/dom/ls/$(am__dirstamp)
- -rm -f org/w3c/dom/ranges/$(DEPDIR)/$(am__dirstamp)
- -rm -f org/w3c/dom/ranges/$(am__dirstamp)
- -rm -f org/w3c/dom/stylesheets/$(DEPDIR)/$(am__dirstamp)
- -rm -f org/w3c/dom/stylesheets/$(am__dirstamp)
- -rm -f org/w3c/dom/traversal/$(DEPDIR)/$(am__dirstamp)
- -rm -f org/w3c/dom/traversal/$(am__dirstamp)
- -rm -f org/w3c/dom/views/$(DEPDIR)/$(am__dirstamp)
- -rm -f org/w3c/dom/views/$(am__dirstamp)
- -rm -f org/w3c/dom/xpath/$(DEPDIR)/$(am__dirstamp)
- -rm -f org/w3c/dom/xpath/$(am__dirstamp)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -1683,7 +667,7 @@ clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
mostlyclean-am
distclean: distclean-am
- -rm -rf org/w3c/dom/$(DEPDIR) org/w3c/dom/bootstrap/$(DEPDIR) org/w3c/dom/css/$(DEPDIR) org/w3c/dom/events/$(DEPDIR) org/w3c/dom/html2/$(DEPDIR) org/w3c/dom/ls/$(DEPDIR) org/w3c/dom/ranges/$(DEPDIR) org/w3c/dom/stylesheets/$(DEPDIR) org/w3c/dom/traversal/$(DEPDIR) org/w3c/dom/views/$(DEPDIR) org/w3c/dom/xpath/$(DEPDIR)
+ -rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
@@ -1709,7 +693,7 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
- -rm -rf org/w3c/dom/$(DEPDIR) org/w3c/dom/bootstrap/$(DEPDIR) org/w3c/dom/css/$(DEPDIR) org/w3c/dom/events/$(DEPDIR) org/w3c/dom/html2/$(DEPDIR) org/w3c/dom/ls/$(DEPDIR) org/w3c/dom/ranges/$(DEPDIR) org/w3c/dom/stylesheets/$(DEPDIR) org/w3c/dom/traversal/$(DEPDIR) org/w3c/dom/views/$(DEPDIR) org/w3c/dom/xpath/$(DEPDIR)
+ -rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@@ -1741,14 +725,17 @@ uninstall-am: uninstall-info-am
uninstall-am uninstall-info-am
-classes.stamp: $(libw3c_convenience_la_SOURCES)
+w3c.jar: classes.stamp
+ find org -name '*.class' -print | $(ZIP) -cfME@ $@
+
+classes.stamp: $(source_files)
here=`pwd`; cd $(srcdir); \
- $(GCJ_WITH_FLAGS) -C -d $$here $(libw3c_convenience_la_SOURCES)
+ $(GCJ_WITH_FLAGS) -C -d $$here $(source_files)
echo > classes.stamp
mostlyclean-local:
-find . -name '*.class' | xargs rm
- -rm classes.stamp
+ -rm classes.stamp w3c.jar
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/libjava/gcj/Makefile.in b/libjava/gcj/Makefile.in
index dcb332acadf..ebf125d7880 100644
--- a/libjava/gcj/Makefile.in
+++ b/libjava/gcj/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# Makefile.in generated by automake 1.9.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/libjava/gnu/gcj/runtime/VMClassLoader.java b/libjava/gnu/gcj/runtime/VMClassLoader.java
index 1ded892a06d..1ed0c026cf8 100644
--- a/libjava/gnu/gcj/runtime/VMClassLoader.java
+++ b/libjava/gnu/gcj/runtime/VMClassLoader.java
@@ -10,20 +10,16 @@ details. */
package gnu.gcj.runtime;
-import java.io.*;
-import java.util.StringTokenizer;
-import java.util.HashSet;
import java.net.URL;
-import java.net.URLClassLoader;
+import java.util.HashSet;
// Despite its name, this class is really the extension loader for
// libgcj. Class loader bootstrap is a bit tricky, see prims.cc and
// SystemClassLoader for some details.
-public final class VMClassLoader extends URLClassLoader
+public final class VMClassLoader extends HelperClassLoader
{
private VMClassLoader ()
{
- super (new URL[0]);
String p
= System.getProperty ("gnu.gcj.runtime.VMClassLoader.library_control",
"");
@@ -39,44 +35,7 @@ public final class VMClassLoader extends URLClassLoader
private void init()
{
- // Add the contents of the extensions directories.
- StringTokenizer st
- = new StringTokenizer (System.getProperty ("java.ext.dirs"),
- File.pathSeparator);
-
- try
- {
- while (st.hasMoreElements ())
- {
- String dirname = st.nextToken ();
- File dir = new File (dirname);
- if (dir.exists ())
- {
- if (! dirname.endsWith (File.separator))
- dirname = dirname + File.separator;
- String files[]
- = dir.list (new FilenameFilter ()
- {
- public boolean accept (File dir, String name)
- {
- return (name.endsWith (".jar")
- || name.endsWith (".zip"));
- }
- });
- for (int i = files.length - 1; i >= 0; i--)
- addURL(new URL("file", "", -1, dirname + files[i]));
- }
- }
-
- // Add core:/ to the end so any resources compiled into this
- // executable may be found.
- addURL(new URL("core", "", -1, "/"));
- }
- catch (java.net.MalformedURLException x)
- {
- // This should never happen.
- throw new RuntimeException(x);
- }
+ addDirectoriesFromProperty("java.ext.dirs");
}
/** This is overridden to search the internal hash table, which
diff --git a/libjava/gnu/gcj/tools/gcj_dbtool/Main.java b/libjava/gnu/gcj/tools/gcj_dbtool/Main.java
index 84b6f6dc369..cfd22bd3cc1 100644
--- a/libjava/gnu/gcj/tools/gcj_dbtool/Main.java
+++ b/libjava/gnu/gcj/tools/gcj_dbtool/Main.java
@@ -259,9 +259,16 @@ public class Main
if (s[0].equals("-p"))
{
- insist (s.length == 1);
- String result = System.getProperty("gnu.gcj.precompiled.db.path",
- "");
+ insist (s.length == 1 || s.length == 2);
+ String result;
+
+ if (s.length == 1)
+ result = System.getProperty("gnu.gcj.precompiled.db.path", "");
+ else
+ result = (s[1]
+ + (s[1].endsWith(File.separator) ? "" : File.separator)
+ + getDbPathTail ());
+
System.out.println (result);
return;
}
@@ -270,6 +277,8 @@ public class Main
System.exit(1);
}
+ private static native String getDbPathTail ();
+
private static void insist(boolean ok)
{
if (! ok)
@@ -293,10 +302,10 @@ public class Main
+ " gcj-dbtool -t file.gcjdb - Test a gcj map database\n"
+ " gcj-dbtool -l file.gcjdb - List a gcj map database\n"
+ " gcj-dbtool -m dest.gcjdb [source.gcjdb]...\n"
- + " gcj-dbtool -p - Print default database name\n"
+ " - Merge gcj map databases into dest\n"
+ " Replaces dest\n"
- + " To add to dest, include dest in the list of sources");
+ + " To add to dest, include dest in the list of sources\n"
+ + " gcj-dbtool -p [LIBDIR] - Print default database name");
}
// Add a jar to a map. This copies the map first and returns a
diff --git a/libjava/gnu/xml/aelfred2/JAXPFactory.java b/libjava/gnu/xml/aelfred2/JAXPFactory.java
index 006dc1302e3..ff585a82aa6 100644
--- a/libjava/gnu/xml/aelfred2/JAXPFactory.java
+++ b/libjava/gnu/xml/aelfred2/JAXPFactory.java
@@ -60,137 +60,172 @@ import javax.xml.parsers.SAXParserFactory;
*
* @author David Brownell
*/
-public final class JAXPFactory extends SAXParserFactory
+public final class JAXPFactory
+ extends SAXParserFactory
{
- private Hashtable flags = new Hashtable ();
-
- /**
- * Constructs a factory which normally returns a non-validating
- * parser.
- */
- public JAXPFactory () { }
-
- public SAXParser newSAXParser ()
+
+ private Hashtable flags = new Hashtable();
+
+ /**
+ * Constructs a factory which normally returns a non-validating
+ * parser.
+ */
+ public JAXPFactory()
+ {
+ }
+
+ public SAXParser newSAXParser()
throws ParserConfigurationException, SAXException
+ {
+ JaxpParser jaxp = new JaxpParser();
+ Enumeration e = flags.keys();
+ XMLReader parser = jaxp.getXMLReader();
+
+ parser.setFeature(SAXDriver.FEATURE + "namespaces",
+ isNamespaceAware());
+ parser.setFeature(SAXDriver.FEATURE + "validation",
+ isValidating());
+ // that makes SAX2 feature flags trump JAXP
+
+ while (e.hasMoreElements())
+ {
+ String uri = (String) e.nextElement();
+ Boolean value = (Boolean) flags.get(uri);
+ parser.setFeature(uri, value.booleanValue());
+ }
+
+ return jaxp;
+ }
+
+ // yes, this "feature transfer" mechanism doesn't play well
+
+ public void setFeature(String name, boolean value)
+ throws ParserConfigurationException, SAXNotRecognizedException,
+ SAXNotSupportedException
+ {
+ try
+ {
+ // force "early" detection of errors where possible
+ // (flags can't necessarily be set before parsing)
+ new JaxpParser().getXMLReader().setFeature(name, value);
+
+ flags.put(name, new Boolean(value));
+ }
+ catch (SAXNotRecognizedException e)
+ {
+ throw new SAXNotRecognizedException(name);
+ }
+ catch (SAXNotSupportedException e)
+ {
+ throw new SAXNotSupportedException(name);
+ }
+ catch (Exception e)
+ {
+ throw new ParserConfigurationException(e.getClass().getName()
+ + ": "
+ + e.getMessage());
+ }
+ }
+
+ public boolean getFeature(String name)
+ throws ParserConfigurationException, SAXNotRecognizedException,
+ SAXNotSupportedException
+ {
+ Boolean value = (Boolean) flags.get(name);
+
+ if (value != null)
+ {
+ return value.booleanValue();
+ }
+ else
+ {
+ try
+ {
+ return new JaxpParser().getXMLReader().getFeature(name);
+ }
+ catch (SAXNotRecognizedException e)
+ {
+ throw new SAXNotRecognizedException(name);
+ }
+ catch (SAXNotSupportedException e)
+ {
+ throw new SAXNotSupportedException(name);
+ }
+ catch (SAXException e)
+ {
+ throw new ParserConfigurationException(e.getClass().getName()
+ + ": "
+ + e.getMessage());
+ }
+ }
+ }
+
+ private static class JaxpParser
+ extends SAXParser
+ {
+
+ private XmlReader ae2 = new XmlReader();
+ private XMLReaderAdapter parser = null;
+
+ JaxpParser()
{
- JaxpParser jaxp = new JaxpParser ();
- Enumeration e = flags.keys ();
- XMLReader parser = jaxp.getXMLReader ();
-
- parser.setFeature (
- SAXDriver.FEATURE + "namespaces",
- isNamespaceAware ());
- parser.setFeature (
- SAXDriver.FEATURE + "validation",
- isValidating ());
- // that makes SAX2 feature flags trump JAXP
-
- while (e.hasMoreElements ()) {
- String uri = (String) e.nextElement ();
- Boolean value = (Boolean) flags.get (uri);
- parser.setFeature (uri, value.booleanValue ());
- }
-
- return jaxp;
}
- // yes, this "feature transfer" mechanism doesn't play well
+ public void setProperty(String id, Object value)
+ throws SAXNotRecognizedException, SAXNotSupportedException
+ {
+ ae2.setProperty(id, value);
+ }
- public void setFeature (String name, boolean value)
- throws
- ParserConfigurationException,
- SAXNotRecognizedException,
- SAXNotSupportedException
+ public Object getProperty(String id)
+ throws SAXNotRecognizedException, SAXNotSupportedException
{
- try {
- // force "early" detection of errors where possible
- // (flags can't necessarily be set before parsing)
- new JaxpParser ().getXMLReader ().setFeature (name, value);
-
- flags.put (name, new Boolean (value));
- } catch (SAXNotRecognizedException e) {
- throw new SAXNotRecognizedException (name);
- } catch (SAXNotSupportedException e) {
- throw new SAXNotSupportedException (name);
- } catch (Exception e) {
- throw new ParserConfigurationException (
- e.getClass ().getName ()
- + ": "
- + e.getMessage ());
- }
+ return ae2.getProperty(id);
}
- public boolean getFeature (String name)
- throws
- ParserConfigurationException,
- SAXNotRecognizedException,
- SAXNotSupportedException
+ public Parser getParser()
+ throws SAXException
{
- Boolean value = (Boolean) flags.get (name);
-
- if (value != null)
- return value.booleanValue ();
- else
- try {
- return new JaxpParser ().getXMLReader ().getFeature (name);
- } catch (SAXNotRecognizedException e) {
- throw new SAXNotRecognizedException (name);
- } catch (SAXNotSupportedException e) {
- throw new SAXNotSupportedException (name);
- } catch (SAXException e) {
- throw new ParserConfigurationException (
- e.getClass ().getName ()
- + ": "
- + e.getMessage ());
- }
+ if (parser == null)
+ {
+ parser = new XMLReaderAdapter(ae2);
+ }
+ return parser;
}
- private static class JaxpParser extends SAXParser
+ public XMLReader getXMLReader ()
+ throws SAXException
{
- private XmlReader ae2 = new XmlReader ();
- private XMLReaderAdapter parser = null;
-
- JaxpParser () { }
-
- public void setProperty (String id, Object value)
- throws SAXNotRecognizedException, SAXNotSupportedException
- { ae2.setProperty (id, value); }
-
- public Object getProperty (String id)
- throws SAXNotRecognizedException, SAXNotSupportedException
- { return ae2.getProperty (id); }
-
- public Parser getParser ()
- throws SAXException
- {
- if (parser == null)
- parser = new XMLReaderAdapter (ae2);
- return parser;
- }
-
- public XMLReader getXMLReader ()
- throws SAXException
- { return ae2; }
-
- public boolean isNamespaceAware ()
- {
- try {
- return ae2.getFeature (SAXDriver.FEATURE + "namespaces");
- } catch (Exception e) {
- throw new Error ();
- }
- }
-
- public boolean isValidating ()
- {
- try {
- return ae2.getFeature (SAXDriver.FEATURE + "validation");
- } catch (Exception e) {
- throw new Error ();
- }
- }
-
- // TODO isXIncludeAware()
-
+ return ae2;
}
+
+ public boolean isNamespaceAware()
+ {
+ try
+ {
+ return ae2.getFeature(SAXDriver.FEATURE + "namespaces");
+ }
+ catch (Exception e)
+ {
+ throw new Error();
+ }
+ }
+
+ public boolean isValidating()
+ {
+ try
+ {
+ return ae2.getFeature(SAXDriver.FEATURE + "validation");
+ }
+ catch (Exception e)
+ {
+ throw new Error();
+ }
+ }
+
+ // TODO isXIncludeAware()
+
+ }
+
}
+
diff --git a/libjava/gnu/xml/aelfred2/SAXDriver.java b/libjava/gnu/xml/aelfred2/SAXDriver.java
index 0e7b3c719a6..003a73620a8 100644
--- a/libjava/gnu/xml/aelfred2/SAXDriver.java
+++ b/libjava/gnu/xml/aelfred2/SAXDriver.java
@@ -60,15 +60,11 @@ import java.net.URL;
import java.util.Locale;
import java.util.Stack;
-// maintaining 1.1 compatibility for now ... more portable, PJava, etc
-// Iterator, Hashmap and ArrayList ought to be faster
import java.util.ArrayList;
import java.util.Collections;
import java.util.Enumeration;
-import java.util.Hashtable;
import java.util.Iterator;
import java.util.List;
-import java.util.Vector;
import org.xml.sax.*;
import org.xml.sax.ext.*;
@@ -133,1276 +129,1494 @@ import org.xml.sax.helpers.NamespaceSupport;
* @see org.xml.sax.Parser
*/
final public class SAXDriver
- implements Locator, Attributes2, XMLReader, Parser, AttributeList
+ implements Locator, Attributes2, XMLReader, Parser, AttributeList
{
- private final DefaultHandler2 base = new DefaultHandler2 ();
- private XmlParser parser;
-
- private EntityResolver entityResolver = base;
- private EntityResolver2 resolver2 = null;
- private ContentHandler contentHandler = base;
- private DTDHandler dtdHandler = base;
- private ErrorHandler errorHandler = base;
- private DeclHandler declHandler = base;
- private LexicalHandler lexicalHandler = base;
-
- private String elementName;
- private Stack entityStack;
-
- // one vector (of object/struct): faster, smaller
- private List attributesList;
-
- private boolean namespaces = true;
- private boolean xmlNames = false;
- private boolean extGE = true;
- private boolean extPE = true;
- private boolean resolveAll = true;
- private boolean useResolver2 = true;
- private boolean stringInterning = true;
-
- private int attributeCount;
- private boolean attributes;
- private String nsTemp [];
- private NamespaceSupport prefixStack;
+
+ private final DefaultHandler2 base = new DefaultHandler2();
+ private XmlParser parser;
+
+ private EntityResolver entityResolver = base;
+ private EntityResolver2 resolver2 = null;
+ private ContentHandler contentHandler = base;
+ private DTDHandler dtdHandler = base;
+ private ErrorHandler errorHandler = base;
+ private DeclHandler declHandler = base;
+ private LexicalHandler lexicalHandler = base;
+
+ private String elementName;
+ private Stack entityStack;
+
+ // one vector (of object/struct): faster, smaller
+ private List attributesList;
+
+ private boolean namespaces = true;
+ private boolean xmlNames = false;
+ private boolean extGE = true;
+ private boolean extPE = true;
+ private boolean resolveAll = true;
+ private boolean useResolver2 = true;
+
+ // package private to allow (read-only) access in XmlParser
+ boolean stringInterning = true;
+
+ private int attributeCount;
+ private boolean attributes;
+ private String[] nsTemp;
+ private NamespaceSupport prefixStack;
+
+ //
+ // Constructor.
+ //
+
+ /**
+ * Constructs a SAX Parser.
+ */
+ public SAXDriver()
+ {
+ reset();
+ }
- //
- // Constructor.
- //
+ private void reset()
+ {
+ elementName = null;
+ entityStack = new Stack();
+ attributesList = Collections.synchronizedList(new ArrayList());
+ attributeCount = 0;
+ attributes = false;
+ nsTemp = new String[3];
+ prefixStack = null;
+ }
- /** Constructs a SAX Parser. */
- public SAXDriver ()
- {
- reset ();
- }
- private void reset ()
- {
- elementName = null;
- entityStack = new Stack ();
- attributesList = Collections.synchronizedList(new ArrayList());
- attributeCount = 0;
- attributes = false;
- nsTemp = new String[3];
- prefixStack = null;
- }
+ //
+ // Implementation of org.xml.sax.Parser.
+ //
+ /**
+ * <b>SAX1</b>: Sets the locale used for diagnostics; currently,
+ * only locales using the English language are supported.
+ * @param locale The locale for which diagnostics will be generated
+ */
+ public void setLocale(Locale locale)
+ throws SAXException
+ {
+ if ("en".equals(locale.getLanguage()))
+ {
+ return;
+ }
+ throw new SAXException ("AElfred2 only supports English locales.");
+ }
- //
- // Implementation of org.xml.sax.Parser.
- //
+ /**
+ * <b>SAX2</b>: Returns the object used when resolving external
+ * entities during parsing (both general and parameter entities).
+ */
+ public EntityResolver getEntityResolver()
+ {
+ return (entityResolver == base) ? null : entityResolver;
+ }
- /**
- * <b>SAX1</b>: Sets the locale used for diagnostics; currently,
- * only locales using the English language are supported.
- * @param locale The locale for which diagnostics will be generated
- */
- public void setLocale (Locale locale)
- throws SAXException
- {
- if ("en".equals (locale.getLanguage ()))
- return ;
+ /**
+ * <b>SAX1, SAX2</b>: Set the entity resolver for this parser.
+ * @param handler The object to receive entity events.
+ */
+ public void setEntityResolver(EntityResolver resolver)
+ {
+ if (resolver instanceof EntityResolver2)
+ {
+ resolver2 = (EntityResolver2) resolver;
+ }
+ else
+ {
+ resolver2 = null;
+ }
+ if (resolver == null)
+ {
+ resolver = base;
+ }
+ entityResolver = resolver;
+ }
- throw new SAXException ("AElfred2 only supports English locales.");
- }
+ /**
+ * <b>SAX2</b>: Returns the object used to process declarations related
+ * to notations and unparsed entities.
+ */
+ public DTDHandler getDTDHandler()
+ {
+ return (dtdHandler == base) ? null : dtdHandler;
+ }
+ /**
+ * <b>SAX1, SAX2</b>: Set the DTD handler for this parser.
+ * @param handler The object to receive DTD events.
+ */
+ public void setDTDHandler(DTDHandler handler)
+ {
+ if (handler == null)
+ {
+ handler = base;
+ }
+ this.dtdHandler = handler;
+ }
- /**
- * <b>SAX2</b>: Returns the object used when resolving external
- * entities during parsing (both general and parameter entities).
- */
- public EntityResolver getEntityResolver ()
- {
- return (entityResolver == base) ? null : entityResolver;
- }
- /**
- * <b>SAX1, SAX2</b>: Set the entity resolver for this parser.
- * @param handler The object to receive entity events.
- */
- public void setEntityResolver (EntityResolver resolver)
- {
- if (resolver instanceof EntityResolver2)
- resolver2 = (EntityResolver2) resolver;
- else
- resolver2 = null;
- if (resolver == null)
- resolver = base;
- entityResolver = resolver;
- }
+ /**
+ * <b>SAX1</b>: Set the document handler for this parser. If a
+ * content handler was set, this document handler will supplant it.
+ * The parser is set to report all XML 1.0 names rather than to
+ * filter out "xmlns" attributes (the "namespace-prefixes" feature
+ * is set to true).
+ *
+ * @deprecated SAX2 programs should use the XMLReader interface
+ * and a ContentHandler.
+ *
+ * @param handler The object to receive document events.
+ */
+ public void setDocumentHandler(DocumentHandler handler)
+ {
+ contentHandler = new Adapter(handler);
+ xmlNames = true;
+ }
+ /**
+ * <b>SAX2</b>: Returns the object used to report the logical
+ * content of an XML document.
+ */
+ public ContentHandler getContentHandler()
+ {
+ return (contentHandler == base) ? null : contentHandler;
+ }
- /**
- * <b>SAX2</b>: Returns the object used to process declarations related
- * to notations and unparsed entities.
- */
- public DTDHandler getDTDHandler ()
- {
- return (dtdHandler == base) ? null : dtdHandler;
- }
+ /**
+ * <b>SAX2</b>: Assigns the object used to report the logical
+ * content of an XML document. If a document handler was set,
+ * this content handler will supplant it (but XML 1.0 style name
+ * reporting may remain enabled).
+ */
+ public void setContentHandler(ContentHandler handler)
+ {
+ if (handler == null)
+ {
+ handler = base;
+ }
+ contentHandler = handler;
+ }
- /**
- * <b>SAX1, SAX2</b>: Set the DTD handler for this parser.
- * @param handler The object to receive DTD events.
- */
- public void setDTDHandler (DTDHandler handler)
- {
- if (handler == null)
- handler = base;
- this.dtdHandler = handler;
- }
+ /**
+ * <b>SAX1, SAX2</b>: Set the error handler for this parser.
+ * @param handler The object to receive error events.
+ */
+ public void setErrorHandler(ErrorHandler handler)
+ {
+ if (handler == null)
+ {
+ handler = base;
+ }
+ this.errorHandler = handler;
+ }
+ /**
+ * <b>SAX2</b>: Returns the object used to receive callbacks for XML
+ * errors of all levels (fatal, nonfatal, warning); this is never null;
+ */
+ public ErrorHandler getErrorHandler()
+ {
+ return (errorHandler == base) ? null : errorHandler;
+ }
- /**
- * <b>SAX1</b>: Set the document handler for this parser. If a
- * content handler was set, this document handler will supplant it.
- * The parser is set to report all XML 1.0 names rather than to
- * filter out "xmlns" attributes (the "namespace-prefixes" feature
- * is set to true).
- *
- * @deprecated SAX2 programs should use the XMLReader interface
- * and a ContentHandler.
- *
- * @param handler The object to receive document events.
- */
- public void setDocumentHandler (DocumentHandler handler)
- {
- contentHandler = new Adapter (handler);
- xmlNames = true;
- }
+ /**
+ * <b>SAX1, SAX2</b>: Auxiliary API to parse an XML document, used mostly
+ * when no URI is available.
+ * If you want anything useful to happen, you should set
+ * at least one type of handler.
+ * @param source The XML input source. Don't set 'encoding' unless
+ * you know for a fact that it's correct.
+ * @see #setEntityResolver
+ * @see #setDTDHandler
+ * @see #setContentHandler
+ * @see #setErrorHandler
+ * @exception SAXException The handlers may throw any SAXException,
+ * and the parser normally throws SAXParseException objects.
+ * @exception IOException IOExceptions are normally through through
+ * the parser if there are problems reading the source document.
+ */
+ public void parse(InputSource source)
+ throws SAXException, IOException
+ {
+ synchronized (base)
+ {
+ parser = new XmlParser();
+ if (namespaces)
+ {
+ prefixStack = new NamespaceSupport();
+ }
+ else if (!xmlNames)
+ {
+ throw new IllegalStateException();
+ }
+ parser.setHandler(this);
+
+ try
+ {
+ Reader r = source.getCharacterStream();
+ InputStream in = source.getByteStream();
+
+ parser.doParse(source.getSystemId(),
+ source.getPublicId(),
+ r,
+ in,
+ source.getEncoding());
+ }
+ catch (SAXException e)
+ {
+ throw e;
+ }
+ catch (IOException e)
+ {
+ throw e;
+ }
+ catch (RuntimeException e)
+ {
+ throw e;
+ }
+ catch (Exception e)
+ {
+ throw new SAXParseException(e.getMessage(), this, e);
+ }
+ finally
+ {
+ contentHandler.endDocument();
+ reset();
+ }
+ }
+ }
- /**
- * <b>SAX2</b>: Returns the object used to report the logical
- * content of an XML document.
- */
- public ContentHandler getContentHandler ()
- {
- return contentHandler == base ? null : contentHandler;
- }
+ /**
+ * <b>SAX1, SAX2</b>: Preferred API to parse an XML document, using a
+ * system identifier (URI).
+ */
+ public void parse(String systemId)
+ throws SAXException, IOException
+ {
+ parse(new InputSource(systemId));
+ }
- /**
- * <b>SAX2</b>: Assigns the object used to report the logical
- * content of an XML document. If a document handler was set,
- * this content handler will supplant it (but XML 1.0 style name
- * reporting may remain enabled).
- */
- public void setContentHandler (ContentHandler handler)
- {
- if (handler == null)
- handler = base;
- contentHandler = handler;
- }
+ //
+ // Implementation of SAX2 "XMLReader" interface
+ //
+ static final String FEATURE = "http://xml.org/sax/features/";
+ static final String PROPERTY = "http://xml.org/sax/properties/";
+
+ /**
+ * <b>SAX2</b>: Tells the value of the specified feature flag.
+ *
+ * @exception SAXNotRecognizedException thrown if the feature flag
+ * is neither built in, nor yet assigned.
+ */
+ public boolean getFeature(String featureId)
+ throws SAXNotRecognizedException, SAXNotSupportedException
+ {
+ if ((FEATURE + "validation").equals(featureId))
+ {
+ return false;
+ }
- /**
- * <b>SAX1, SAX2</b>: Set the error handler for this parser.
- * @param handler The object to receive error events.
- */
- public void setErrorHandler (ErrorHandler handler)
- {
- if (handler == null)
- handler = base;
- this.errorHandler = handler;
- }
+ // external entities (both types) are optionally included
+ if ((FEATURE + "external-general-entities").equals(featureId))
+ {
+ return extGE;
+ }
+ if ((FEATURE + "external-parameter-entities").equals(featureId))
+ {
+ return extPE;
+ }
+
+ // element/attribute names are as written in document; no mangling
+ if ((FEATURE + "namespace-prefixes").equals(featureId))
+ {
+ return xmlNames;
+ }
- /**
- * <b>SAX2</b>: Returns the object used to receive callbacks for XML
- * errors of all levels (fatal, nonfatal, warning); this is never null;
- */
- public ErrorHandler getErrorHandler ()
- { return errorHandler == base ? null : errorHandler; }
-
-
- /**
- * <b>SAX1, SAX2</b>: Auxiliary API to parse an XML document, used mostly
- * when no URI is available.
- * If you want anything useful to happen, you should set
- * at least one type of handler.
- * @param source The XML input source. Don't set 'encoding' unless
- * you know for a fact that it's correct.
- * @see #setEntityResolver
- * @see #setDTDHandler
- * @see #setContentHandler
- * @see #setErrorHandler
- * @exception SAXException The handlers may throw any SAXException,
- * and the parser normally throws SAXParseException objects.
- * @exception IOException IOExceptions are normally through through
- * the parser if there are problems reading the source document.
- */
- public void parse (InputSource source)
- throws SAXException, IOException
- {
- synchronized (base) {
- parser = new XmlParser ();
- if (namespaces)
- prefixStack = new NamespaceSupport ();
- else if (!xmlNames)
- throw new IllegalStateException ();
- parser.setHandler (this);
-
- try {
-
- Reader r = source.getCharacterStream();
- InputStream in = source.getByteStream();
-
-
- parser.doParse (source.getSystemId (),
- source.getPublicId (),
- r,
- in,
- source.getEncoding ());
- } catch (SAXException e) {
- throw e;
- } catch (IOException e) {
- throw e;
- } catch (RuntimeException e) {
- throw e;
- } catch (Exception e) {
- throw new SAXParseException (e.getMessage (), this, e);
- } finally {
- contentHandler.endDocument ();
- reset();
- }
- }
- }
+ // report element/attribute namespaces?
+ if ((FEATURE + "namespaces").equals(featureId))
+ {
+ return namespaces;
+ }
+ // all PEs and GEs are reported
+ if ((FEATURE + "lexical-handler/parameter-entities").equals(featureId))
+ {
+ return true;
+ }
- /**
- * <b>SAX1, SAX2</b>: Preferred API to parse an XML document, using a
- * system identifier (URI).
- */
- public void parse (String systemId)
- throws SAXException, IOException
- {
- parse (new InputSource (systemId));
- }
+ // default is true
+ if ((FEATURE + "string-interning").equals(featureId))
+ {
+ return stringInterning;
+ }
+
+ // EXTENSIONS 1.1
+
+ // always returns isSpecified info
+ if ((FEATURE + "use-attributes2").equals(featureId))
+ {
+ return true;
+ }
+
+ // meaningful between startDocument/endDocument
+ if ((FEATURE + "is-standalone").equals(featureId))
+ {
+ if (parser == null)
+ {
+ throw new SAXNotSupportedException(featureId);
+ }
+ return parser.isStandalone();
+ }
- //
- // Implementation of SAX2 "XMLReader" interface
- //
- static final String FEATURE = "http://xml.org/sax/features/";
- static final String PROPERTY = "http://xml.org/sax/properties/";
-
- /**
- * <b>SAX2</b>: Tells the value of the specified feature flag.
- *
- * @exception SAXNotRecognizedException thrown if the feature flag
- * is neither built in, nor yet assigned.
- */
- public boolean getFeature (String featureId)
- throws SAXNotRecognizedException, SAXNotSupportedException
- {
- if ((FEATURE + "validation").equals (featureId))
- return false;
-
- // external entities (both types) are optionally included
- if ((FEATURE + "external-general-entities").equals (featureId))
- return extGE;
- if ((FEATURE + "external-parameter-entities") .equals (featureId))
- return extPE;
-
- // element/attribute names are as written in document; no mangling
- if ((FEATURE + "namespace-prefixes").equals (featureId))
- return xmlNames;
-
- // report element/attribute namespaces?
- if ((FEATURE + "namespaces").equals (featureId))
- return namespaces;
-
- // all PEs and GEs are reported
- if ((FEATURE + "lexical-handler/parameter-entities").equals (featureId))
- return true;
-
- // default is true
- if ((FEATURE + "string-interning").equals (featureId))
- return stringInterning;
-
- // EXTENSIONS 1.1
-
- // always returns isSpecified info
- if ((FEATURE + "use-attributes2").equals (featureId))
- return true;
-
- // meaningful between startDocument/endDocument
- if ((FEATURE + "is-standalone").equals (featureId)) {
- if (parser == null)
- throw new SAXNotSupportedException (featureId);
- return parser.isStandalone ();
- }
-
- // optionally don't absolutize URIs in declarations
- if ((FEATURE + "resolve-dtd-uris").equals (featureId))
- return resolveAll;
-
- // optionally use resolver2 interface methods, if possible
- if ((FEATURE + "use-entity-resolver2").equals (featureId))
- return useResolver2;
-
- throw new SAXNotRecognizedException (featureId);
- }
+ // optionally don't absolutize URIs in declarations
+ if ((FEATURE + "resolve-dtd-uris").equals(featureId))
+ {
+ return resolveAll;
+ }
+
+ // optionally use resolver2 interface methods, if possible
+ if ((FEATURE + "use-entity-resolver2").equals(featureId))
+ {
+ return useResolver2;
+ }
+
+ throw new SAXNotRecognizedException(featureId);
+ }
- // package private
- DeclHandler getDeclHandler () { return declHandler; }
+ // package private
+ DeclHandler getDeclHandler()
+ {
+ return declHandler;
+ }
- // package private
- boolean resolveURIs () { return resolveAll; }
+ // package private
+ boolean resolveURIs()
+ {
+ return resolveAll;
+ }
- /**
- * <b>SAX2</b>: Returns the specified property.
- *
- * @exception SAXNotRecognizedException thrown if the property value
- * is neither built in, nor yet stored.
- */
- public Object getProperty (String propertyId)
+ /**
+ * <b>SAX2</b>: Returns the specified property.
+ *
+ * @exception SAXNotRecognizedException thrown if the property value
+ * is neither built in, nor yet stored.
+ */
+ public Object getProperty(String propertyId)
throws SAXNotRecognizedException
- {
- if ((PROPERTY + "declaration-handler").equals (propertyId))
- return declHandler == base ? null : declHandler;
-
- if ((PROPERTY + "lexical-handler").equals (propertyId))
- return lexicalHandler == base ? null : lexicalHandler;
-
- // unknown properties
- throw new SAXNotRecognizedException (propertyId);
- }
+ {
+ if ((PROPERTY + "declaration-handler").equals(propertyId))
+ {
+ return (declHandler == base) ? null : declHandler;
+ }
- /**
- * <b>SAX2</b>: Sets the state of feature flags in this parser. Some
- * built-in feature flags are mutable.
- */
- public void setFeature (String featureId, boolean value)
- throws SAXNotRecognizedException, SAXNotSupportedException
- {
- boolean state;
-
- // Features with a defined value, we just change it if we can.
- state = getFeature (featureId);
-
- if (state == value)
- return;
- if (parser != null)
- throw new SAXNotSupportedException ("not while parsing");
-
- if ((FEATURE + "namespace-prefixes").equals (featureId)) {
- // in this implementation, this only affects xmlns reporting
- xmlNames = value;
- // forcibly prevent illegal parser state
- if (!xmlNames)
- namespaces = true;
- return;
- }
-
- if ((FEATURE + "namespaces").equals (featureId)) {
- namespaces = value;
- // forcibly prevent illegal parser state
- if (!namespaces)
- xmlNames = true;
- return;
- }
-
- if ((FEATURE + "external-general-entities").equals (featureId)) {
- extGE = value;
- return;
- }
- if ((FEATURE + "external-parameter-entities") .equals (featureId)) {
- extPE = value;
- return;
- }
- if ((FEATURE + "resolve-dtd-uris").equals (featureId)) {
- resolveAll = value;
- return;
- }
-
- if ((FEATURE + "use-entity-resolver2").equals (featureId)) {
- useResolver2 = value;
- return;
- }
-
- throw new SAXNotRecognizedException (featureId);
- }
+ if ((PROPERTY + "lexical-handler").equals(propertyId))
+ {
+ return (lexicalHandler == base) ? null : lexicalHandler;
+ }
+
+ // unknown properties
+ throw new SAXNotRecognizedException(propertyId);
+ }
- /**
- * <b>SAX2</b>: Assigns the specified property. Like SAX1 handlers,
- * these may be changed at any time.
- */
- public void setProperty (String propertyId, Object value)
+ /**
+ * <b>SAX2</b>: Sets the state of feature flags in this parser. Some
+ * built-in feature flags are mutable.
+ */
+ public void setFeature(String featureId, boolean value)
throws SAXNotRecognizedException, SAXNotSupportedException
- {
- // see if the property is recognized
- getProperty (propertyId);
-
- // Properties with a defined value, we just change it if we can.
-
- if ((PROPERTY + "declaration-handler").equals (propertyId)) {
- if (value == null)
- declHandler = base;
- else if (! (value instanceof DeclHandler))
- throw new SAXNotSupportedException (propertyId);
- else
- declHandler = (DeclHandler) value;
- return ;
- }
-
- if ((PROPERTY + "lexical-handler").equals (propertyId)) {
- if (value == null)
- lexicalHandler = base;
- else if (! (value instanceof LexicalHandler))
- throw new SAXNotSupportedException (propertyId);
- else
- lexicalHandler = (LexicalHandler) value;
- return ;
- }
-
- throw new SAXNotSupportedException (propertyId);
- }
+ {
+ boolean state;
+
+ // Features with a defined value, we just change it if we can.
+ state = getFeature (featureId);
+
+ if (state == value)
+ {
+ return;
+ }
+ if (parser != null)
+ {
+ throw new SAXNotSupportedException("not while parsing");
+ }
+ if ((FEATURE + "namespace-prefixes").equals(featureId))
+ {
+ // in this implementation, this only affects xmlns reporting
+ xmlNames = value;
+ // forcibly prevent illegal parser state
+ if (!xmlNames)
+ {
+ namespaces = true;
+ }
+ return;
+ }
- //
- // This is where the driver receives XmlParser callbacks and translates
- // them into SAX callbacks. Some more callbacks have been added for
- // SAX2 support.
- //
+ if ((FEATURE + "namespaces").equals(featureId))
+ {
+ namespaces = value;
+ // forcibly prevent illegal parser state
+ if (!namespaces)
+ {
+ xmlNames = true;
+ }
+ return;
+ }
+
+ if ((FEATURE + "external-general-entities").equals(featureId))
+ {
+ extGE = value;
+ return;
+ }
+ if ((FEATURE + "external-parameter-entities").equals(featureId))
+ {
+ extPE = value;
+ return;
+ }
+ if ((FEATURE + "resolve-dtd-uris").equals(featureId))
+ {
+ resolveAll = value;
+ return;
+ }
- void startDocument ()
+ if ((FEATURE + "use-entity-resolver2").equals(featureId))
+ {
+ useResolver2 = value;
+ return;
+ }
+
+ throw new SAXNotRecognizedException(featureId);
+ }
+
+ /**
+ * <b>SAX2</b>: Assigns the specified property. Like SAX1 handlers,
+ * these may be changed at any time.
+ */
+ public void setProperty(String propertyId, Object value)
+ throws SAXNotRecognizedException, SAXNotSupportedException
+ {
+ // see if the property is recognized
+ getProperty(propertyId);
+
+ // Properties with a defined value, we just change it if we can.
+
+ if ((PROPERTY + "declaration-handler").equals(propertyId))
+ {
+ if (value == null)
+ {
+ declHandler = base;
+ }
+ else if (!(value instanceof DeclHandler))
+ {
+ throw new SAXNotSupportedException(propertyId);
+ }
+ else
+ {
+ declHandler = (DeclHandler) value;
+ }
+ return ;
+ }
+
+ if ((PROPERTY + "lexical-handler").equals(propertyId))
+ {
+ if (value == null)
+ {
+ lexicalHandler = base;
+ }
+ else if (!(value instanceof LexicalHandler))
+ {
+ throw new SAXNotSupportedException(propertyId);
+ }
+ else
+ {
+ lexicalHandler = (LexicalHandler) value;
+ }
+ return;
+ }
+
+ throw new SAXNotSupportedException(propertyId);
+ }
+
+ //
+ // This is where the driver receives XmlParser callbacks and translates
+ // them into SAX callbacks. Some more callbacks have been added for
+ // SAX2 support.
+ //
+
+ void startDocument()
throws SAXException
- {
- contentHandler.setDocumentLocator (this);
- contentHandler.startDocument ();
- attributesList.clear ();
- }
+ {
+ contentHandler.setDocumentLocator(this);
+ contentHandler.startDocument();
+ attributesList.clear();
+ }
- void xmlDecl(String version,
- String encoding,
- boolean standalone,
- String inputEncoding)
- throws SAXException
- {
- if (contentHandler instanceof ContentHandler2)
- {
- ((ContentHandler2) contentHandler).xmlDecl(version,
- encoding,
- standalone,
- inputEncoding);
- }
- }
+ void xmlDecl(String version,
+ String encoding,
+ boolean standalone,
+ String inputEncoding)
+ throws SAXException
+ {
+ if (contentHandler instanceof ContentHandler2)
+ {
+ ((ContentHandler2) contentHandler).xmlDecl(version,
+ encoding,
+ standalone,
+ inputEncoding);
+ }
+ }
- void skippedEntity (String name)
+ void skippedEntity(String name)
throws SAXException
- { contentHandler.skippedEntity (name); }
+ {
+ contentHandler.skippedEntity(name);
+ }
- InputSource getExternalSubset (String name, String baseURI)
+ InputSource getExternalSubset(String name, String baseURI)
throws SAXException, IOException
- {
- if (resolver2 == null || !useResolver2 || !extPE)
- return null;
- return resolver2.getExternalSubset (name, baseURI);
- }
+ {
+ if (resolver2 == null || !useResolver2 || !extPE)
+ {
+ return null;
+ }
+ return resolver2.getExternalSubset(name, baseURI);
+ }
- InputSource resolveEntity (boolean isPE, String name,
- InputSource in, String baseURI)
+ InputSource resolveEntity(boolean isPE, String name,
+ InputSource in, String baseURI)
throws SAXException, IOException
- {
- InputSource source;
-
- // external entities might be skipped
- if (isPE && !extPE)
- return null;
- if (!isPE && !extGE)
- return null;
-
- // ... or not
- lexicalHandler.startEntity (name);
- if (resolver2 != null && useResolver2) {
- source = resolver2.resolveEntity (name, in.getPublicId (),
- baseURI, in.getSystemId ());
- if (source == null) {
- in.setSystemId (absolutize (baseURI,
- in.getSystemId (), false));
- source = in;
- }
- } else {
- in.setSystemId (absolutize (baseURI, in.getSystemId (), false));
- source = entityResolver.resolveEntity (in.getPublicId (),
- in.getSystemId ());
- if (source == null)
- source = in;
- }
- startExternalEntity (name, source.getSystemId (), true);
- return source;
- }
+ {
+ InputSource source;
+
+ // external entities might be skipped
+ if (isPE && !extPE)
+ {
+ return null;
+ }
+ if (!isPE && !extGE)
+ {
+ return null;
+ }
- // absolutize a system ID relative to the specified base URI
- // (temporarily) package-visible for external entity decls
- String absolutize (String baseURI, String systemId, boolean nice)
+ // ... or not
+ lexicalHandler.startEntity(name);
+ if (resolver2 != null && useResolver2)
+ {
+ source = resolver2.resolveEntity(name, in.getPublicId(),
+ baseURI, in.getSystemId());
+ if (source == null)
+ {
+ in.setSystemId(absolutize(baseURI,
+ in.getSystemId(), false));
+ source = in;
+ }
+ }
+ else
+ {
+ in.setSystemId(absolutize(baseURI, in.getSystemId(), false));
+ source = entityResolver.resolveEntity(in.getPublicId(),
+ in.getSystemId());
+ if (source == null)
+ {
+ source = in;
+ }
+ }
+ startExternalEntity(name, source.getSystemId(), true);
+ return source;
+ }
+
+ // absolutize a system ID relative to the specified base URI
+ // (temporarily) package-visible for external entity decls
+ String absolutize(String baseURI, String systemId, boolean nice)
throws MalformedURLException, SAXException
- {
- // FIXME normalize system IDs -- when?
- // - Convert to UTF-8
- // - Map reserved and non-ASCII characters to %HH
-
- try {
- if (baseURI == null) {
- warn ("No base URI; hope this SYSTEM id is absolute: "
- + systemId);
- return new URL (systemId).toString ();
- } else
- return new URL (new URL (baseURI), systemId).toString ();
-
- } catch (MalformedURLException e) {
-
- // Let unknown URI schemes pass through unless we need
- // the JVM to map them to i/o streams for us...
- if (!nice)
- throw e;
-
- // sometimes sysids for notations or unparsed entities
- // aren't really URIs...
- warn ("Can't absolutize SYSTEM id: " + e.getMessage ());
- return systemId;
- }
- }
+ {
+ // FIXME normalize system IDs -- when?
+ // - Convert to UTF-8
+ // - Map reserved and non-ASCII characters to %HH
+
+ try
+ {
+ if (baseURI == null)
+ {
+ if (XmlParser.uriWarnings)
+ {
+ warn ("No base URI; hope this SYSTEM id is absolute: "
+ + systemId);
+ }
+ return new URL(systemId).toString();
+ }
+ else
+ {
+ return new URL(new URL(baseURI), systemId).toString();
+ }
+ }
+ catch (MalformedURLException e)
+ {
+ // Let unknown URI schemes pass through unless we need
+ // the JVM to map them to i/o streams for us...
+ if (!nice)
+ {
+ throw e;
+ }
+
+ // sometimes sysids for notations or unparsed entities
+ // aren't really URIs...
+ warn("Can't absolutize SYSTEM id: " + e.getMessage());
+ return systemId;
+ }
+ }
- void startExternalEntity (String name, String systemId,
- boolean stackOnly)
+ void startExternalEntity(String name, String systemId, boolean stackOnly)
throws SAXException
- {
- // The following warning was deleted because the application has the
- // option of not setting systemId. Sun's JAXP or Xerces seems to
- // ignore this case.
- /*
- if (systemId == null)
- warn ("URI was not reported to parser for entity " + name);
- */
- if (!stackOnly) // spliced [dtd] needs startEntity
- lexicalHandler.startEntity (name);
- entityStack.push (systemId);
- }
+ {
+ // The following warning was deleted because the application has the
+ // option of not setting systemId. Sun's JAXP or Xerces seems to
+ // ignore this case.
+ /*
+ if (systemId == null)
+ warn ("URI was not reported to parser for entity " + name);
+ */
+ if (!stackOnly) // spliced [dtd] needs startEntity
+ {
+ lexicalHandler.startEntity(name);
+ }
+ entityStack.push(systemId);
+ }
- void endExternalEntity (String name)
+ void endExternalEntity(String name)
throws SAXException
- {
- if (!"[document]".equals (name))
- lexicalHandler.endEntity (name);
- entityStack.pop ();
- }
+ {
+ if (!"[document]".equals(name))
+ {
+ lexicalHandler.endEntity(name);
+ }
+ entityStack.pop();
+ }
- void startInternalEntity (String name)
+ void startInternalEntity(String name)
throws SAXException
- {
- lexicalHandler.startEntity (name);
- }
+ {
+ lexicalHandler.startEntity(name);
+ }
- void endInternalEntity (String name)
+ void endInternalEntity(String name)
throws SAXException
- {
- lexicalHandler.endEntity (name);
- }
+ {
+ lexicalHandler.endEntity(name);
+ }
- void doctypeDecl (String name, String publicId, String systemId)
+ void doctypeDecl(String name, String publicId, String systemId)
throws SAXException
- {
- lexicalHandler.startDTD (name, publicId, systemId);
-
- // ... the "name" is a declaration and should be given
- // to the DeclHandler (but sax2 doesn't).
-
- // the IDs for the external subset are lexical details,
- // as are the contents of the internal subset; but sax2
- // doesn't provide the internal subset "pre-parse"
- }
-
- void notationDecl (String name, String ids [])
+ {
+ lexicalHandler.startDTD(name, publicId, systemId);
+
+ // ... the "name" is a declaration and should be given
+ // to the DeclHandler (but sax2 doesn't).
+
+ // the IDs for the external subset are lexical details,
+ // as are the contents of the internal subset; but sax2
+ // doesn't provide the internal subset "pre-parse"
+ }
+
+ void notationDecl(String name, String publicId, String systemId,
+ String baseUri)
throws SAXException
- {
- try {
- dtdHandler.notationDecl (name, ids [0],
- (resolveAll && ids [1] != null)
- ? absolutize (ids [2], ids [1], true)
- : ids [1]);
- } catch (IOException e) {
- // "can't happen"
- throw new SAXParseException (e.getMessage (), this, e);
- }
- }
+ {
+ try
+ {
+ dtdHandler.notationDecl(name, publicId,
+ (resolveAll && systemId != null)
+ ? absolutize(baseUri, systemId, true)
+ : systemId);
+ }
+ catch (IOException e)
+ {
+ // "can't happen"
+ throw new SAXParseException(e.getMessage(), this, e);
+ }
+ }
- void unparsedEntityDecl (String name, String ids [], String notation)
+ void unparsedEntityDecl(String name, String publicId, String systemId,
+ String baseUri, String notation)
throws SAXException
- {
- try {
- dtdHandler.unparsedEntityDecl (name, ids [0],
- resolveAll
- ? absolutize (ids [2], ids [1], true)
- : ids [1],
- notation);
- } catch (IOException e) {
- // "can't happen"
- throw new SAXParseException (e.getMessage (), this, e);
- }
- }
+ {
+ try
+ {
+ dtdHandler.unparsedEntityDecl(name, publicId,
+ resolveAll
+ ? absolutize(baseUri, systemId, true)
+ : systemId,
+ notation);
+ }
+ catch (IOException e)
+ {
+ // "can't happen"
+ throw new SAXParseException(e.getMessage(), this, e);
+ }
+ }
- void endDoctype ()
+ void endDoctype()
throws SAXException
- {
- lexicalHandler.endDTD ();
- }
+ {
+ lexicalHandler.endDTD();
+ }
- private void declarePrefix (String prefix, String uri)
+ private void declarePrefix(String prefix, String uri)
throws SAXException
- {
- int index = uri.indexOf (':');
-
- // many versions of nwalsh docbook stylesheets
- // have bogus URLs; so this can't be an error...
- if (index < 1 && uri.length () != 0)
- warn ("relative URI for namespace: " + uri);
-
- // FIXME: char [0] must be ascii alpha; chars [1..index]
- // must be ascii alphanumeric or in "+-." [RFC 2396]
-
- //Namespace Constraints
- //name for xml prefix must be http://www.w3.org/XML/1998/namespace
- boolean prefixEquality = prefix.equals("xml");
- boolean uriEquality = uri.equals("http://www.w3.org/XML/1998/namespace");
- if ((prefixEquality || uriEquality) && !(prefixEquality && uriEquality))
- fatal ("xml is by definition bound to the namespace name " +
- "http://www.w3.org/XML/1998/namespace");
-
- //xmlns prefix declaration is illegal but xml prefix declaration is llegal...
- if (prefixEquality && uriEquality)
- return;
-
- //name for xmlns prefix must be http://www.w3.org/2000/xmlns/
- prefixEquality = prefix.equals("xmlns");
- uriEquality = uri.equals("http://www.w3.org/2000/xmlns/");
- if ((prefixEquality || uriEquality) && !(prefixEquality && uriEquality))
- fatal("http://www.w3.org/2000/xmlns/ is by definition bound" +
- " to prefix xmlns");
-
- //even if the uri is http://www.w3.org/2000/xmlns/ it is illegal to declare it
- if (prefixEquality && uriEquality)
- fatal ("declaring the xmlns prefix is illegal");
-
- uri = uri.intern ();
- prefixStack.declarePrefix (prefix, uri);
- contentHandler.startPrefixMapping (prefix, uri);
- }
+ {
+ int index = uri.indexOf(':');
+
+ // many versions of nwalsh docbook stylesheets
+ // have bogus URLs; so this can't be an error...
+ if (index < 1 && uri.length() != 0)
+ {
+ warn("relative URI for namespace: " + uri);
+ }
- void attribute (String qname, String value, boolean isSpecified)
- throws SAXException
- {
- if (!attributes) {
- attributes = true;
- if (namespaces)
- prefixStack.pushContext ();
- }
-
- // process namespace decls immediately;
- // then maybe forget this as an attribute
- if (namespaces) {
- int index;
-
- // default NS declaration?
- if (getFeature (FEATURE + "string-interning")) {
- if ("xmlns" == qname) {
- declarePrefix ("", value);
- if (!xmlNames)
- return;
- }
- // NS prefix declaration?
- else if ((index = qname.indexOf (':')) == 5
- && qname.startsWith ("xmlns")) {
- String prefix = qname.substring (6);
-
- if (prefix.equals(""))
- fatal ("missing prefix in namespace declaration attribute");
- if (value.length () == 0) {
- verror ("missing URI in namespace declaration attribute: "
- + qname);
- } else
- declarePrefix (prefix, value);
- if (!xmlNames)
- return;
- }
- } else {
- if ("xmlns".equals(qname)) {
- declarePrefix ("", value);
- if (!xmlNames)
- return;
- }
- // NS prefix declaration?
- else if ((index = qname.indexOf (':')) == 5
- && qname.startsWith ("xmlns")) {
- String prefix = qname.substring (6);
-
- if (value.length () == 0) {
- verror ("missing URI in namespace decl attribute: "
- + qname);
- } else
- declarePrefix (prefix, value);
- if (!xmlNames)
- return;
- }
+ // FIXME: char [0] must be ascii alpha; chars [1..index]
+ // must be ascii alphanumeric or in "+-." [RFC 2396]
+
+ //Namespace Constraints
+ //name for xml prefix must be http://www.w3.org/XML/1998/namespace
+ boolean prefixEquality = prefix.equals("xml");
+ boolean uriEquality = uri.equals("http://www.w3.org/XML/1998/namespace");
+ if ((prefixEquality || uriEquality) && !(prefixEquality && uriEquality))
+ {
+ fatal("xml is by definition bound to the namespace name " +
+ "http://www.w3.org/XML/1998/namespace");
+ }
+
+ //xmlns prefix declaration is illegal but xml prefix declaration is llegal...
+ if (prefixEquality && uriEquality)
+ {
+ return;
}
+
+ //name for xmlns prefix must be http://www.w3.org/2000/xmlns/
+ prefixEquality = prefix.equals("xmlns");
+ uriEquality = uri.equals("http://www.w3.org/2000/xmlns/");
+ if ((prefixEquality || uriEquality) && !(prefixEquality && uriEquality))
+ {
+ fatal("http://www.w3.org/2000/xmlns/ is by definition bound" +
+ " to prefix xmlns");
+ }
+
+ //even if the uri is http://www.w3.org/2000/xmlns/
+ // it is illegal to declare it
+ if (prefixEquality && uriEquality)
+ {
+ fatal ("declaring the xmlns prefix is illegal");
+ }
+
+ uri = uri.intern();
+ prefixStack.declarePrefix(prefix, uri);
+ contentHandler.startPrefixMapping(prefix, uri);
}
- // remember this attribute ...
-
- attributeCount++;
-
- // attribute type comes from querying parser's DTD records
- attributesList.add(new Attribute(qname, value, isSpecified));
-
- }
- void startElement (String elname)
+ void attribute(String qname, String value, boolean isSpecified)
throws SAXException
- {
- ContentHandler handler = contentHandler;
-
- //
- // NOTE: this implementation of namespace support adds something
- // like six percent to parsing CPU time, in a large (~50 MB)
- // document that doesn't use namespaces at all. (Measured by PC
- // sampling, with a bug where endElement processing was omitted.)
- // [Measurement referred to older implementation, older JVM ...]
- //
- // It ought to become notably faster in such cases. Most
- // costs are the prefix stack calling Hashtable.get() (2%),
- // String.hashCode() (1.5%) and about 1.3% each for pushing
- // the context, and two chunks of name processing.
- //
-
- if (!attributes) {
- if (namespaces)
- prefixStack.pushContext ();
- } else if (namespaces) {
-
- // now we can patch up namespace refs; we saw all the
- // declarations, so now we'll do the Right Thing
- Iterator itt = attributesList.iterator ();
- while(itt.hasNext())
- {
- Attribute attribute = (Attribute) itt.next();
- String qname = attribute.name;
- int index;
-
- // default NS declaration?
- if (getFeature (FEATURE + "string-interning")) {
- if ("xmlns" == qname)
- continue;
- } else {
- if ("xmlns".equals(qname))
- continue;
- }
- //Illegal in the new Namespaces Draft
- //should it be only in 1.1 docs??
- if (qname.equals (":"))
- fatal ("namespace names consisting of a single colon " +
- "character are invalid");
- index = qname.indexOf (':');
-
- // NS prefix declaration?
- if (index == 5 && qname.startsWith ("xmlns"))
- continue;
-
- // it's not a NS decl; patch namespace info items
- if (prefixStack.processName (qname, nsTemp, true) == null)
- fatal ("undeclared attribute prefix in: " + qname);
- else {
- attribute.nameSpace = nsTemp[0];
- attribute.localName = nsTemp[1];
- }
- }
- }
-
- // save element name so attribute callbacks work
- elementName = elname;
- if (namespaces) {
- if (prefixStack.processName (elname, nsTemp, false) == null) {
- fatal ("undeclared element prefix in: " + elname);
- nsTemp [0] = nsTemp [1] = "";
- }
- handler.startElement (nsTemp [0], nsTemp [1], elname, this);
- } else
- handler.startElement ("", "", elname, this);
- // elementName = null;
-
- // elements with no attributes are pretty common!
- if (attributes) {
- attributesList.clear();
- attributeCount = 0;
- attributes = false;
- }
- }
-
- void endElement (String elname)
+ {
+ if (!attributes)
+ {
+ attributes = true;
+ if (namespaces)
+ {
+ prefixStack.pushContext();
+ }
+ }
+
+ // process namespace decls immediately;
+ // then maybe forget this as an attribute
+ if (namespaces)
+ {
+ int index;
+
+ // default NS declaration?
+ if (stringInterning)
+ {
+ if ("xmlns" == qname)
+ {
+ declarePrefix("", value);
+ if (!xmlNames)
+ {
+ return;
+ }
+ }
+ // NS prefix declaration?
+ else if ((index = qname.indexOf(':')) == 5
+ && qname.startsWith("xmlns"))
+ {
+ String prefix = qname.substring(6);
+
+ if (prefix.equals(""))
+ {
+ fatal("missing prefix " +
+ "in namespace declaration attribute");
+ }
+ if (value.length() == 0)
+ {
+ verror("missing URI in namespace declaration attribute: "
+ + qname);
+ }
+ else
+ {
+ declarePrefix(prefix, value);
+ }
+ if (!xmlNames)
+ {
+ return;
+ }
+ }
+ }
+ else
+ {
+ if ("xmlns".equals(qname))
+ {
+ declarePrefix("", value);
+ if (!xmlNames)
+ {
+ return;
+ }
+ }
+ // NS prefix declaration?
+ else if ((index = qname.indexOf(':')) == 5
+ && qname.startsWith("xmlns"))
+ {
+ String prefix = qname.substring(6);
+
+ if (value.length() == 0)
+ {
+ verror("missing URI in namespace decl attribute: "
+ + qname);
+ }
+ else
+ {
+ declarePrefix(prefix, value);
+ }
+ if (!xmlNames)
+ {
+ return;
+ }
+ }
+ }
+ }
+ // remember this attribute ...
+ attributeCount++;
+
+ // attribute type comes from querying parser's DTD records
+ attributesList.add(new Attribute(qname, value, isSpecified));
+
+ }
+
+ void startElement(String elname)
throws SAXException
- {
- ContentHandler handler = contentHandler;
-
- if (!namespaces) {
- handler.endElement ("", "", elname);
- return;
- }
- prefixStack.processName (elname, nsTemp, false);
- handler.endElement (nsTemp [0], nsTemp [1], elname);
+ {
+ ContentHandler handler = contentHandler;
- Enumeration prefixes = prefixStack.getDeclaredPrefixes ();
+ //
+ // NOTE: this implementation of namespace support adds something
+ // like six percent to parsing CPU time, in a large (~50 MB)
+ // document that doesn't use namespaces at all. (Measured by PC
+ // sampling, with a bug where endElement processing was omitted.)
+ // [Measurement referred to older implementation, older JVM ...]
+ //
+ // It ought to become notably faster in such cases. Most
+ // costs are the prefix stack calling Hashtable.get() (2%),
+ // String.hashCode() (1.5%) and about 1.3% each for pushing
+ // the context, and two chunks of name processing.
+ //
+
+ if (!attributes)
+ {
+ if (namespaces)
+ {
+ prefixStack.pushContext();
+ }
+ }
+ else if (namespaces)
+ {
+
+ // now we can patch up namespace refs; we saw all the
+ // declarations, so now we'll do the Right Thing
+ Iterator itt = attributesList.iterator();
+ while (itt.hasNext())
+ {
+ Attribute attribute = (Attribute) itt.next();
+ String qname = attribute.name;
+ int index;
+
+ // default NS declaration?
+ if (stringInterning)
+ {
+ if ("xmlns" == qname)
+ {
+ continue;
+ }
+ }
+ else
+ {
+ if ("xmlns".equals(qname))
+ {
+ continue;
+ }
+ }
+ //Illegal in the new Namespaces Draft
+ //should it be only in 1.1 docs??
+ if (qname.equals (":"))
+ {
+ fatal("namespace names consisting of a single colon " +
+ "character are invalid");
+ }
+ index = qname.indexOf(':');
+
+ // NS prefix declaration?
+ if (index == 5 && qname.startsWith("xmlns"))
+ {
+ continue;
+ }
+
+ // it's not a NS decl; patch namespace info items
+ if (prefixStack.processName(qname, nsTemp, true) == null)
+ {
+ fatal("undeclared attribute prefix in: " + qname);
+ }
+ else
+ {
+ attribute.nameSpace = nsTemp[0];
+ attribute.localName = nsTemp[1];
+ }
+ }
+ }
+
+ // save element name so attribute callbacks work
+ elementName = elname;
+ if (namespaces)
+ {
+ if (prefixStack.processName(elname, nsTemp, false) == null)
+ {
+ fatal("undeclared element prefix in: " + elname);
+ nsTemp[0] = nsTemp[1] = "";
+ }
+ handler.startElement(nsTemp[0], nsTemp[1], elname, this);
+ }
+ else
+ {
+ handler.startElement("", "", elname, this);
+ }
+ // elementName = null;
+
+ // elements with no attributes are pretty common!
+ if (attributes)
+ {
+ attributesList.clear();
+ attributeCount = 0;
+ attributes = false;
+ }
+ }
+
+ void endElement(String elname)
+ throws SAXException
+ {
+ ContentHandler handler = contentHandler;
- while (prefixes.hasMoreElements ())
- handler.endPrefixMapping ((String) prefixes.nextElement ());
- prefixStack.popContext ();
- }
+ if (!namespaces)
+ {
+ handler.endElement("", "", elname);
+ return;
+ }
+ prefixStack.processName(elname, nsTemp, false);
+ handler.endElement(nsTemp[0], nsTemp[1], elname);
+
+ Enumeration prefixes = prefixStack.getDeclaredPrefixes();
+
+ while (prefixes.hasMoreElements())
+ {
+ handler.endPrefixMapping((String) prefixes.nextElement());
+ }
+ prefixStack.popContext();
+ }
- void startCDATA ()
+ void startCDATA()
throws SAXException
- {
- lexicalHandler.startCDATA ();
- }
+ {
+ lexicalHandler.startCDATA();
+ }
- void charData (char ch[], int start, int length)
+ void charData(char[] ch, int start, int length)
throws SAXException
- {
- contentHandler.characters (ch, start, length);
- }
+ {
+ contentHandler.characters(ch, start, length);
+ }
- void endCDATA ()
+ void endCDATA()
throws SAXException
- {
- lexicalHandler.endCDATA ();
- }
+ {
+ lexicalHandler.endCDATA();
+ }
- void ignorableWhitespace (char ch[], int start, int length)
+ void ignorableWhitespace(char[] ch, int start, int length)
throws SAXException
- {
- contentHandler.ignorableWhitespace (ch, start, length);
- }
+ {
+ contentHandler.ignorableWhitespace(ch, start, length);
+ }
- void processingInstruction (String target, String data)
+ void processingInstruction(String target, String data)
throws SAXException
- {
- contentHandler.processingInstruction (target, data);
- }
+ {
+ contentHandler.processingInstruction(target, data);
+ }
- void comment (char ch[], int start, int length)
+ void comment(char[] ch, int start, int length)
throws SAXException
- {
- if (lexicalHandler != base)
- lexicalHandler.comment (ch, start, length);
- }
+ {
+ if (lexicalHandler != base)
+ {
+ lexicalHandler.comment(ch, start, length);
+ }
+ }
- void fatal (String message)
+ void fatal(String message)
throws SAXException
- {
- SAXParseException fatal;
-
- fatal = new SAXParseException (message, this);
- errorHandler.fatalError (fatal);
-
- // Even if the application can continue ... we can't!
- throw fatal;
- }
+ {
+ SAXParseException fatal;
+
+ fatal = new SAXParseException(message, this);
+ errorHandler.fatalError(fatal);
+
+ // Even if the application can continue ... we can't!
+ throw fatal;
+ }
- // We can safely report a few validity errors that
- // make layered SAX2 DTD validation more conformant
- void verror (String message)
+ // We can safely report a few validity errors that
+ // make layered SAX2 DTD validation more conformant
+ void verror(String message)
throws SAXException
- {
- SAXParseException err;
-
- err = new SAXParseException (message, this);
- errorHandler.error (err);
- }
-
- void warn (String message)
+ {
+ SAXParseException err;
+
+ err = new SAXParseException(message, this);
+ errorHandler.error(err);
+ }
+
+ void warn(String message)
throws SAXException
- {
- SAXParseException err;
-
- err = new SAXParseException (message, this);
- errorHandler.warning (err);
- }
+ {
+ SAXParseException err;
+
+ err = new SAXParseException(message, this);
+ errorHandler.warning(err);
+ }
+ //
+ // Implementation of org.xml.sax.Attributes.
+ //
+
+ /**
+ * <b>SAX1 AttributeList, SAX2 Attributes</b> method
+ * (don't invoke on parser);
+ */
+ public int getLength()
+ {
+ return attributesList.size();
+ }
- //
- // Implementation of org.xml.sax.Attributes.
- //
+ /**
+ * <b>SAX2 Attributes</b> method (don't invoke on parser);
+ */
+ public String getURI(int index)
+ {
+ if (index < 0 || index >= attributesList.size())
+ {
+ return null;
+ }
+ return ((Attribute) attributesList.get(index)).nameSpace;
+ }
- /**
- * <b>SAX1 AttributeList, SAX2 Attributes</b> method
- * (don't invoke on parser);
- */
- public int getLength ()
- {
- return attributesList.size();
- }
+ /**
+ * <b>SAX2 Attributes</b> method (don't invoke on parser);
+ */
+ public String getLocalName(int index)
+ {
+ if (index < 0 || index >= attributesList.size())
+ {
+ return null;
+ }
+ Attribute attr = (Attribute) attributesList.get(index);
+ // FIXME attr.localName is sometimes null, why?
+ if (namespaces && attr.localName == null)
+ {
+ // XXX fix this here for now
+ int ci = attr.name.indexOf(':');
+ attr.localName = (ci == -1) ? attr.name :
+ attr.name.substring(ci + 1);
+ }
+ return (attr.localName == null) ? "" : attr.localName;
+ }
- /**
- * <b>SAX2 Attributes</b> method (don't invoke on parser);
- */
- public String getURI (int index)
- {
- if (index < 0 || index >= attributesList.size())
- {
- return null;
- }
- return ((Attribute) attributesList.get(index)).nameSpace;
- }
+ /**
+ * <b>SAX2 Attributes</b> method (don't invoke on parser);
+ */
+ public String getQName(int index)
+ {
+ if (index < 0 || index >= attributesList.size())
+ {
+ return null;
+ }
+ Attribute attr = (Attribute) attributesList.get(index);
+ return (attr.name == null) ? "" : attr.name;
+ }
- /**
- * <b>SAX2 Attributes</b> method (don't invoke on parser);
- */
- public String getLocalName (int index)
- {
- if (index < 0 || index >= attributesList.size())
- {
- return null;
- }
- Attribute attr = (Attribute) attributesList.get(index);
- // FIXME attr.localName is sometimes null, why?
- if (namespaces && attr.localName == null)
- {
- // XXX fix this here for now
- int ci = attr.name.indexOf(':');
- attr.localName = (ci == -1) ? attr.name :
- attr.name.substring(ci + 1);
- }
- return (attr.localName == null) ? "" : attr.localName;
- }
+ /**
+ * <b>SAX1 AttributeList</b> method (don't invoke on parser);
+ */
+ public String getName(int index)
+ {
+ return getQName(index);
+ }
- /**
- * <b>SAX2 Attributes</b> method (don't invoke on parser);
- */
- public String getQName (int index)
- {
- if (index < 0 || index >= attributesList.size())
- {
- return null;
- }
- Attribute attr = (Attribute) attributesList.get(index);
- return (attr.name == null) ? "" : attr.name;
- }
+ /**
+ * <b>SAX1 AttributeList, SAX2 Attributes</b> method
+ * (don't invoke on parser);
+ */
+ public String getType(int index)
+ {
+ if (index < 0 || index >= attributesList.size())
+ {
+ return null;
+ }
+ String type = parser.getAttributeType(elementName, getQName(index));
+ if (type == null)
+ {
+ return "CDATA";
+ }
+ // ... use DeclHandler.attributeDecl to see enumerations
+ if (type == "ENUMERATION")
+ {
+ return "NMTOKEN";
+ }
+ return type;
+ }
- /**
- * <b>SAX1 AttributeList</b> method (don't invoke on parser);
- */
- public String getName (int index)
- {
- return getQName(index);
- }
+ /**
+ * <b>SAX1 AttributeList, SAX2 Attributes</b> method
+ * (don't invoke on parser);
+ */
+ public String getValue(int index)
+ {
+ if (index < 0 || index >= attributesList.size())
+ {
+ return null;
+ }
+ return ((Attribute) attributesList.get(index)).value;
+ }
- /**
- * <b>SAX1 AttributeList, SAX2 Attributes</b> method
- * (don't invoke on parser);
- */
- public String getType (int index)
+ /**
+ * <b>SAX2 Attributes</b> method (don't invoke on parser);
+ */
+ public int getIndex(String uri, String local)
{
- if (index < 0 || index >= attributesList.size())
- {
- return null;
- }
- String type = parser.getAttributeType(elementName, getQName(index));
- if (type == null)
- {
- return "CDATA";
- }
- // ... use DeclHandler.attributeDecl to see enumerations
- if (type == "ENUMERATION")
- {
- return "NMTOKEN";
- }
- return type;
- }
-
+ int length = getLength();
+
+ for (int i = 0; i < length; i++)
+ {
+ if (!getURI(i).equals(uri))
+ {
+ continue;
+ }
+ if (getLocalName(i).equals(local))
+ {
+ return i;
+ }
+ }
+ return -1;
+ }
- /**
- * <b>SAX1 AttributeList, SAX2 Attributes</b> method
- * (don't invoke on parser);
- */
- public String getValue (int index)
- {
- if (index < 0 || index >= attributesList.size())
+ /**
+ * <b>SAX2 Attributes</b> method (don't invoke on parser);
+ */
+ public int getIndex(String xmlName)
+ {
+ int length = getLength();
+
+ for (int i = 0; i < length; i++)
+ {
+ if (getQName(i).equals(xmlName))
{
- return null;
+ return i;
}
- return ((Attribute) attributesList.get(index)).value;
- }
+ }
+ return -1;
+ }
+ /**
+ * <b>SAX2 Attributes</b> method (don't invoke on parser);
+ */
+ public String getType(String uri, String local)
+ {
+ int index = getIndex(uri, local);
+
+ if (index < 0)
+ {
+ return null;
+ }
+ return getType(index);
+ }
- /**
- * <b>SAX2 Attributes</b> method (don't invoke on parser);
- */
- public int getIndex (String uri, String local)
- {
- int length = getLength();
+ /**
+ * <b>SAX1 AttributeList, SAX2 Attributes</b> method
+ * (don't invoke on parser);
+ */
+ public String getType(String xmlName)
+ {
+ int index = getIndex(xmlName);
+
+ if (index < 0)
+ {
+ return null;
+ }
+ return getType(index);
+ }
- for (int i = 0; i < length; i++)
- {
- if (!getURI(i).equals(uri))
- {
- continue;
- }
- if (getLocalName(i).equals(local))
- {
- return i;
- }
- }
- return -1;
- }
+ /**
+ * <b>SAX Attributes</b> method (don't invoke on parser);
+ */
+ public String getValue(String uri, String local)
+ {
+ int index = getIndex(uri, local);
+
+ if (index < 0)
+ {
+ return null;
+ }
+ return getValue(index);
+ }
+ /**
+ * <b>SAX1 AttributeList, SAX2 Attributes</b> method
+ * (don't invoke on parser);
+ */
+ public String getValue(String xmlName)
+ {
+ int index = getIndex(xmlName);
+
+ if (index < 0)
+ {
+ return null;
+ }
+ return getValue(index);
+ }
- /**
- * <b>SAX2 Attributes</b> method (don't invoke on parser);
- */
- public int getIndex (String xmlName)
- {
- int length = getLength();
+ //
+ // Implementation of org.xml.sax.ext.Attributes2
+ //
+
+ /** @return false unless the attribute was declared in the DTD.
+ * @throws java.lang.ArrayIndexOutOfBoundsException
+ * When the supplied index does not identify an attribute.
+ */
+ public boolean isDeclared(int index)
+ {
+ if (index < 0 || index >= attributeCount)
+ {
+ throw new ArrayIndexOutOfBoundsException();
+ }
+ String type = parser.getAttributeType(elementName, getQName(index));
+ return (type != null);
+ }
- for (int i = 0; i < length; i++)
- {
- if (getQName(i).equals(xmlName))
- {
- return i;
- }
- }
- return -1;
- }
+ /** @return false unless the attribute was declared in the DTD.
+ * @throws java.lang.IllegalArgumentException
+ * When the supplied names do not identify an attribute.
+ */
+ public boolean isDeclared(String qName)
+ {
+ int index = getIndex(qName);
+ if (index < 0)
+ {
+ throw new IllegalArgumentException();
+ }
+ String type = parser.getAttributeType(elementName, qName);
+ return (type != null);
+ }
+ /** @return false unless the attribute was declared in the DTD.
+ * @throws java.lang.IllegalArgumentException
+ * When the supplied names do not identify an attribute.
+ */
+ public boolean isDeclared(String uri, String localName)
+ {
+ int index = getIndex(uri, localName);
+ return isDeclared(index);
+ }
- /**
- * <b>SAX2 Attributes</b> method (don't invoke on parser);
- */
- public String getType (String uri, String local)
- {
- int index = getIndex(uri, local);
+ /**
+ * <b>SAX-ext Attributes2</b> method (don't invoke on parser);
+ */
+ public boolean isSpecified(int index)
+ {
+ return ((Attribute) attributesList.get(index)).specified;
+ }
- if (index < 0)
- {
- return null;
- }
- return getType(index);
- }
+ /**
+ * <b>SAX-ext Attributes2</b> method (don't invoke on parser);
+ */
+ public boolean isSpecified(String uri, String local)
+ {
+ int index = getIndex (uri, local);
+ return isSpecified(index);
+ }
+ /**
+ * <b>SAX-ext Attributes2</b> method (don't invoke on parser);
+ */
+ public boolean isSpecified(String xmlName)
+ {
+ int index = getIndex (xmlName);
+ return isSpecified(index);
+ }
- /**
- * <b>SAX1 AttributeList, SAX2 Attributes</b> method
- * (don't invoke on parser);
- */
- public String getType (String xmlName)
- {
- int index = getIndex(xmlName);
+ //
+ // Implementation of org.xml.sax.Locator.
+ //
- if (index < 0)
- {
- return null;
- }
- return getType(index);
- }
+ /**
+ * <b>SAX Locator</b> method (don't invoke on parser);
+ */
+ public String getPublicId()
+ {
+ return null; // FIXME track public IDs too
+ }
+ /**
+ * <b>SAX Locator</b> method (don't invoke on parser);
+ */
+ public String getSystemId()
+ {
+ if (entityStack.empty())
+ {
+ return null;
+ }
+ else
+ {
+ return (String) entityStack.peek();
+ }
+ }
- /**
- * <b>SAX Attributes</b> method (don't invoke on parser);
- */
- public String getValue (String uri, String local)
- {
- int index = getIndex(uri, local);
+ /**
+ * <b>SAX Locator</b> method (don't invoke on parser);
+ */
+ public int getLineNumber()
+ {
+ return parser.getLineNumber();
+ }
- if (index < 0)
- {
- return null;
- }
- return getValue(index);
- }
+ /**
+ * <b>SAX Locator</b> method (don't invoke on parser);
+ */
+ public int getColumnNumber()
+ {
+ return parser.getColumnNumber();
+ }
+ // adapter between SAX2 content handler and SAX1 document handler callbacks
+ private static class Adapter
+ implements ContentHandler
+ {
+
+ private DocumentHandler docHandler;
- /**
- * <b>SAX1 AttributeList, SAX2 Attributes</b> method
- * (don't invoke on parser);
- */
- public String getValue (String xmlName)
+ Adapter(DocumentHandler dh)
{
- int index = getIndex(xmlName);
-
- if (index < 0)
- {
- return null;
- }
- return getValue(index);
+ docHandler = dh;
}
-
- //
- // Implementation of org.xml.sax.ext.Attributes2
- //
-
-
- /** @return false unless the attribute was declared in the DTD.
- * @throws java.lang.ArrayIndexOutOfBoundsException
- * When the supplied index does not identify an attribute.
- */
- public boolean isDeclared (int index)
+ public void setDocumentLocator(Locator l)
{
- if (index < 0 || index >= attributeCount)
- throw new ArrayIndexOutOfBoundsException ();
- String type = parser.getAttributeType(elementName, getQName(index));
- return (type != null);
+ docHandler.setDocumentLocator(l);
}
-
- /** @return false unless the attribute was declared in the DTD.
- * @throws java.lang.IllegalArgumentException
- * When the supplied names do not identify an attribute.
- */
- public boolean isDeclared (String qName)
+
+ public void startDocument()
+ throws SAXException
{
- int index = getIndex (qName);
- if (index < 0)
- throw new IllegalArgumentException ();
- String type = parser.getAttributeType(elementName, qName);
- return (type != null);
+ docHandler.startDocument();
}
-
- /** @return false unless the attribute was declared in the DTD.
- * @throws java.lang.IllegalArgumentException
- * When the supplied names do not identify an attribute.
- */
- public boolean isDeclared (String uri, String localName)
+
+ public void processingInstruction(String target, String data)
+ throws SAXException
{
- int index = getIndex (uri, localName);
- return isDeclared(index);
+ docHandler.processingInstruction(target, data);
}
-
-
- /**
- * <b>SAX-ext Attributes2</b> method (don't invoke on parser);
- */
- public boolean isSpecified (int index)
+
+ public void startPrefixMapping(String prefix, String uri)
{
- return ((Attribute) attributesList.get(index)).specified;
+ /* ignored */
}
- /**
- * <b>SAX-ext Attributes2</b> method (don't invoke on parser);
- */
- public boolean isSpecified (String uri, String local)
+ public void startElement(String namespace,
+ String local,
+ String name,
+ Attributes attrs)
+ throws SAXException
{
- int index = getIndex (uri, local);
- return isSpecified(index);
+ docHandler.startElement(name, (AttributeList) attrs);
}
- /**
- * <b>SAX-ext Attributes2</b> method (don't invoke on parser);
- */
- public boolean isSpecified (String xmlName)
+ public void characters(char[] buf, int offset, int len)
+ throws SAXException
{
- int index = getIndex (xmlName);
- return isSpecified(index);
+ docHandler.characters(buf, offset, len);
}
-
- //
- // Implementation of org.xml.sax.Locator.
- //
-
- /**
- * <b>SAX Locator</b> method (don't invoke on parser);
- */
- public String getPublicId ()
+ public void ignorableWhitespace(char[] buf, int offset, int len)
+ throws SAXException
{
- return null; // FIXME track public IDs too
+ docHandler.ignorableWhitespace(buf, offset, len);
}
- /**
- * <b>SAX Locator</b> method (don't invoke on parser);
- */
- public String getSystemId ()
+ public void skippedEntity(String name)
{
- if (entityStack.empty ())
- return null;
- else
- return (String) entityStack.peek ();
+ /* ignored */
}
- /**
- * <b>SAX Locator</b> method (don't invoke on parser);
- */
- public int getLineNumber ()
+ public void endElement(String u, String l, String name)
+ throws SAXException
{
- return parser.getLineNumber ();
+ docHandler.endElement(name);
}
- /**
- * <b>SAX Locator</b> method (don't invoke on parser);
- */
- public int getColumnNumber ()
+ public void endPrefixMapping(String prefix)
{
- return parser.getColumnNumber ();
+ /* ignored */
}
- // adapter between SAX2 content handler and SAX1 document handler callbacks
- private static class Adapter implements ContentHandler
+ public void endDocument()
+ throws SAXException
{
- private DocumentHandler docHandler;
-
- Adapter (DocumentHandler dh)
- { docHandler = dh; }
-
-
- public void setDocumentLocator (Locator l)
- { docHandler.setDocumentLocator (l); }
-
- public void startDocument () throws SAXException
- { docHandler.startDocument (); }
-
- public void processingInstruction (String target, String data)
- throws SAXException
- { docHandler.processingInstruction (target, data); }
-
- public void startPrefixMapping (String prefix, String uri)
- { /* ignored */ }
-
- public void startElement (
- String namespace,
- String local,
- String name,
- Attributes attrs
- ) throws SAXException
- { docHandler.startElement (name, (AttributeList) attrs); }
-
- public void characters (char buf [], int offset, int len)
- throws SAXException
- { docHandler.characters (buf, offset, len); }
-
- public void ignorableWhitespace (char buf [], int offset, int len)
- throws SAXException
- { docHandler.ignorableWhitespace (buf, offset, len); }
-
- public void skippedEntity (String name)
- { /* ignored */ }
-
- public void endElement (String u, String l, String name)
- throws SAXException
- { docHandler.endElement (name); }
-
- public void endPrefixMapping (String prefix)
- { /* ignored */ }
-
- public void endDocument () throws SAXException
- { docHandler.endDocument (); }
+ docHandler.endDocument();
}
-}
-
-class Attribute
-{
+ }
+ private static class Attribute
+ {
+
String name;
String value;
String nameSpace;
String localName;
boolean specified;
-
+
Attribute(String name, String value, boolean specified)
{
- this.name = name;
- this.value = value;
- this.nameSpace = "";
- this.specified = specified;
+ this.name = name;
+ this.value = value;
+ this.nameSpace = "";
+ this.specified = specified;
}
-}
+
+ }
+}
diff --git a/libjava/gnu/xml/aelfred2/XmlParser.java b/libjava/gnu/xml/aelfred2/XmlParser.java
index f4abf222993..e6f55e38c5b 100644
--- a/libjava/gnu/xml/aelfred2/XmlParser.java
+++ b/libjava/gnu/xml/aelfred2/XmlParser.java
@@ -53,6 +53,8 @@ Partly derived from code which carried the following notice:
package gnu.xml.aelfred2;
+import gnu.java.security.action.GetPropertyAction;
+
import java.io.BufferedInputStream;
import java.io.CharConversionException;
import java.io.EOFException;
@@ -63,12 +65,11 @@ import java.io.Reader;
import java.io.UnsupportedEncodingException;
import java.net.URL;
import java.net.URLConnection;
+import java.security.AccessController;
-// maintaining 1.1 compatibility for now ...
-// Iterator and Hashmap ought to be faster
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Stack;
+import java.util.Iterator;
+import java.util.HashMap;
+import java.util.LinkedList;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
@@ -86,1511 +87,1838 @@ import org.xml.sax.SAXException;
*/
final class XmlParser
{
- // avoid slow per-character readCh()
- private final static boolean USE_CHEATS = true;
-
-
- //////////////////////////////////////////////////////////////////////
- // Constructors.
- ////////////////////////////////////////////////////////////////////////
-
-
- /**
- * Construct a new parser with no associated handler.
- * @see #setHandler
- * @see #parse
- */
- // package private
- XmlParser ()
- {
- }
+ // avoid slow per-character readCh()
+ private final static boolean USE_CHEATS = true;
- /**
- * Set the handler that will receive parsing events.
- * @param handler The handler to receive callback events.
- * @see #parse
- */
- // package private
- void setHandler (SAXDriver handler)
- {
- this.handler = handler;
- }
-
-
- /**
- * Parse an XML document from the character stream, byte stream, or URI
- * that you provide (in that order of preference). Any URI that you
- * supply will become the base URI for resolving relative URI, and may
- * be used to acquire a reader or byte stream.
- *
- * <p> Only one thread at a time may use this parser; since it is
- * private to this package, post-parse cleanup is done by the caller,
- * which MUST NOT REUSE the parser (just null it).
- *
- * @param systemId Absolute URI of the document; should never be null,
- * but may be so iff a reader <em>or</em> a stream is provided.
- * @param publicId The public identifier of the document, or null.
- * @param reader A character stream; must be null if stream isn't.
- * @param stream A byte input stream; must be null if reader isn't.
- * @param encoding The suggested encoding, or null if unknown.
- * @exception java.lang.Exception Basically SAXException or IOException
- */
- // package private
- void doParse (
- String systemId,
- String publicId,
- Reader reader,
- InputStream stream,
- String encoding
- ) throws Exception
- {
- if (handler == null)
- throw new IllegalStateException ("no callback handler");
-
- initializeVariables ();
-
- // predeclare the built-in entities here (replacement texts)
- // we don't need to intern(), since we're guaranteed literals
- // are always (globally) interned.
- setInternalEntity ("amp", "&#38;");
- setInternalEntity ("lt", "&#60;");
- setInternalEntity ("gt", "&#62;");
- setInternalEntity ("apos", "&#39;");
- setInternalEntity ("quot", "&#34;");
-
- try {
- // pushURL first to ensure locator is correct in startDocument
- // ... it might report an IO or encoding exception.
- handler.startDocument ();
- pushURL (false, "[document]",
- // default baseURI: null
- new String [] { publicId, systemId, null},
- reader, stream, encoding, false);
-
- parseDocument ();
- } catch (EOFException e){
- //empty input
- error("empty document, with no root element.");
- }finally {
- if (reader != null)
- try { reader.close ();
- } catch (IOException e) { /* ignore */ }
- if (stream != null)
- try { stream.close ();
- } catch (IOException e) { /* ignore */ }
- if (is != null)
- try { is.close ();
- } catch (IOException e) { /* ignore */ }
- if (reader != null)
- try {
- reader.close ();
- } catch (IOException e) { /* ignore */
- }
- scratch = null;
- }
- }
-
-
- ////////////////////////////////////////////////////////////////////////
- // Constants.
- ////////////////////////////////////////////////////////////////////////
-
- //
- // Constants for element content type.
- //
-
- /**
- * Constant: an element has not been declared.
- * @see #getElementContentType
- */
- public final static int CONTENT_UNDECLARED = 0;
-
- /**
- * Constant: the element has a content model of ANY.
- * @see #getElementContentType
- */
- public final static int CONTENT_ANY = 1;
-
- /**
- * Constant: the element has declared content of EMPTY.
- * @see #getElementContentType
- */
- public final static int CONTENT_EMPTY = 2;
-
- /**
- * Constant: the element has mixed content.
- * @see #getElementContentType
- */
- public final static int CONTENT_MIXED = 3;
-
- /**
- * Constant: the element has element content.
- * @see #getElementContentType
- */
- public final static int CONTENT_ELEMENTS = 4;
-
-
- //
- // Constants for the entity type.
- //
-
- /**
- * Constant: the entity has not been declared.
- * @see #getEntityType
- */
- public final static int ENTITY_UNDECLARED = 0;
-
- /**
- * Constant: the entity is internal.
- * @see #getEntityType
- */
- public final static int ENTITY_INTERNAL = 1;
-
- /**
- * Constant: the entity is external, non-parsable data.
- * @see #getEntityType
- */
- public final static int ENTITY_NDATA = 2;
-
- /**
- * Constant: the entity is external XML data.
- * @see #getEntityType
- */
- public final static int ENTITY_TEXT = 3;
-
-
- //
- // Attribute type constants are interned literal strings.
- //
-
- //
- // Constants for supported encodings. "external" is just a flag.
- //
- private final static int ENCODING_EXTERNAL = 0;
- private final static int ENCODING_UTF_8 = 1;
- private final static int ENCODING_ISO_8859_1 = 2;
- private final static int ENCODING_UCS_2_12 = 3;
- private final static int ENCODING_UCS_2_21 = 4;
- private final static int ENCODING_UCS_4_1234 = 5;
- private final static int ENCODING_UCS_4_4321 = 6;
- private final static int ENCODING_UCS_4_2143 = 7;
- private final static int ENCODING_UCS_4_3412 = 8;
- private final static int ENCODING_ASCII = 9;
-
-
- //
- // Constants for attribute default value.
- //
-
- /**
- * Constant: the attribute is not declared.
- * @see #getAttributeDefaultValueType
- */
- public final static int ATTRIBUTE_DEFAULT_UNDECLARED = 30;
-
- /**
- * Constant: the attribute has a literal default value specified.
- * @see #getAttributeDefaultValueType
- * @see #getAttributeDefaultValue
- */
- public final static int ATTRIBUTE_DEFAULT_SPECIFIED = 31;
-
- /**
- * Constant: the attribute was declared #IMPLIED.
- * @see #getAttributeDefaultValueType
- */
- public final static int ATTRIBUTE_DEFAULT_IMPLIED = 32;
-
- /**
- * Constant: the attribute was declared #REQUIRED.
- * @see #getAttributeDefaultValueType
- */
- public final static int ATTRIBUTE_DEFAULT_REQUIRED = 33;
-
- /**
- * Constant: the attribute was declared #FIXED.
- * @see #getAttributeDefaultValueType
- * @see #getAttributeDefaultValue
- */
- public final static int ATTRIBUTE_DEFAULT_FIXED = 34;
-
-
- //
- // Constants for input.
- //
- private final static int INPUT_NONE = 0;
- private final static int INPUT_INTERNAL = 1;
- private final static int INPUT_STREAM = 3;
- private final static int INPUT_READER = 5;
-
-
- //
- // Flags for reading literals.
- //
- // expand general entity refs (attribute values in dtd and content)
- private final static int LIT_ENTITY_REF = 2;
- // normalize this value (space chars) (attributes, public ids)
- private final static int LIT_NORMALIZE = 4;
- // literal is an attribute value
- private final static int LIT_ATTRIBUTE = 8;
- // don't expand parameter entities
- private final static int LIT_DISABLE_PE = 16;
- // don't expand [or parse] character refs
- private final static int LIT_DISABLE_CREF = 32;
- // don't parse general entity refs
- private final static int LIT_DISABLE_EREF = 64;
- // literal is a public ID value
- private final static int LIT_PUBID = 256;
-
-
- //
- // Flags affecting PE handling in DTDs (if expandPE is true).
- // PEs expand with space padding, except inside literals.
- //
- private final static int CONTEXT_NORMAL = 0;
- private final static int CONTEXT_LITERAL = 1;
+ ////////////////////////////////////////////////////////////////////////
+ // Constants.
+ ////////////////////////////////////////////////////////////////////////
+
+ //
+ // Constants for element content type.
+ //
+
+ /**
+ * Constant: an element has not been declared.
+ * @see #getElementContentType
+ */
+ public final static int CONTENT_UNDECLARED = 0;
+
+ /**
+ * Constant: the element has a content model of ANY.
+ * @see #getElementContentType
+ */
+ public final static int CONTENT_ANY = 1;
+
+ /**
+ * Constant: the element has declared content of EMPTY.
+ * @see #getElementContentType
+ */
+ public final static int CONTENT_EMPTY = 2;
+
+ /**
+ * Constant: the element has mixed content.
+ * @see #getElementContentType
+ */
+ public final static int CONTENT_MIXED = 3;
+
+ /**
+ * Constant: the element has element content.
+ * @see #getElementContentType
+ */
+ public final static int CONTENT_ELEMENTS = 4;
+
+
+ //
+ // Constants for the entity type.
+ //
+
+ /**
+ * Constant: the entity has not been declared.
+ * @see #getEntityType
+ */
+ public final static int ENTITY_UNDECLARED = 0;
+
+ /**
+ * Constant: the entity is internal.
+ * @see #getEntityType
+ */
+ public final static int ENTITY_INTERNAL = 1;
+
+ /**
+ * Constant: the entity is external, non-parsable data.
+ * @see #getEntityType
+ */
+ public final static int ENTITY_NDATA = 2;
+
+ /**
+ * Constant: the entity is external XML data.
+ * @see #getEntityType
+ */
+ public final static int ENTITY_TEXT = 3;
+
+ //
+ // Attribute type constants are interned literal strings.
+ //
+
+ //
+ // Constants for supported encodings. "external" is just a flag.
+ //
+ private final static int ENCODING_EXTERNAL = 0;
+ private final static int ENCODING_UTF_8 = 1;
+ private final static int ENCODING_ISO_8859_1 = 2;
+ private final static int ENCODING_UCS_2_12 = 3;
+ private final static int ENCODING_UCS_2_21 = 4;
+ private final static int ENCODING_UCS_4_1234 = 5;
+ private final static int ENCODING_UCS_4_4321 = 6;
+ private final static int ENCODING_UCS_4_2143 = 7;
+ private final static int ENCODING_UCS_4_3412 = 8;
+ private final static int ENCODING_ASCII = 9;
+
+ //
+ // Constants for attribute default value.
+ //
+
+ /**
+ * Constant: the attribute is not declared.
+ * @see #getAttributeDefaultValueType
+ */
+ public final static int ATTRIBUTE_DEFAULT_UNDECLARED = 30;
+
+ /**
+ * Constant: the attribute has a literal default value specified.
+ * @see #getAttributeDefaultValueType
+ * @see #getAttributeDefaultValue
+ */
+ public final static int ATTRIBUTE_DEFAULT_SPECIFIED = 31;
+
+ /**
+ * Constant: the attribute was declared #IMPLIED.
+ * @see #getAttributeDefaultValueType
+ */
+ public final static int ATTRIBUTE_DEFAULT_IMPLIED = 32;
+
+ /**
+ * Constant: the attribute was declared #REQUIRED.
+ * @see #getAttributeDefaultValueType
+ */
+ public final static int ATTRIBUTE_DEFAULT_REQUIRED = 33;
+
+ /**
+ * Constant: the attribute was declared #FIXED.
+ * @see #getAttributeDefaultValueType
+ * @see #getAttributeDefaultValue
+ */
+ public final static int ATTRIBUTE_DEFAULT_FIXED = 34;
+
+ //
+ // Constants for input.
+ //
+ private final static int INPUT_NONE = 0;
+ private final static int INPUT_INTERNAL = 1;
+ private final static int INPUT_STREAM = 3;
+ private final static int INPUT_READER = 5;
+
+ //
+ // Flags for reading literals.
+ //
+ // expand general entity refs (attribute values in dtd and content)
+ private final static int LIT_ENTITY_REF = 2;
+ // normalize this value (space chars) (attributes, public ids)
+ private final static int LIT_NORMALIZE = 4;
+ // literal is an attribute value
+ private final static int LIT_ATTRIBUTE = 8;
+ // don't expand parameter entities
+ private final static int LIT_DISABLE_PE = 16;
+ // don't expand [or parse] character refs
+ private final static int LIT_DISABLE_CREF = 32;
+ // don't parse general entity refs
+ private final static int LIT_DISABLE_EREF = 64;
+ // literal is a public ID value
+ private final static int LIT_PUBID = 256;
+
+ //
+ // Flags affecting PE handling in DTDs (if expandPE is true).
+ // PEs expand with space padding, except inside literals.
+ //
+ private final static int CONTEXT_NORMAL = 0;
+ private final static int CONTEXT_LITERAL = 1;
+
+ // Emit warnings for relative URIs with no base URI.
+ static boolean uriWarnings;
+ static
+ {
+ String key = "gnu.xml.aelfred2.XmlParser.uriWarnings";
+ GetPropertyAction a = new GetPropertyAction(key);
+ uriWarnings = "true".equals(AccessController.doPrivileged(a));
+ }
+
+ //
+ // The current XML handler interface.
+ //
+ private SAXDriver handler;
+
+ //
+ // I/O information.
+ //
+ private Reader reader; // current reader
+ private InputStream is; // current input stream
+ private int line; // current line number
+ private int column; // current column number
+ private int sourceType; // type of input source
+ private LinkedList inputStack; // stack of input soruces
+ private URLConnection externalEntity; // current external entity
+ private int encoding; // current character encoding
+ private int currentByteCount; // bytes read from current source
+ private InputSource scratch; // temporary
+
+ //
+ // Buffers for decoded but unparsed character input.
+ //
+ private char[] readBuffer;
+ private int readBufferPos;
+ private int readBufferLength;
+ private int readBufferOverflow; // overflow from last data chunk.
+
+ //
+ // Buffer for undecoded raw byte input.
+ //
+ private final static int READ_BUFFER_MAX = 16384;
+ private byte[] rawReadBuffer;
+
+
+ //
+ // Buffer for attribute values, char refs, DTD stuff.
+ //
+ private static int DATA_BUFFER_INITIAL = 4096;
+ private char[] dataBuffer;
+ private int dataBufferPos;
+
+ //
+ // Buffer for parsed names.
+ //
+ private static int NAME_BUFFER_INITIAL = 1024;
+ private char[] nameBuffer;
+ private int nameBufferPos;
+
+ //
+ // Save any standalone flag
+ //
+ private boolean docIsStandalone;
+
+ //
+ // Hashtables for DTD information on elements, entities, and notations.
+ // Populated until we start ignoring decls (because of skipping a PE)
+ //
+ private HashMap elementInfo;
+ private HashMap entityInfo;
+ private HashMap notationInfo;
+ private boolean skippedPE;
+
+ //
+ // Element type currently in force.
+ //
+ private String currentElement;
+ private int currentElementContent;
+
+ //
+ // Stack of entity names, to detect recursion.
+ //
+ private LinkedList entityStack;
+
+ //
+ // PE expansion is enabled in most chunks of the DTD, not all.
+ // When it's enabled, literals are treated differently.
+ //
+ private boolean inLiteral;
+ private boolean expandPE;
+ private boolean peIsError;
+
+ //
+ // can't report entity expansion inside two constructs:
+ // - attribute expansions (internal entities only)
+ // - markup declarations (parameter entities only)
+ //
+ private boolean doReport;
+
+ //
+ // Symbol table, for caching interned names.
+ //
+ // These show up wherever XML names or nmtokens are used: naming elements,
+ // attributes, PIs, notations, entities, and enumerated attribute values.
+ //
+ // NOTE: This hashtable doesn't grow. The default size is intended to be
+ // rather large for most documents. Example: one snapshot of the DocBook
+ // XML 4.1 DTD used only about 350 such names. As a rule, only pathological
+ // documents (ones that don't reuse names) should ever see much collision.
+ //
+ // Be sure that SYMBOL_TABLE_LENGTH always stays prime, for best hashing.
+ // "2039" keeps the hash table size at about two memory pages on typical
+ // 32 bit hardware.
+ //
+ private final static int SYMBOL_TABLE_LENGTH = 2039;
+
+ private Object[][] symbolTable;
+
+ //
+ // Hash table of attributes found in current start tag.
+ //
+ private String[] tagAttributes;
+ private int tagAttributePos;
+
+ //
+ // Utility flag: have we noticed a CR while reading the last
+ // data chunk? If so, we will have to go back and normalise
+ // CR or CR/LF line ends.
+ //
+ private boolean sawCR;
+
+ //
+ // Utility flag: are we in CDATA? If so, whitespace isn't ignorable.
+ //
+ private boolean inCDATA;
+
+ //
+ // Xml version.
+ //
+ private static final int XML_10 = 0;
+ private static final int XML_11 = 1;
+ private int xmlVersion = XML_10;
+
+ //////////////////////////////////////////////////////////////////////
+ // Constructors.
+ ////////////////////////////////////////////////////////////////////////
+
+ /**
+ * Construct a new parser with no associated handler.
+ * @see #setHandler
+ * @see #parse
+ */
+ // package private
+ XmlParser()
+ {
+ }
+ /**
+ * Set the handler that will receive parsing events.
+ * @param handler The handler to receive callback events.
+ * @see #parse
+ */
+ // package private
+ void setHandler(SAXDriver handler)
+ {
+ this.handler = handler;
+ }
- //////////////////////////////////////////////////////////////////////
- // Error reporting.
- //////////////////////////////////////////////////////////////////////
+ /**
+ * Parse an XML document from the character stream, byte stream, or URI
+ * that you provide (in that order of preference). Any URI that you
+ * supply will become the base URI for resolving relative URI, and may
+ * be used to acquire a reader or byte stream.
+ *
+ * <p> Only one thread at a time may use this parser; since it is
+ * private to this package, post-parse cleanup is done by the caller,
+ * which MUST NOT REUSE the parser (just null it).
+ *
+ * @param systemId Absolute URI of the document; should never be null,
+ * but may be so iff a reader <em>or</em> a stream is provided.
+ * @param publicId The public identifier of the document, or null.
+ * @param reader A character stream; must be null if stream isn't.
+ * @param stream A byte input stream; must be null if reader isn't.
+ * @param encoding The suggested encoding, or null if unknown.
+ * @exception java.lang.Exception Basically SAXException or IOException
+ */
+ // package private
+ void doParse(String systemId, String publicId, Reader reader,
+ InputStream stream, String encoding)
+ throws Exception
+ {
+ if (handler == null)
+ {
+ throw new IllegalStateException("no callback handler");
+ }
+ initializeVariables();
+
+ // predeclare the built-in entities here (replacement texts)
+ // we don't need to intern(), since we're guaranteed literals
+ // are always (globally) interned.
+ setInternalEntity("amp", "&#38;");
+ setInternalEntity("lt", "&#60;");
+ setInternalEntity("gt", "&#62;");
+ setInternalEntity("apos", "&#39;");
+ setInternalEntity("quot", "&#34;");
+
+ try
+ {
+ // pushURL first to ensure locator is correct in startDocument
+ // ... it might report an IO or encoding exception.
+ handler.startDocument();
+ pushURL(false, "[document]",
+ // default baseURI: null
+ new ExternalIdentifiers(publicId, systemId, null),
+ reader, stream, encoding, false);
+
+ parseDocument();
+ }
+ catch (EOFException e)
+ {
+ //empty input
+ error("empty document, with no root element.");
+ }
+ finally
+ {
+ if (reader != null)
+ {
+ try
+ {
+ reader.close();
+ }
+ catch (IOException e)
+ {
+ /* ignore */
+ }
+ }
+ if (stream != null)
+ {
+ try
+ {
+ stream.close();
+ }
+ catch (IOException e)
+ {
+ /* ignore */
+ }
+ }
+ if (is != null)
+ {
+ try
+ {
+ is.close();
+ }
+ catch (IOException e)
+ {
+ /* ignore */
+ }
+ }
+ scratch = null;
+ }
+ }
- /**
- * Report an error.
- * @param message The error message.
- * @param textFound The text that caused the error (or null).
- * @see SAXDriver#error
- * @see #line
- */
- private void error (String message, String textFound, String textExpected)
+ //////////////////////////////////////////////////////////////////////
+ // Error reporting.
+ //////////////////////////////////////////////////////////////////////
+
+ /**
+ * Report an error.
+ * @param message The error message.
+ * @param textFound The text that caused the error (or null).
+ * @see SAXDriver#error
+ * @see #line
+ */
+ private void error(String message, String textFound, String textExpected)
throws SAXException
- {
- if (textFound != null) {
- message = message + " (found \"" + textFound + "\")";
- }
- if (textExpected != null) {
- message = message + " (expected \"" + textExpected + "\")";
- }
- handler.fatal (message);
-
- // "can't happen"
- throw new SAXException (message);
- }
-
+ {
+ if (textFound != null)
+ {
+ message = message + " (found \"" + textFound + "\")";
+ }
+ if (textExpected != null)
+ {
+ message = message + " (expected \"" + textExpected + "\")";
+ }
+ handler.fatal(message);
+
+ // "can't happen"
+ throw new SAXException(message);
+ }
- /**
- * Report a serious error.
- * @param message The error message.
- * @param textFound The text that caused the error (or null).
- */
- private void error (String message, char textFound, String textExpected)
+ /**
+ * Report a serious error.
+ * @param message The error message.
+ * @param textFound The text that caused the error (or null).
+ */
+ private void error(String message, char textFound, String textExpected)
throws SAXException
- {
- error (message, new Character (textFound).toString (), textExpected);
- }
+ {
+ error(message, new Character(textFound).toString(), textExpected);
+ }
- /** Report typical case fatal errors. */
- private void error (String message)
+ /**
+ * Report typical case fatal errors.
+ */
+ private void error(String message)
throws SAXException
- {
- handler.fatal (message);
- }
-
-
- //////////////////////////////////////////////////////////////////////
- // Major syntactic productions.
- //////////////////////////////////////////////////////////////////////
+ {
+ handler.fatal(message);
+ }
+ //////////////////////////////////////////////////////////////////////
+ // Major syntactic productions.
+ //////////////////////////////////////////////////////////////////////
- /**
- * Parse an XML document.
- * <pre>
- * [1] document ::= prolog element Misc*
- * </pre>
- * <p>This is the top-level parsing function for a single XML
- * document. As a minimum, a well-formed document must have
- * a document element, and a valid document must have a prolog
- * (one with doctype) as well.
- */
- private void parseDocument ()
+ /**
+ * Parse an XML document.
+ * <pre>
+ * [1] document ::= prolog element Misc*
+ * </pre>
+ * <p>This is the top-level parsing function for a single XML
+ * document. As a minimum, a well-formed document must have
+ * a document element, and a valid document must have a prolog
+ * (one with doctype) as well.
+ */
+ private void parseDocument()
throws Exception
- {
- try { // added by MHK
- boolean sawDTD = parseProlog ();
- require ('<');
- parseElement (!sawDTD);
- } catch (EOFException ee) { // added by MHK
- error("premature end of file", "[EOF]", null);
- }
-
- try {
- parseMisc (); //skip all white, PIs, and comments
- char c = readCh (); //if this doesn't throw an exception...
- error ("unexpected characters after document end", c, null);
- } catch (EOFException e) {
- return;
- }
- }
-
- static final char startDelimComment [] = { '<', '!', '-', '-' };
- static final char endDelimComment [] = { '-', '-' };
+ {
+ try
+ { // added by MHK
+ boolean sawDTD = parseProlog();
+ require('<');
+ parseElement(!sawDTD);
+ }
+ catch (EOFException ee)
+ { // added by MHK
+ error("premature end of file", "[EOF]", null);
+ }
+
+ try
+ {
+ parseMisc(); //skip all white, PIs, and comments
+ char c = readCh(); //if this doesn't throw an exception...
+ error("unexpected characters after document end", c, null);
+ }
+ catch (EOFException e)
+ {
+ return;
+ }
+ }
+
+ static final char[] startDelimComment = { '<', '!', '-', '-' };
+ static final char[] endDelimComment = { '-', '-' };
- /**
- * Skip a comment.
- * <pre>
- * [15] Comment ::= '&lt;!--' ((Char - '-') | ('-' (Char - '-')))* "-->"
- * </pre>
- * <p> (The <code>&lt;!--</code> has already been read.)
- */
- private void parseComment ()
+ /**
+ * Skip a comment.
+ * <pre>
+ * [15] Comment ::= '&lt;!--' ((Char - '-') | ('-' (Char - '-')))* "-->"
+ * </pre>
+ * <p> (The <code>&lt;!--</code> has already been read.)
+ */
+ private void parseComment()
throws Exception
- {
- char c;
- boolean saved = expandPE;
-
- expandPE = false;
- parseUntil (endDelimComment);
- require ('>');
- expandPE = saved;
- handler.comment (dataBuffer, 0, dataBufferPos);
- dataBufferPos = 0;
- }
+ {
+ char c;
+ boolean saved = expandPE;
+
+ expandPE = false;
+ parseUntil(endDelimComment);
+ require('>');
+ expandPE = saved;
+ handler.comment(dataBuffer, 0, dataBufferPos);
+ dataBufferPos = 0;
+ }
+
+ static final char[] startDelimPI = { '<', '?' };
+ static final char[] endDelimPI = { '?', '>' };
- static final char startDelimPI [] = { '<', '?' };
- static final char endDelimPI [] = { '?', '>' };
-
- /**
- * Parse a processing instruction and do a call-back.
- * <pre>
- * [16] PI ::= '&lt;?' PITarget
- * (S (Char* - (Char* '?&gt;' Char*)))?
- * '?&gt;'
- * [17] PITarget ::= Name - ( ('X'|'x') ('M'|m') ('L'|l') )
- * </pre>
- * <p> (The <code>&lt;?</code> has already been read.)
- */
- private void parsePI ()
+ /**
+ * Parse a processing instruction and do a call-back.
+ * <pre>
+ * [16] PI ::= '&lt;?' PITarget
+ * (S (Char* - (Char* '?&gt;' Char*)))?
+ * '?&gt;'
+ * [17] PITarget ::= Name - ( ('X'|'x') ('M'|m') ('L'|l') )
+ * </pre>
+ * <p> (The <code>&lt;?</code> has already been read.)
+ */
+ private void parsePI()
throws SAXException, IOException
- {
- String name;
- boolean saved = expandPE;
-
- expandPE = false;
- name = readNmtoken (true);
- //NE08
- if (name.indexOf(':') >= 0)
- error ("Illegal character(':') in processing instruction name ", name, null);
- if ("xml".equalsIgnoreCase (name))
- error ("Illegal processing instruction target", name, null);
- if (!tryRead (endDelimPI)) {
- requireWhitespace ();
- parseUntil (endDelimPI);
- }
- expandPE = saved;
- handler.processingInstruction (name, dataBufferToString ());
- }
-
-
- static final char endDelimCDATA [] = { ']', ']', '>' };
+ {
+ String name;
+ boolean saved = expandPE;
+
+ expandPE = false;
+ name = readNmtoken(true);
+ //NE08
+ if (name.indexOf(':') >= 0)
+ {
+ error("Illegal character(':') in processing instruction name ",
+ name, null);
+ }
+ if ("xml".equalsIgnoreCase(name))
+ {
+ error("Illegal processing instruction target", name, null);
+ }
+ if (!tryRead(endDelimPI))
+ {
+ requireWhitespace();
+ parseUntil(endDelimPI);
+ }
+ expandPE = saved;
+ handler.processingInstruction(name, dataBufferToString());
+ }
+
+ static final char[] endDelimCDATA = { ']', ']', '>' };
- private boolean isDirtyCurrentElement;
+ private boolean isDirtyCurrentElement;
- /**
- * Parse a CDATA section.
- * <pre>
- * [18] CDSect ::= CDStart CData CDEnd
- * [19] CDStart ::= '&lt;![CDATA['
- * [20] CData ::= (Char* - (Char* ']]&gt;' Char*))
- * [21] CDEnd ::= ']]&gt;'
- * </pre>
- * <p> (The '&lt;![CDATA[' has already been read.)
- */
- private void parseCDSect ()
+ /**
+ * Parse a CDATA section.
+ * <pre>
+ * [18] CDSect ::= CDStart CData CDEnd
+ * [19] CDStart ::= '&lt;![CDATA['
+ * [20] CData ::= (Char* - (Char* ']]&gt;' Char*))
+ * [21] CDEnd ::= ']]&gt;'
+ * </pre>
+ * <p> (The '&lt;![CDATA[' has already been read.)
+ */
+ private void parseCDSect()
throws Exception
- {
- parseUntil (endDelimCDATA);
- dataBufferFlush ();
- }
-
+ {
+ parseUntil(endDelimCDATA);
+ dataBufferFlush();
+ }
- /**
- * Parse the prolog of an XML document.
- * <pre>
- * [22] prolog ::= XMLDecl? Misc* (Doctypedecl Misc*)?
- * </pre>
- * <p>We do not look for the XML declaration here, because it was
- * handled by pushURL ().
- * @see pushURL
- * @return true if a DTD was read.
- */
- private boolean parseProlog ()
+ /**
+ * Parse the prolog of an XML document.
+ * <pre>
+ * [22] prolog ::= XMLDecl? Misc* (Doctypedecl Misc*)?
+ * </pre>
+ * <p>We do not look for the XML declaration here, because it was
+ * handled by pushURL ().
+ * @see pushURL
+ * @return true if a DTD was read.
+ */
+ private boolean parseProlog()
throws Exception
- {
- parseMisc ();
-
- if (tryRead ("<!DOCTYPE")) {
- parseDoctypedecl ();
- parseMisc ();
- return true;
- }
- return false;
- }
+ {
+ parseMisc();
- private void checkLegalVersion (String version)
- throws SAXException
- {
- int len = version.length ();
- for (int i = 0; i < len; i++) {
- char c = version.charAt (i);
- if ('0' <= c && c <= '9')
- continue;
- if (c == '_' || c == '.' || c == ':' || c == '-')
- continue;
- if ('a' <= c && c <= 'z')
- continue;
- if ('A' <= c && c <= 'Z')
- continue;
- error ("illegal character in version", version, "1.0");
- }
- }
+ if (tryRead("<!DOCTYPE"))
+ {
+ parseDoctypedecl();
+ parseMisc();
+ return true;
+ }
+ return false;
+ }
+ private void checkLegalVersion(String version)
+ throws SAXException
+ {
+ int len = version.length();
+ for (int i = 0; i < len; i++)
+ {
+ char c = version.charAt(i);
+ if ('0' <= c && c <= '9')
+ {
+ continue;
+ }
+ if (c == '_' || c == '.' || c == ':' || c == '-')
+ {
+ continue;
+ }
+ if ('a' <= c && c <= 'z')
+ {
+ continue;
+ }
+ if ('A' <= c && c <= 'Z')
+ {
+ continue;
+ }
+ error ("illegal character in version", version, "1.0");
+ }
+ }
- /**
- * Parse the XML declaration.
- * <pre>
- * [23] XMLDecl ::= '&lt;?xml' VersionInfo EncodingDecl? SDDecl? S? '?&gt;'
- * [24] VersionInfo ::= S 'version' Eq
- * ("'" VersionNum "'" | '"' VersionNum '"' )
- * [26] VersionNum ::= ([a-zA-Z0-9_.:] | '-')*
- * [32] SDDecl ::= S 'standalone' Eq
- * ( "'"" ('yes' | 'no') "'"" | '"' ("yes" | "no") '"' )
- * [80] EncodingDecl ::= S 'encoding' Eq
- * ( "'" EncName "'" | "'" EncName "'" )
- * [81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')*
- * </pre>
- * <p> (The <code>&lt;?xml</code> and whitespace have already been read.)
- * @return the encoding in the declaration, uppercased; or null
- * @see #parseTextDecl
- * @see #setupDecoding
- */
- private String parseXMLDecl (boolean ignoreEncoding)
+ /**
+ * Parse the XML declaration.
+ * <pre>
+ * [23] XMLDecl ::= '&lt;?xml' VersionInfo EncodingDecl? SDDecl? S? '?&gt;'
+ * [24] VersionInfo ::= S 'version' Eq
+ * ("'" VersionNum "'" | '"' VersionNum '"' )
+ * [26] VersionNum ::= ([a-zA-Z0-9_.:] | '-')*
+ * [32] SDDecl ::= S 'standalone' Eq
+ * ( "'"" ('yes' | 'no') "'"" | '"' ("yes" | "no") '"' )
+ * [80] EncodingDecl ::= S 'encoding' Eq
+ * ( "'" EncName "'" | "'" EncName "'" )
+ * [81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')*
+ * </pre>
+ * <p> (The <code>&lt;?xml</code> and whitespace have already been read.)
+ * @return the encoding in the declaration, uppercased; or null
+ * @see #parseTextDecl
+ * @see #setupDecoding
+ */
+ private String parseXMLDecl(boolean ignoreEncoding)
throws SAXException, IOException
- {
- String version;
- String encodingName = null;
- String standalone = null;
- int flags = LIT_DISABLE_CREF | LIT_DISABLE_PE | LIT_DISABLE_EREF;
- String inputEncoding = null;
+ {
+ String version;
+ String encodingName = null;
+ String standalone = null;
+ int flags = LIT_DISABLE_CREF | LIT_DISABLE_PE | LIT_DISABLE_EREF;
+ String inputEncoding = null;
- switch (this.encoding)
+ switch (this.encoding)
+ {
+ case ENCODING_EXTERNAL:
+ case ENCODING_UTF_8:
+ inputEncoding = "UTF-8";
+ break;
+ case ENCODING_ISO_8859_1:
+ inputEncoding = "ISO-8859-1";
+ break;
+ case ENCODING_UCS_2_12:
+ inputEncoding = "UTF-16BE";
+ break;
+ case ENCODING_UCS_2_21:
+ inputEncoding = "UTF-16LE";
+ break;
+ }
+
+ // Read the version.
+ require("version");
+ parseEq();
+ checkLegalVersion(version = readLiteral(flags));
+ if (!version.equals("1.0"))
+ {
+ if (version.equals("1.1"))
{
- case ENCODING_EXTERNAL:
- case ENCODING_UTF_8:
- inputEncoding = "UTF-8";
- break;
- case ENCODING_ISO_8859_1:
- inputEncoding = "ISO-8859-1";
- break;
- case ENCODING_UCS_2_12:
- inputEncoding = "UTF-16BE";
- break;
- case ENCODING_UCS_2_21:
- inputEncoding = "UTF-16LE";
- break;
+ handler.warn("expected XML version 1.0, not: " + version);
+ xmlVersion = XML_11;
+ }
+ else
+ {
+ error("illegal XML version", version, "1.0 or 1.1");
}
+ }
+ else
+ {
+ xmlVersion = XML_10;
+ }
+ // Try reading an encoding declaration.
+ boolean white = tryWhitespace();
+
+ if (tryRead("encoding"))
+ {
+ if (!white)
+ {
+ error("whitespace required before 'encoding='");
+ }
+ parseEq();
+ encodingName = readLiteral(flags);
+ if (!ignoreEncoding)
+ {
+ setupDecoding(encodingName);
+ }
+ }
+
+ // Try reading a standalone declaration
+ if (encodingName != null)
+ {
+ white = tryWhitespace();
+ }
+ if (tryRead("standalone"))
+ {
+ if (!white)
+ {
+ error("whitespace required before 'standalone='");
+ }
+ parseEq();
+ standalone = readLiteral(flags);
+ if ("yes".equals(standalone))
+ {
+ docIsStandalone = true;
+ }
+ else if (!"no".equals(standalone))
+ {
+ error("standalone flag must be 'yes' or 'no'");
+ }
+ }
- // Read the version.
- require ("version");
- parseEq ();
- checkLegalVersion (version = readLiteral (flags));
- if (!version.equals ("1.0")){
- if(version.equals ("1.1")){
- handler.warn ("expected XML version 1.0, not: " + version);
- xmlVersion = XML_11;
- }else {
- error("illegal XML version", version, "1.0 or 1.1");
- }
- }
- else
- xmlVersion = XML_10;
- // Try reading an encoding declaration.
- boolean white = tryWhitespace ();
-
- if (tryRead ("encoding")) {
- if (!white)
- error ("whitespace required before 'encoding='");
- parseEq ();
- encodingName = readLiteral (flags);
- if (!ignoreEncoding)
- setupDecoding (encodingName);
- }
-
- // Try reading a standalone declaration
- if (encodingName != null)
- white = tryWhitespace ();
- if (tryRead ("standalone")) {
- if (!white)
- error ("whitespace required before 'standalone='");
- parseEq ();
- standalone = readLiteral (flags);
- if ("yes".equals (standalone))
- docIsStandalone = true;
- else if (!"no".equals (standalone))
- error ("standalone flag must be 'yes' or 'no'");
- }
-
- skipWhitespace ();
- require ("?>");
-
- if (inputEncoding == null)
- {
- inputEncoding = encodingName;
- }
- handler.xmlDecl(version, encodingName, "yes".equals(standalone),
- inputEncoding);
-
- return encodingName;
- }
+ skipWhitespace();
+ require("?>");
+ if (inputEncoding == null)
+ {
+ inputEncoding = encodingName;
+ }
+ handler.xmlDecl(version, encodingName, docIsStandalone,
+ inputEncoding);
+
+ return encodingName;
+ }
- /**
- * Parse a text declaration.
- * <pre>
- * [79] TextDecl ::= '&lt;?xml' VersionInfo? EncodingDecl S? '?&gt;'
- * [80] EncodingDecl ::= S 'encoding' Eq
- * ( '"' EncName '"' | "'" EncName "'" )
- * [81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')*
- * </pre>
- * <p> (The <code>&lt;?xml</code>' and whitespace have already been read.)
- * @return the encoding in the declaration, uppercased; or null
- * @see #parseXMLDecl
- * @see #setupDecoding
- */
- private String parseTextDecl (boolean ignoreEncoding)
+ /**
+ * Parse a text declaration.
+ * <pre>
+ * [79] TextDecl ::= '&lt;?xml' VersionInfo? EncodingDecl S? '?&gt;'
+ * [80] EncodingDecl ::= S 'encoding' Eq
+ * ( '"' EncName '"' | "'" EncName "'" )
+ * [81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')*
+ * </pre>
+ * <p> (The <code>&lt;?xml</code>' and whitespace have already been read.)
+ * @return the encoding in the declaration, uppercased; or null
+ * @see #parseXMLDecl
+ * @see #setupDecoding
+ */
+ private String parseTextDecl(boolean ignoreEncoding)
throws SAXException, IOException
- {
- String encodingName = null;
- int flags = LIT_DISABLE_CREF | LIT_DISABLE_PE | LIT_DISABLE_EREF;
-
- // Read an optional version.
- if (tryRead ("version")) {
- String version;
- parseEq ();
- checkLegalVersion (version = readLiteral (flags));
-
- if (version.equals ("1.1")){
- if (xmlVersion == XML_10){
- error ("external subset has later version number.", "1.0", version);
- }
- handler.warn ("expected XML version 1.0, not: " + version);
- xmlVersion = XML_11;
- }else if(!version.equals ("1.0")) {
- error("illegal XML version", version, "1.0 or 1.1");
- }
- requireWhitespace ();
- }
-
-
- // Read the encoding.
- require ("encoding");
- parseEq ();
- encodingName = readLiteral (flags);
- if (!ignoreEncoding)
- setupDecoding (encodingName);
-
- skipWhitespace ();
- require ("?>");
-
- return encodingName;
- }
-
+ {
+ String encodingName = null;
+ int flags = LIT_DISABLE_CREF | LIT_DISABLE_PE | LIT_DISABLE_EREF;
+
+ // Read an optional version.
+ if (tryRead ("version"))
+ {
+ String version;
+ parseEq();
+ checkLegalVersion(version = readLiteral(flags));
+
+ if (version.equals("1.1"))
+ {
+ if (xmlVersion == XML_10)
+ {
+ error("external subset has later version number.", "1.0",
+ version);
+ }
+ handler.warn("expected XML version 1.0, not: " + version);
+ xmlVersion = XML_11;
+ }
+ else if (!version.equals("1.0"))
+ {
+ error("illegal XML version", version, "1.0 or 1.1");
+ }
+ requireWhitespace();
+ }
+
+ // Read the encoding.
+ require("encoding");
+ parseEq();
+ encodingName = readLiteral(flags);
+ if (!ignoreEncoding)
+ {
+ setupDecoding(encodingName);
+ }
+ skipWhitespace();
+ require("?>");
+
+ return encodingName;
+ }
- /**
- * Sets up internal state so that we can decode an entity using the
- * specified encoding. This is used when we start to read an entity
- * and we have been given knowledge of its encoding before we start to
- * read any data (e.g. from a SAX input source or from a MIME type).
- *
- * <p> It is also used after autodetection, at which point only very
- * limited adjustments to the encoding may be used (switching between
- * related builtin decoders).
- *
- * @param encodingName The name of the encoding specified by the user.
- * @exception IOException if the encoding isn't supported either
- * internally to this parser, or by the hosting JVM.
- * @see #parseXMLDecl
- * @see #parseTextDecl
+ /**
+ * Sets up internal state so that we can decode an entity using the
+ * specified encoding. This is used when we start to read an entity
+ * and we have been given knowledge of its encoding before we start to
+ * read any data (e.g. from a SAX input source or from a MIME type).
+ *
+ * <p> It is also used after autodetection, at which point only very
+ * limited adjustments to the encoding may be used (switching between
+ * related builtin decoders).
+ *
+ * @param encodingName The name of the encoding specified by the user.
+ * @exception IOException if the encoding isn't supported either
+ * internally to this parser, or by the hosting JVM.
+ * @see #parseXMLDecl
+ * @see #parseTextDecl
*/
- private void setupDecoding (String encodingName)
+ private void setupDecoding(String encodingName)
throws SAXException, IOException
- {
- encodingName = encodingName.toUpperCase ();
-
- // ENCODING_EXTERNAL indicates an encoding that wasn't
- // autodetected ... we can use builtin decoders, or
- // ones from the JVM (InputStreamReader).
-
- // Otherwise we can only tweak what was autodetected, and
- // only for single byte (ASCII derived) builtin encodings.
-
- // ASCII-derived encodings
- if (encoding == ENCODING_UTF_8 || encoding == ENCODING_EXTERNAL) {
- if (encodingName.equals ("ISO-8859-1")
- || encodingName.equals ("8859_1")
- || encodingName.equals ("ISO8859_1")
- ) {
- encoding = ENCODING_ISO_8859_1;
- return;
- } else if (encodingName.equals ("US-ASCII")
- || encodingName.equals ("ASCII")) {
- encoding = ENCODING_ASCII;
- return;
- } else if (encodingName.equals ("UTF-8")
- || encodingName.equals ("UTF8")) {
- encoding = ENCODING_UTF_8;
- return;
- } else if (encoding != ENCODING_EXTERNAL) {
- // used to start with a new reader ...
- throw new UnsupportedEncodingException (encodingName);
- }
- // else fallthrough ...
- // it's ASCII-ish and something other than a builtin
- }
-
- // Unicode and such
- if (encoding == ENCODING_UCS_2_12 || encoding == ENCODING_UCS_2_21) {
- if (!(encodingName.equals ("ISO-10646-UCS-2")
- || encodingName.equals ("UTF-16")
- || encodingName.equals ("UTF-16BE")
- || encodingName.equals ("UTF-16LE")))
- error ("unsupported Unicode encoding",
- encodingName,
- "UTF-16");
- return;
- }
-
- // four byte encodings
- if (encoding == ENCODING_UCS_4_1234
- || encoding == ENCODING_UCS_4_4321
- || encoding == ENCODING_UCS_4_2143
- || encoding == ENCODING_UCS_4_3412) {
- // Strictly: "UCS-4" == "UTF-32BE"; also, "UTF-32LE" exists
- if (!encodingName.equals ("ISO-10646-UCS-4"))
- error ("unsupported 32-bit encoding",
- encodingName,
- "ISO-10646-UCS-4");
- return;
- }
-
- // assert encoding == ENCODING_EXTERNAL
- // if (encoding != ENCODING_EXTERNAL)
- // throw new RuntimeException ("encoding = " + encoding);
-
- if (encodingName.equals ("UTF-16BE")) {
- encoding = ENCODING_UCS_2_12;
- return;
- }
- if (encodingName.equals ("UTF-16LE")) {
- encoding = ENCODING_UCS_2_21;
- return;
- }
-
- // We couldn't use the builtin decoders at all. But we can try to
- // create a reader, since we haven't messed up buffering. Tweak
- // the encoding name if necessary.
-
- if (encodingName.equals ("UTF-16")
- || encodingName.equals ("ISO-10646-UCS-2"))
- encodingName = "Unicode";
- // Ignoring all the EBCDIC aliases here
-
- reader = new InputStreamReader (is, encodingName);
- sourceType = INPUT_READER;
- }
-
-
- /**
- * Parse miscellaneous markup outside the document element and DOCTYPE
- * declaration.
- * <pre>
- * [27] Misc ::= Comment | PI | S
- * </pre>
- */
- private void parseMisc ()
+ {
+ encodingName = encodingName.toUpperCase();
+
+ // ENCODING_EXTERNAL indicates an encoding that wasn't
+ // autodetected ... we can use builtin decoders, or
+ // ones from the JVM (InputStreamReader).
+
+ // Otherwise we can only tweak what was autodetected, and
+ // only for single byte (ASCII derived) builtin encodings.
+
+ // ASCII-derived encodings
+ if (encoding == ENCODING_UTF_8 || encoding == ENCODING_EXTERNAL)
+ {
+ if (encodingName.equals("ISO-8859-1")
+ || encodingName.equals("8859_1")
+ || encodingName.equals("ISO8859_1"))
+ {
+ encoding = ENCODING_ISO_8859_1;
+ return;
+ }
+ else if (encodingName.equals("US-ASCII")
+ || encodingName.equals("ASCII"))
+ {
+ encoding = ENCODING_ASCII;
+ return;
+ }
+ else if (encodingName.equals("UTF-8")
+ || encodingName.equals("UTF8"))
+ {
+ encoding = ENCODING_UTF_8;
+ return;
+ }
+ else if (encoding != ENCODING_EXTERNAL)
+ {
+ // used to start with a new reader ...
+ throw new UnsupportedEncodingException(encodingName);
+ }
+ // else fallthrough ...
+ // it's ASCII-ish and something other than a builtin
+ }
+
+ // Unicode and such
+ if (encoding == ENCODING_UCS_2_12 || encoding == ENCODING_UCS_2_21)
+ {
+ if (!(encodingName.equals("ISO-10646-UCS-2")
+ || encodingName.equals("UTF-16")
+ || encodingName.equals("UTF-16BE")
+ || encodingName.equals("UTF-16LE")))
+ {
+ error("unsupported Unicode encoding", encodingName, "UTF-16");
+ }
+ return;
+ }
+
+ // four byte encodings
+ if (encoding == ENCODING_UCS_4_1234
+ || encoding == ENCODING_UCS_4_4321
+ || encoding == ENCODING_UCS_4_2143
+ || encoding == ENCODING_UCS_4_3412)
+ {
+ // Strictly: "UCS-4" == "UTF-32BE"; also, "UTF-32LE" exists
+ if (!encodingName.equals("ISO-10646-UCS-4"))
+ {
+ error("unsupported 32-bit encoding", encodingName,
+ "ISO-10646-UCS-4");
+ }
+ return;
+ }
+
+ // assert encoding == ENCODING_EXTERNAL
+ // if (encoding != ENCODING_EXTERNAL)
+ // throw new RuntimeException ("encoding = " + encoding);
+
+ if (encodingName.equals("UTF-16BE"))
+ {
+ encoding = ENCODING_UCS_2_12;
+ return;
+ }
+ if (encodingName.equals("UTF-16LE"))
+ {
+ encoding = ENCODING_UCS_2_21;
+ return;
+ }
+
+ // We couldn't use the builtin decoders at all. But we can try to
+ // create a reader, since we haven't messed up buffering. Tweak
+ // the encoding name if necessary.
+
+ if (encodingName.equals("UTF-16")
+ || encodingName.equals("ISO-10646-UCS-2"))
+ {
+ encodingName = "Unicode";
+ }
+ // Ignoring all the EBCDIC aliases here
+
+ reader = new InputStreamReader(is, encodingName);
+ sourceType = INPUT_READER;
+ }
+
+ /**
+ * Parse miscellaneous markup outside the document element and DOCTYPE
+ * declaration.
+ * <pre>
+ * [27] Misc ::= Comment | PI | S
+ * </pre>
+ */
+ private void parseMisc()
throws Exception
- {
- while (true) {
- skipWhitespace ();
- if (tryRead (startDelimPI)) {
- parsePI ();
- } else if (tryRead (startDelimComment)) {
- parseComment ();
- } else {
- return;
- }
- }
- }
-
+ {
+ while (true)
+ {
+ skipWhitespace();
+ if (tryRead(startDelimPI))
+ {
+ parsePI();
+ }
+ else if (tryRead(startDelimComment))
+ {
+ parseComment();
+ }
+ else
+ {
+ return;
+ }
+ }
+ }
- /**
- * Parse a document type declaration.
- * <pre>
- * [28] doctypedecl ::= '&lt;!DOCTYPE' S Name (S ExternalID)? S?
- * ('[' (markupdecl | PEReference | S)* ']' S?)? '&gt;'
- * </pre>
- * <p> (The <code>&lt;!DOCTYPE</code> has already been read.)
- */
- private void parseDoctypedecl ()
+ /**
+ * Parse a document type declaration.
+ * <pre>
+ * [28] doctypedecl ::= '&lt;!DOCTYPE' S Name (S ExternalID)? S?
+ * ('[' (markupdecl | PEReference | S)* ']' S?)? '&gt;'
+ * </pre>
+ * <p> (The <code>&lt;!DOCTYPE</code> has already been read.)
+ */
+ private void parseDoctypedecl()
throws Exception
- {
- String rootName, ids[];
-
- // Read the document type name.
- requireWhitespace ();
- rootName = readNmtoken (true);
-
- // Read the External subset's IDs
- skipWhitespace ();
- ids = readExternalIds (false, true);
-
- // report (a) declaration of name, (b) lexical info (ids)
- handler.doctypeDecl (rootName, ids [0], ids [1]);
-
- // Internal subset is parsed first, if present
- skipWhitespace ();
- if (tryRead ('[')) {
-
- // loop until the subset ends
- while (true) {
- doReport = expandPE = true;
- skipWhitespace ();
- doReport = expandPE = false;
- if (tryRead (']')) {
- break; // end of subset
- } else {
- // WFC, PEs in internal subset (only between decls)
- peIsError = expandPE = true;
- parseMarkupdecl ();
- peIsError = expandPE = false;
- }
- }
- }
- skipWhitespace ();
- require ('>');
-
- // Read the external subset, if any
- InputSource subset;
-
- if (ids [1] == null)
- subset = handler.getExternalSubset (rootName,
- handler.getSystemId ());
- else
- subset = null;
- if (ids [1] != null || subset != null) {
- pushString (null, ">");
-
- // NOTE: [dtd] is so we say what SAX2 expects,
- // though it's misleading (subset, not entire dtd)
- if (ids [1] != null)
- pushURL (true, "[dtd]", ids, null, null, null, true);
- else {
- handler.warn ("modifying document by adding external subset");
- pushURL (true, "[dtd]",
- new String [] { subset.getPublicId (),
- subset.getSystemId (), null },
- subset.getCharacterStream (),
- subset.getByteStream (),
- subset.getEncoding (),
- false);
- }
-
- // Loop until we end up back at '>'
- while (true) {
- doReport = expandPE = true;
- skipWhitespace ();
- doReport = expandPE = false;
- if (tryRead ('>')) {
- break;
- } else {
- expandPE = true;
- parseMarkupdecl ();
- expandPE = false;
- }
- }
-
- // the ">" string isn't popped yet
- if (inputStack.size () != 1)
- error ("external subset has unmatched '>'");
- }
-
- // done dtd
- handler.endDoctype ();
- expandPE = false;
- doReport = true;
- }
+ {
+ String rootName;
+ ExternalIdentifiers ids;
+ // Read the document type name.
+ requireWhitespace();
+ rootName = readNmtoken(true);
- /**
- * Parse a markup declaration in the internal or external DTD subset.
- * <pre>
- * [29] markupdecl ::= elementdecl | Attlistdecl | EntityDecl
- * | NotationDecl | PI | Comment
- * [30] extSubsetDecl ::= (markupdecl | conditionalSect
- * | PEReference | S) *
- * </pre>
- * <p> Reading toplevel PE references is handled as a lexical issue
- * by the caller, as is whitespace.
- */
- private void parseMarkupdecl ()
+ // Read the External subset's IDs
+ skipWhitespace();
+ ids = readExternalIds(false, true);
+
+ // report (a) declaration of name, (b) lexical info (ids)
+ handler.doctypeDecl(rootName, ids.publicId, ids.systemId);
+
+ // Internal subset is parsed first, if present
+ skipWhitespace();
+ if (tryRead('['))
+ {
+
+ // loop until the subset ends
+ while (true)
+ {
+ doReport = expandPE = true;
+ skipWhitespace();
+ doReport = expandPE = false;
+ if (tryRead(']'))
+ {
+ break; // end of subset
+ }
+ else
+ {
+ // WFC, PEs in internal subset (only between decls)
+ peIsError = expandPE = true;
+ parseMarkupdecl();
+ peIsError = expandPE = false;
+ }
+ }
+ }
+ skipWhitespace();
+ require('>');
+
+ // Read the external subset, if any
+ InputSource subset;
+
+ if (ids.systemId == null)
+ {
+ subset = handler.getExternalSubset(rootName,
+ handler.getSystemId());
+ }
+ else
+ {
+ subset = null;
+ }
+ if (ids.systemId != null || subset != null)
+ {
+ pushString(null, ">");
+
+ // NOTE: [dtd] is so we say what SAX2 expects,
+ // though it's misleading (subset, not entire dtd)
+ if (ids.systemId != null)
+ {
+ pushURL(true, "[dtd]", ids, null, null, null, true);
+ }
+ else
+ {
+ handler.warn("modifying document by adding external subset");
+ pushURL(true, "[dtd]",
+ new ExternalIdentifiers(subset.getPublicId(),
+ subset.getSystemId(),
+ null),
+ subset.getCharacterStream(),
+ subset.getByteStream(),
+ subset.getEncoding(),
+ false);
+ }
+
+ // Loop until we end up back at '>'
+ while (true)
+ {
+ doReport = expandPE = true;
+ skipWhitespace();
+ doReport = expandPE = false;
+ if (tryRead('>'))
+ {
+ break;
+ }
+ else
+ {
+ expandPE = true;
+ parseMarkupdecl();
+ expandPE = false;
+ }
+ }
+
+ // the ">" string isn't popped yet
+ if (inputStack.size() != 1)
+ {
+ error("external subset has unmatched '>'");
+ }
+ }
+
+ // done dtd
+ handler.endDoctype();
+ expandPE = false;
+ doReport = true;
+ }
+
+ /**
+ * Parse a markup declaration in the internal or external DTD subset.
+ * <pre>
+ * [29] markupdecl ::= elementdecl | Attlistdecl | EntityDecl
+ * | NotationDecl | PI | Comment
+ * [30] extSubsetDecl ::= (markupdecl | conditionalSect
+ * | PEReference | S) *
+ * </pre>
+ * <p> Reading toplevel PE references is handled as a lexical issue
+ * by the caller, as is whitespace.
+ */
+ private void parseMarkupdecl()
throws Exception
- {
- char saved [] = null;
- boolean savedPE = expandPE;
-
- // prevent "<%foo;" and ensures saved entity is right
- require ('<');
- unread ('<');
- expandPE = false;
-
- if (tryRead ("<!ELEMENT")) {
- saved = readBuffer;
- expandPE = savedPE;
- parseElementDecl ();
- } else if (tryRead ("<!ATTLIST")) {
- saved = readBuffer;
- expandPE = savedPE;
- parseAttlistDecl ();
- } else if (tryRead ("<!ENTITY")) {
- saved = readBuffer;
- expandPE = savedPE;
- parseEntityDecl ();
- } else if (tryRead ("<!NOTATION")) {
- saved = readBuffer;
- expandPE = savedPE;
- parseNotationDecl ();
- } else if (tryRead (startDelimPI)) {
- saved = readBuffer;
- expandPE = savedPE;
- parsePI ();
- } else if (tryRead (startDelimComment)) {
- saved = readBuffer;
- expandPE = savedPE;
- parseComment ();
- } else if (tryRead ("<![")) {
- saved = readBuffer;
- expandPE = savedPE;
- if (inputStack.size () > 0)
- parseConditionalSect (saved);
- else
- error ("conditional sections illegal in internal subset");
- } else {
- error ("expected markup declaration");
- }
-
- // VC: Proper Decl/PE Nesting
- if (readBuffer != saved)
- handler.verror ("Illegal Declaration/PE nesting");
- }
+ {
+ char[] saved = null;
+ boolean savedPE = expandPE;
+ // prevent "<%foo;" and ensures saved entity is right
+ require('<');
+ unread('<');
+ expandPE = false;
+
+ if (tryRead("<!ELEMENT"))
+ {
+ saved = readBuffer;
+ expandPE = savedPE;
+ parseElementDecl();
+ }
+ else if (tryRead("<!ATTLIST"))
+ {
+ saved = readBuffer;
+ expandPE = savedPE;
+ parseAttlistDecl();
+ }
+ else if (tryRead("<!ENTITY"))
+ {
+ saved = readBuffer;
+ expandPE = savedPE;
+ parseEntityDecl();
+ }
+ else if (tryRead("<!NOTATION"))
+ {
+ saved = readBuffer;
+ expandPE = savedPE;
+ parseNotationDecl();
+ }
+ else if (tryRead(startDelimPI))
+ {
+ saved = readBuffer;
+ expandPE = savedPE;
+ parsePI();
+ }
+ else if (tryRead(startDelimComment))
+ {
+ saved = readBuffer;
+ expandPE = savedPE;
+ parseComment();
+ }
+ else if (tryRead("<!["))
+ {
+ saved = readBuffer;
+ expandPE = savedPE;
+ if (inputStack.size() > 0)
+ {
+ parseConditionalSect(saved);
+ }
+ else
+ {
+ error("conditional sections illegal in internal subset");
+ }
+ }
+ else
+ {
+ error("expected markup declaration");
+ }
- /**
- * Parse an element, with its tags.
- * <pre>
- * [39] element ::= EmptyElementTag | STag content ETag
- * [40] STag ::= '&lt;' Name (S Attribute)* S? '&gt;'
- * [44] EmptyElementTag ::= '&lt;' Name (S Attribute)* S? '/&gt;'
- * </pre>
- * <p> (The '&lt;' has already been read.)
- * <p>NOTE: this method actually chains onto parseContent (), if necessary,
- * and parseContent () will take care of calling parseETag ().
- */
- private void parseElement (boolean maybeGetSubset)
+ // VC: Proper Decl/PE Nesting
+ if (readBuffer != saved)
+ {
+ handler.verror("Illegal Declaration/PE nesting");
+ }
+ }
+
+ /**
+ * Parse an element, with its tags.
+ * <pre>
+ * [39] element ::= EmptyElementTag | STag content ETag
+ * [40] STag ::= '&lt;' Name (S Attribute)* S? '&gt;'
+ * [44] EmptyElementTag ::= '&lt;' Name (S Attribute)* S? '/&gt;'
+ * </pre>
+ * <p> (The '&lt;' has already been read.)
+ * <p>NOTE: this method actually chains onto parseContent (), if necessary,
+ * and parseContent () will take care of calling parseETag ().
+ */
+ private void parseElement(boolean maybeGetSubset)
throws Exception
- {
- String gi;
- char c;
- int oldElementContent = currentElementContent;
- String oldElement = currentElement;
- Object element [];
-
- // This is the (global) counter for the
- // array of specified attributes.
- tagAttributePos = 0;
-
- // Read the element type name.
- gi = readNmtoken (true);
-
- // If we saw no DTD, and this is the document root element,
- // let the application modify the input stream by providing one.
- if (maybeGetSubset) {
- InputSource subset = handler.getExternalSubset (gi,
- handler.getSystemId ());
- if (subset != null) {
- String publicId = subset.getPublicId ();
- String systemId = subset.getSystemId ();
-
- handler.warn ("modifying document by adding DTD");
- handler.doctypeDecl (gi, publicId, systemId);
- pushString (null, ">");
-
- // NOTE: [dtd] is so we say what SAX2 expects,
- // though it's misleading (subset, not entire dtd)
- pushURL (true, "[dtd]",
- new String [] { publicId, systemId, null },
- subset.getCharacterStream (),
- subset.getByteStream (),
- subset.getEncoding (),
- false);
-
- // Loop until we end up back at '>'
- while (true) {
- doReport = expandPE = true;
- skipWhitespace ();
- doReport = expandPE = false;
- if (tryRead ('>')) {
- break;
- } else {
- expandPE = true;
- parseMarkupdecl ();
- expandPE = false;
- }
- }
-
- // the ">" string isn't popped yet
- if (inputStack.size () != 1)
- error ("external subset has unmatched '>'");
-
- handler.endDoctype ();
- }
- }
-
- // Determine the current content type.
- currentElement = gi;
- element = (Object []) elementInfo.get (gi);
- currentElementContent = getContentType (element, CONTENT_ANY);
-
- // Read the attributes, if any.
- // After this loop, "c" is the closing delimiter.
- boolean white = tryWhitespace ();
- c = readCh ();
- while (c != '/' && c != '>') {
- unread (c);
- if (!white)
- error ("need whitespace between attributes");
- parseAttribute (gi);
- white = tryWhitespace ();
- c = readCh ();
- }
-
- // Supply any defaulted attributes.
- Enumeration atts = declaredAttributes (element);
- if (atts != null) {
- String aname;
+ {
+ String gi;
+ char c;
+ int oldElementContent = currentElementContent;
+ String oldElement = currentElement;
+ ElementDecl element;
+
+ // This is the (global) counter for the
+ // array of specified attributes.
+ tagAttributePos = 0;
+
+ // Read the element type name.
+ gi = readNmtoken(true);
+
+ // If we saw no DTD, and this is the document root element,
+ // let the application modify the input stream by providing one.
+ if (maybeGetSubset)
+ {
+ InputSource subset = handler.getExternalSubset(gi,
+ handler.getSystemId());
+ if (subset != null)
+ {
+ String publicId = subset.getPublicId();
+ String systemId = subset.getSystemId();
+
+ handler.warn("modifying document by adding DTD");
+ handler.doctypeDecl(gi, publicId, systemId);
+ pushString(null, ">");
+
+ // NOTE: [dtd] is so we say what SAX2 expects,
+ // though it's misleading (subset, not entire dtd)
+ pushURL(true, "[dtd]",
+ new ExternalIdentifiers(publicId, systemId, null),
+ subset.getCharacterStream(),
+ subset.getByteStream(),
+ subset.getEncoding(),
+ false);
+
+ // Loop until we end up back at '>'
+ while (true)
+ {
+ doReport = expandPE = true;
+ skipWhitespace();
+ doReport = expandPE = false;
+ if (tryRead('>'))
+ {
+ break;
+ }
+ else
+ {
+ expandPE = true;
+ parseMarkupdecl();
+ expandPE = false;
+ }
+ }
+
+ // the ">" string isn't popped yet
+ if (inputStack.size() != 1)
+ {
+ error("external subset has unmatched '>'");
+ }
+
+ handler.endDoctype();
+ }
+ }
+
+ // Determine the current content type.
+ currentElement = gi;
+ element = (ElementDecl) elementInfo.get(gi);
+ currentElementContent = getContentType(element, CONTENT_ANY);
+
+ // Read the attributes, if any.
+ // After this loop, "c" is the closing delimiter.
+ boolean white = tryWhitespace();
+ c = readCh();
+ while (c != '/' && c != '>')
+ {
+ unread(c);
+ if (!white)
+ {
+ error("need whitespace between attributes");
+ }
+ parseAttribute(gi);
+ white = tryWhitespace();
+ c = readCh();
+ }
+
+ // Supply any defaulted attributes.
+ Iterator atts = declaredAttributes(element);
+ if (atts != null)
+ {
+ String aname;
loop:
- while (atts.hasMoreElements ()) {
- aname = (String) atts.nextElement ();
- // See if it was specified.
- for (int i = 0; i < tagAttributePos; i++) {
- if (tagAttributes [i] == aname) {
- continue loop;
- }
- }
- // ... or has a default
- String value = getAttributeDefaultValue (gi, aname);
-
- if (value == null)
- continue;
- handler.attribute (aname, value, false);
- }
- }
-
- // Figure out if this is a start tag
- // or an empty element, and dispatch an
- // event accordingly.
- switch (c) {
- case '>':
- handler.startElement (gi);
- parseContent ();
- break;
- case '/':
- require ('>');
- handler.startElement (gi);
- handler.endElement (gi);
- break;
- }
-
- // Restore the previous state.
- currentElement = oldElement;
- currentElementContent = oldElementContent;
- }
+ while (atts.hasNext())
+ {
+ aname = (String) atts.next();
+ // See if it was specified.
+ for (int i = 0; i < tagAttributePos; i++)
+ {
+ if (tagAttributes[i] == aname)
+ {
+ continue loop;
+ }
+ }
+ // ... or has a default
+ String value = getAttributeDefaultValue(gi, aname);
+
+ if (value == null)
+ {
+ continue;
+ }
+ handler.attribute(aname, value, false);
+ }
+ }
+ // Figure out if this is a start tag
+ // or an empty element, and dispatch an
+ // event accordingly.
+ switch (c)
+ {
+ case '>':
+ handler.startElement(gi);
+ parseContent();
+ break;
+ case '/':
+ require('>');
+ handler.startElement(gi);
+ handler.endElement(gi);
+ break;
+ }
- /**
- * Parse an attribute assignment.
- * <pre>
- * [41] Attribute ::= Name Eq AttValue
- * </pre>
- * @param name The name of the attribute's element.
- * @see SAXDriver#attribute
- */
- private void parseAttribute (String name)
- throws Exception
- {
- String aname;
- String type;
- String value;
- int flags = LIT_ATTRIBUTE | LIT_ENTITY_REF;
-
- // Read the attribute name.
- aname = readNmtoken (true);
- type = getAttributeType (name, aname);
-
- // Parse '='
- parseEq ();
-
- // Read the value, normalizing whitespace
- // unless it is CDATA.
- if (handler.getFeature (SAXDriver.FEATURE + "string-interning")) {
- if (type == "CDATA" || type == null) {
- value = readLiteral (flags);
- } else {
- value = readLiteral (flags | LIT_NORMALIZE);
- }
- } else {
- if (type.equals("CDATA") || type == null) {
- value = readLiteral (flags);
- } else {
- value = readLiteral (flags | LIT_NORMALIZE);
- }
+ // Restore the previous state.
+ currentElement = oldElement;
+ currentElementContent = oldElementContent;
}
+
+ /**
+ * Parse an attribute assignment.
+ * <pre>
+ * [41] Attribute ::= Name Eq AttValue
+ * </pre>
+ * @param name The name of the attribute's element.
+ * @see SAXDriver#attribute
+ */
+ private void parseAttribute(String name)
+ throws Exception
+ {
+ String aname;
+ String type;
+ String value;
+ int flags = LIT_ATTRIBUTE | LIT_ENTITY_REF;
+
+ // Read the attribute name.
+ aname = readNmtoken(true);
+ type = getAttributeType(name, aname);
+
+ // Parse '='
+ parseEq();
+
+ // Read the value, normalizing whitespace
+ // unless it is CDATA.
+ if (handler.stringInterning)
+ {
+ if (type == "CDATA" || type == null)
+ {
+ value = readLiteral(flags);
+ }
+ else
+ {
+ value = readLiteral(flags | LIT_NORMALIZE);
+ }
+ }
+ else
+ {
+ if (type.equals("CDATA") || type == null)
+ {
+ value = readLiteral(flags);
+ }
+ else
+ {
+ value = readLiteral(flags | LIT_NORMALIZE);
+ }
+ }
- // WFC: no duplicate attributes
- for (int i = 0; i < tagAttributePos; i++)
- if (aname.equals (tagAttributes [i]))
- error ("duplicate attribute", aname, null);
-
- // Inform the handler about the
- // attribute.
- handler.attribute (aname, value, true);
- dataBufferPos = 0;
-
- // Note that the attribute has been
- // specified.
- if (tagAttributePos == tagAttributes.length) {
- String newAttrib[] = new String [tagAttributes.length * 2];
- System.arraycopy (tagAttributes, 0, newAttrib, 0, tagAttributePos);
- tagAttributes = newAttrib;
- }
- tagAttributes [tagAttributePos++] = aname;
- }
+ // WFC: no duplicate attributes
+ for (int i = 0; i < tagAttributePos; i++)
+ {
+ if (aname.equals(tagAttributes [i]))
+ {
+ error("duplicate attribute", aname, null);
+ }
+ }
+ // Inform the handler about the
+ // attribute.
+ handler.attribute(aname, value, true);
+ dataBufferPos = 0;
+
+ // Note that the attribute has been
+ // specified.
+ if (tagAttributePos == tagAttributes.length)
+ {
+ String newAttrib[] = new String[tagAttributes.length * 2];
+ System.arraycopy(tagAttributes, 0, newAttrib, 0, tagAttributePos);
+ tagAttributes = newAttrib;
+ }
+ tagAttributes[tagAttributePos++] = aname;
+ }
- /**
- * Parse an equals sign surrounded by optional whitespace.
- * <pre>
- * [25] Eq ::= S? '=' S?
- * </pre>
- */
- private void parseEq ()
+ /**
+ * Parse an equals sign surrounded by optional whitespace.
+ * <pre>
+ * [25] Eq ::= S? '=' S?
+ * </pre>
+ */
+ private void parseEq()
throws SAXException, IOException
- {
- skipWhitespace ();
- require ('=');
- skipWhitespace ();
- }
-
+ {
+ skipWhitespace();
+ require('=');
+ skipWhitespace();
+ }
- /**
- * Parse an end tag.
- * <pre>
- * [42] ETag ::= '</' Name S? '>'
- * </pre>
- * <p>NOTE: parseContent () chains to here, we already read the
- * "&lt;/".
- */
- private void parseETag ()
+ /**
+ * Parse an end tag.
+ * <pre>
+ * [42] ETag ::= '</' Name S? '>'
+ * </pre>
+ * <p>NOTE: parseContent () chains to here, we already read the
+ * "&lt;/".
+ */
+ private void parseETag()
throws Exception
- {
- require (currentElement);
- skipWhitespace ();
- require ('>');
- handler.endElement (currentElement);
- // not re-reporting any SAXException re bogus end tags,
- // even though that diagnostic might be clearer ...
- }
-
-
- /**
- * Parse the content of an element.
- * <pre>
- * [43] content ::= (element | CharData | Reference
- * | CDSect | PI | Comment)*
- * [67] Reference ::= EntityRef | CharRef
- * </pre>
- * <p> NOTE: consumes ETtag.
- */
- private void parseContent ()
+ {
+ require(currentElement);
+ skipWhitespace();
+ require('>');
+ handler.endElement(currentElement);
+ // not re-reporting any SAXException re bogus end tags,
+ // even though that diagnostic might be clearer ...
+ }
+
+ /**
+ * Parse the content of an element.
+ * <pre>
+ * [43] content ::= (element | CharData | Reference
+ * | CDSect | PI | Comment)*
+ * [67] Reference ::= EntityRef | CharRef
+ * </pre>
+ * <p> NOTE: consumes ETtag.
+ */
+ private void parseContent()
throws Exception
- {
- char c;
-
- while (true) {
- // consume characters (or ignorable whitspace) until delimiter
- parseCharData ();
-
- // Handle delimiters
- c = readCh ();
- switch (c) {
-
- case '&': // Found "&"
- c = readCh ();
- if (c == '#') {
- parseCharRef ();
- } else {
- unread (c);
- parseEntityRef (true);
- }
- isDirtyCurrentElement = true;
- break;
-
- case '<': // Found "<"
- dataBufferFlush ();
- c = readCh ();
- switch (c) {
- case '!': // Found "<!"
- c = readCh ();
- switch (c) {
- case '-': // Found "<!-"
- require ('-');
- isDirtyCurrentElement = false;
- parseComment ();
- break;
- case '[': // Found "<!["
- isDirtyCurrentElement = false;
- require ("CDATA[");
- handler.startCDATA ();
- inCDATA = true;
- parseCDSect ();
- inCDATA = false;
- handler.endCDATA ();
- break;
- default:
- error ("expected comment or CDATA section", c, null);
- break;
- }
- break;
-
- case '?': // Found "<?"
- isDirtyCurrentElement = false;
- parsePI ();
- break;
-
- case '/': // Found "</"
- isDirtyCurrentElement = false;
- parseETag ();
- return;
-
- default: // Found "<" followed by something else
- isDirtyCurrentElement = false;
- unread (c);
- parseElement (false);
- break;
- }
- }
- }
-
- }
-
-
- /**
- * Parse an element type declaration.
- * <pre>
- * [45] elementdecl ::= '&lt;!ELEMENT' S Name S contentspec S? '&gt;'
- * </pre>
- * <p> NOTE: the '&lt;!ELEMENT' has already been read.
- */
- private void parseElementDecl ()
+ {
+ char c;
+
+ while (true)
+ {
+ // consume characters (or ignorable whitspace) until delimiter
+ parseCharData();
+
+ // Handle delimiters
+ c = readCh();
+ switch (c)
+ {
+ case '&': // Found "&"
+ c = readCh();
+ if (c == '#')
+ {
+ parseCharRef();
+ }
+ else
+ {
+ unread(c);
+ parseEntityRef(true);
+ }
+ isDirtyCurrentElement = true;
+ break;
+
+ case '<': // Found "<"
+ dataBufferFlush();
+ c = readCh();
+ switch (c)
+ {
+ case '!': // Found "<!"
+ c = readCh();
+ switch (c)
+ {
+ case '-': // Found "<!-"
+ require('-');
+ isDirtyCurrentElement = false;
+ parseComment();
+ break;
+ case '[': // Found "<!["
+ isDirtyCurrentElement = false;
+ require("CDATA[");
+ handler.startCDATA();
+ inCDATA = true;
+ parseCDSect();
+ inCDATA = false;
+ handler.endCDATA();
+ break;
+ default:
+ error("expected comment or CDATA section", c, null);
+ break;
+ }
+ break;
+
+ case '?': // Found "<?"
+ isDirtyCurrentElement = false;
+ parsePI();
+ break;
+
+ case '/': // Found "</"
+ isDirtyCurrentElement = false;
+ parseETag();
+ return;
+
+ default: // Found "<" followed by something else
+ isDirtyCurrentElement = false;
+ unread(c);
+ parseElement(false);
+ break;
+ }
+ }
+ }
+ }
+
+ /**
+ * Parse an element type declaration.
+ * <pre>
+ * [45] elementdecl ::= '&lt;!ELEMENT' S Name S contentspec S? '&gt;'
+ * </pre>
+ * <p> NOTE: the '&lt;!ELEMENT' has already been read.
+ */
+ private void parseElementDecl()
throws Exception
- {
- String name;
-
- requireWhitespace ();
- // Read the element type name.
- name = readNmtoken (true);
-
- requireWhitespace ();
- // Read the content model.
- parseContentspec (name);
-
- skipWhitespace ();
- require ('>');
- }
-
+ {
+ String name;
+
+ requireWhitespace();
+ // Read the element type name.
+ name = readNmtoken(true);
- /**
- * Content specification.
- * <pre>
- * [46] contentspec ::= 'EMPTY' | 'ANY' | Mixed | elements
- * </pre>
- */
- private void parseContentspec (String name)
- throws Exception
- {
-// FIXME: move elementDecl() into setElement(), pass EMTPY/ANY ...
- if (tryRead ("EMPTY")) {
- setElement (name, CONTENT_EMPTY, null, null);
- if (!skippedPE)
- handler.getDeclHandler ().elementDecl (name, "EMPTY");
- return;
- } else if (tryRead ("ANY")) {
- setElement (name, CONTENT_ANY, null, null);
- if (!skippedPE)
- handler.getDeclHandler ().elementDecl (name, "ANY");
- return;
- } else {
- String model;
- char saved [];
-
- require ('(');
- saved = readBuffer;
- dataBufferAppend ('(');
- skipWhitespace ();
- if (tryRead ("#PCDATA")) {
- dataBufferAppend ("#PCDATA");
- parseMixed (saved);
- model = dataBufferToString ();
- setElement (name, CONTENT_MIXED, model, null);
- } else {
- parseElements (saved);
- model = dataBufferToString ();
- setElement (name, CONTENT_ELEMENTS, model, null);
- }
- if (!skippedPE)
- handler.getDeclHandler ().elementDecl (name, model);
- }
- }
+ requireWhitespace();
+ // Read the content model.
+ parseContentspec(name);
+
+ skipWhitespace();
+ require('>');
+ }
- /**
- * Parse an element-content model.
- * <pre>
- * [47] elements ::= (choice | seq) ('?' | '*' | '+')?
- * [49] choice ::= '(' S? cp (S? '|' S? cp)+ S? ')'
- * [50] seq ::= '(' S? cp (S? ',' S? cp)* S? ')'
- * </pre>
- *
- * <p> NOTE: the opening '(' and S have already been read.
- *
- * @param saved Buffer for entity that should have the terminal ')'
- */
- private void parseElements (char saved [])
+ /**
+ * Content specification.
+ * <pre>
+ * [46] contentspec ::= 'EMPTY' | 'ANY' | Mixed | elements
+ * </pre>
+ */
+ private void parseContentspec(String name)
throws Exception
- {
- char c;
- char sep;
-
- // Parse the first content particle
- skipWhitespace ();
- parseCp ();
-
- // Check for end or for a separator.
- skipWhitespace ();
- c = readCh ();
- switch (c) {
- case ')':
- // VC: Proper Group/PE Nesting
- if (readBuffer != saved)
- handler.verror ("Illegal Group/PE nesting");
-
- dataBufferAppend (')');
- c = readCh ();
- switch (c) {
- case '*':
- case '+':
- case '?':
- dataBufferAppend (c);
- break;
- default:
- unread (c);
- }
- return;
- case ',': // Register the separator.
- case '|':
- sep = c;
- dataBufferAppend (c);
- break;
- default:
- error ("bad separator in content model", c, null);
- return;
- }
-
- // Parse the rest of the content model.
- while (true) {
- skipWhitespace ();
- parseCp ();
- skipWhitespace ();
- c = readCh ();
- if (c == ')') {
- // VC: Proper Group/PE Nesting
- if (readBuffer != saved)
- handler.verror ("Illegal Group/PE nesting");
-
- dataBufferAppend (')');
- break;
- } else if (c != sep) {
- error ("bad separator in content model", c, null);
- return;
- } else {
- dataBufferAppend (c);
- }
- }
-
- // Check for the occurrence indicator.
- c = readCh ();
- switch (c) {
- case '?':
- case '*':
- case '+':
- dataBufferAppend (c);
- return;
- default:
- unread (c);
- return;
- }
- }
-
-
- /**
- * Parse a content particle.
- * <pre>
- * [48] cp ::= (Name | choice | seq) ('?' | '*' | '+')?
- * </pre>
- */
- private void parseCp ()
+ {
+ // FIXME: move elementDecl() into setElement(), pass EMTPY/ANY ...
+ if (tryRead("EMPTY"))
+ {
+ setElement(name, CONTENT_EMPTY, null, null);
+ if (!skippedPE)
+ {
+ handler.getDeclHandler().elementDecl(name, "EMPTY");
+ }
+ return;
+ }
+ else if (tryRead("ANY"))
+ {
+ setElement(name, CONTENT_ANY, null, null);
+ if (!skippedPE)
+ {
+ handler.getDeclHandler().elementDecl(name, "ANY");
+ }
+ return;
+ }
+ else
+ {
+ String model;
+ char[] saved;
+
+ require('(');
+ saved = readBuffer;
+ dataBufferAppend('(');
+ skipWhitespace();
+ if (tryRead("#PCDATA"))
+ {
+ dataBufferAppend("#PCDATA");
+ parseMixed(saved);
+ model = dataBufferToString();
+ setElement(name, CONTENT_MIXED, model, null);
+ }
+ else
+ {
+ parseElements(saved);
+ model = dataBufferToString();
+ setElement(name, CONTENT_ELEMENTS, model, null);
+ }
+ if (!skippedPE)
+ {
+ handler.getDeclHandler().elementDecl(name, model);
+ }
+ }
+ }
+
+ /**
+ * Parse an element-content model.
+ * <pre>
+ * [47] elements ::= (choice | seq) ('?' | '*' | '+')?
+ * [49] choice ::= '(' S? cp (S? '|' S? cp)+ S? ')'
+ * [50] seq ::= '(' S? cp (S? ',' S? cp)* S? ')'
+ * </pre>
+ *
+ * <p> NOTE: the opening '(' and S have already been read.
+ *
+ * @param saved Buffer for entity that should have the terminal ')'
+ */
+ private void parseElements(char[] saved)
throws Exception
- {
- if (tryRead ('(')) {
- dataBufferAppend ('(');
- parseElements (readBuffer);
- } else {
- dataBufferAppend (readNmtoken (true));
- char c = readCh ();
- switch (c) {
- case '?':
- case '*':
- case '+':
- dataBufferAppend (c);
- break;
- default:
- unread (c);
- break;
- }
- }
- }
-
-
- /**
- * Parse mixed content.
- * <pre>
- * [51] Mixed ::= '(' S? ( '#PCDATA' (S? '|' S? Name)*) S? ')*'
- * | '(' S? ('#PCDATA') S? ')'
- * </pre>
- *
- * @param saved Buffer for entity that should have the terminal ')'
- */
- private void parseMixed (char saved [])
+ {
+ char c;
+ char sep;
+
+ // Parse the first content particle
+ skipWhitespace();
+ parseCp();
+
+ // Check for end or for a separator.
+ skipWhitespace();
+ c = readCh();
+ switch (c)
+ {
+ case ')':
+ // VC: Proper Group/PE Nesting
+ if (readBuffer != saved)
+ {
+ handler.verror("Illegal Group/PE nesting");
+ }
+
+ dataBufferAppend(')');
+ c = readCh();
+ switch (c)
+ {
+ case '*':
+ case '+':
+ case '?':
+ dataBufferAppend(c);
+ break;
+ default:
+ unread(c);
+ }
+ return;
+ case ',': // Register the separator.
+ case '|':
+ sep = c;
+ dataBufferAppend(c);
+ break;
+ default:
+ error("bad separator in content model", c, null);
+ return;
+ }
+
+ // Parse the rest of the content model.
+ while (true)
+ {
+ skipWhitespace();
+ parseCp();
+ skipWhitespace();
+ c = readCh();
+ if (c == ')')
+ {
+ // VC: Proper Group/PE Nesting
+ if (readBuffer != saved)
+ {
+ handler.verror("Illegal Group/PE nesting");
+ }
+
+ dataBufferAppend(')');
+ break;
+ }
+ else if (c != sep)
+ {
+ error("bad separator in content model", c, null);
+ return;
+ }
+ else
+ {
+ dataBufferAppend(c);
+ }
+ }
+
+ // Check for the occurrence indicator.
+ c = readCh();
+ switch (c)
+ {
+ case '?':
+ case '*':
+ case '+':
+ dataBufferAppend(c);
+ return;
+ default:
+ unread(c);
+ return;
+ }
+ }
+
+ /**
+ * Parse a content particle.
+ * <pre>
+ * [48] cp ::= (Name | choice | seq) ('?' | '*' | '+')?
+ * </pre>
+ */
+ private void parseCp()
throws Exception
- {
- // Check for PCDATA alone.
- skipWhitespace ();
- if (tryRead (')')) {
- // VC: Proper Group/PE Nesting
- if (readBuffer != saved)
- handler.verror ("Illegal Group/PE nesting");
-
- dataBufferAppend (")*");
- tryRead ('*');
- return;
- }
-
- // Parse mixed content.
- skipWhitespace ();
- while (!tryRead (")")) {
- require ('|');
- dataBufferAppend ('|');
- skipWhitespace ();
- dataBufferAppend (readNmtoken (true));
- skipWhitespace ();
- }
-
- // VC: Proper Group/PE Nesting
- if (readBuffer != saved)
- handler.verror ("Illegal Group/PE nesting");
-
- require ('*');
- dataBufferAppend (")*");
- }
-
+ {
+ if (tryRead('('))
+ {
+ dataBufferAppend('(');
+ parseElements(readBuffer);
+ }
+ else
+ {
+ dataBufferAppend(readNmtoken(true));
+ char c = readCh();
+ switch (c)
+ {
+ case '?':
+ case '*':
+ case '+':
+ dataBufferAppend(c);
+ break;
+ default:
+ unread(c);
+ break;
+ }
+ }
+ }
- /**
- * Parse an attribute list declaration.
- * <pre>
- * [52] AttlistDecl ::= '&lt;!ATTLIST' S Name AttDef* S? '&gt;'
- * </pre>
- * <p>NOTE: the '&lt;!ATTLIST' has already been read.
- */
- private void parseAttlistDecl ()
+ /**
+ * Parse mixed content.
+ * <pre>
+ * [51] Mixed ::= '(' S? ( '#PCDATA' (S? '|' S? Name)*) S? ')*'
+ * | '(' S? ('#PCDATA') S? ')'
+ * </pre>
+ *
+ * @param saved Buffer for entity that should have the terminal ')'
+ */
+ private void parseMixed(char[] saved)
throws Exception
- {
- String elementName;
-
- requireWhitespace ();
- elementName = readNmtoken (true);
- boolean white = tryWhitespace ();
- while (!tryRead ('>')) {
- if (!white)
- error ("whitespace required before attribute definition");
- parseAttDef (elementName);
- white = tryWhitespace ();
- }
- }
-
-
- /**
- * Parse a single attribute definition.
- * <pre>
- * [53] AttDef ::= S Name S AttType S DefaultDecl
- * </pre>
- */
- private void parseAttDef (String elementName)
+ {
+ // Check for PCDATA alone.
+ skipWhitespace();
+ if (tryRead(')'))
+ {
+ // VC: Proper Group/PE Nesting
+ if (readBuffer != saved)
+ {
+ handler.verror("Illegal Group/PE nesting");
+ }
+
+ dataBufferAppend(")*");
+ tryRead('*');
+ return;
+ }
+
+ // Parse mixed content.
+ skipWhitespace();
+ while (!tryRead(")"))
+ {
+ require('|');
+ dataBufferAppend('|');
+ skipWhitespace();
+ dataBufferAppend(readNmtoken(true));
+ skipWhitespace();
+ }
+
+ // VC: Proper Group/PE Nesting
+ if (readBuffer != saved)
+ {
+ handler.verror("Illegal Group/PE nesting");
+ }
+
+ require('*');
+ dataBufferAppend(")*");
+ }
+
+ /**
+ * Parse an attribute list declaration.
+ * <pre>
+ * [52] AttlistDecl ::= '&lt;!ATTLIST' S Name AttDef* S? '&gt;'
+ * </pre>
+ * <p>NOTE: the '&lt;!ATTLIST' has already been read.
+ */
+ private void parseAttlistDecl()
throws Exception
- {
- String name;
- String type;
- String enumer = null;
-
- // Read the attribute name.
- name = readNmtoken (true);
-
- // Read the attribute type.
- requireWhitespace ();
- type = readAttType ();
-
- // Get the string of enumerated values if necessary.
- if (handler.getFeature (SAXDriver.FEATURE + "string-interning")) {
- if ("ENUMERATION" == type || "NOTATION" == type)
- enumer = dataBufferToString ();
- } else {
- if ("ENUMERATION".equals(type) || "NOTATION".equals(type))
- enumer = dataBufferToString ();
+ {
+ String elementName;
+
+ requireWhitespace();
+ elementName = readNmtoken(true);
+ boolean white = tryWhitespace();
+ while (!tryRead('>'))
+ {
+ if (!white)
+ {
+ error("whitespace required before attribute definition");
+ }
+ parseAttDef(elementName);
+ white = tryWhitespace();
+ }
}
+
+ /**
+ * Parse a single attribute definition.
+ * <pre>
+ * [53] AttDef ::= S Name S AttType S DefaultDecl
+ * </pre>
+ */
+ private void parseAttDef(String elementName)
+ throws Exception
+ {
+ String name;
+ String type;
+ String enumer = null;
+
+ // Read the attribute name.
+ name = readNmtoken(true);
- // Read the default value.
- requireWhitespace ();
- parseDefault (elementName, name, type, enumer);
- }
+ // Read the attribute type.
+ requireWhitespace();
+ type = readAttType();
+ // Get the string of enumerated values if necessary.
+ if (handler.stringInterning)
+ {
+ if ("ENUMERATION" == type || "NOTATION" == type)
+ {
+ enumer = dataBufferToString();
+ }
+ }
+ else
+ {
+ if ("ENUMERATION".equals(type) || "NOTATION".equals(type))
+ {
+ enumer = dataBufferToString();
+ }
+ }
+
+ // Read the default value.
+ requireWhitespace();
+ parseDefault(elementName, name, type, enumer);
+ }
/**
* Parse the attribute type.
@@ -1598,229 +1926,284 @@ loop:
* [54] AttType ::= StringType | TokenizedType | EnumeratedType
* [55] StringType ::= 'CDATA'
* [56] TokenizedType ::= 'ID' | 'IDREF' | 'IDREFS' | 'ENTITY'
- * | 'ENTITIES' | 'NMTOKEN' | 'NMTOKENS'
+ * | 'ENTITIES' | 'NMTOKEN' | 'NMTOKENS'
* [57] EnumeratedType ::= NotationType | Enumeration
* </pre>
*/
- private String readAttType ()
+ private String readAttType()
throws Exception
{
- if (tryRead ('(')) {
- parseEnumeration (false);
- return "ENUMERATION";
- } else {
- String typeString = readNmtoken (true);
- if (handler.getFeature (SAXDriver.FEATURE + "string-interning")) {
- if ("NOTATION" == typeString) {
- parseNotationType ();
- return typeString;
- } else if ("CDATA" == typeString
- || "ID" == typeString
- || "IDREF" == typeString
- || "IDREFS" == typeString
- || "ENTITY" == typeString
- || "ENTITIES" == typeString
- || "NMTOKEN" == typeString
- || "NMTOKENS" == typeString)
- return typeString;
- } else {
- if ("NOTATION".equals(typeString)) {
- parseNotationType ();
- return typeString;
- } else if ("CDATA".equals(typeString)
- || "ID".equals(typeString)
- || "IDREF".equals(typeString)
- || "IDREFS".equals(typeString)
- || "ENTITY".equals(typeString)
- || "ENTITIES".equals(typeString)
- || "NMTOKEN".equals(typeString)
- || "NMTOKENS".equals(typeString))
- return typeString;
- }
- error ("illegal attribute type", typeString, null);
- return null;
- }
+ if (tryRead('('))
+ {
+ parseEnumeration(false);
+ return "ENUMERATION";
+ }
+ else
+ {
+ String typeString = readNmtoken(true);
+ if (handler.stringInterning)
+ {
+ if ("NOTATION" == typeString)
+ {
+ parseNotationType();
+ return typeString;
+ }
+ else if ("CDATA" == typeString
+ || "ID" == typeString
+ || "IDREF" == typeString
+ || "IDREFS" == typeString
+ || "ENTITY" == typeString
+ || "ENTITIES" == typeString
+ || "NMTOKEN" == typeString
+ || "NMTOKENS" == typeString)
+ {
+ return typeString;
+ }
+ }
+ else
+ {
+ if ("NOTATION".equals(typeString))
+ {
+ parseNotationType();
+ return typeString;
+ }
+ else if ("CDATA".equals(typeString)
+ || "ID".equals(typeString)
+ || "IDREF".equals(typeString)
+ || "IDREFS".equals(typeString)
+ || "ENTITY".equals(typeString)
+ || "ENTITIES".equals(typeString)
+ || "NMTOKEN".equals(typeString)
+ || "NMTOKENS".equals(typeString))
+ {
+ return typeString;
+ }
+ }
+ error("illegal attribute type", typeString, null);
+ return null;
+ }
}
-
- /**
- * Parse an enumeration.
- * <pre>
- * [59] Enumeration ::= '(' S? Nmtoken (S? '|' S? Nmtoken)* S? ')'
- * </pre>
- * <p>NOTE: the '(' has already been read.
- */
- private void parseEnumeration (boolean isNames)
+ /**
+ * Parse an enumeration.
+ * <pre>
+ * [59] Enumeration ::= '(' S? Nmtoken (S? '|' S? Nmtoken)* S? ')'
+ * </pre>
+ * <p>NOTE: the '(' has already been read.
+ */
+ private void parseEnumeration(boolean isNames)
throws Exception
- {
- dataBufferAppend ('(');
-
- // Read the first token.
- skipWhitespace ();
- dataBufferAppend (readNmtoken (isNames));
- // Read the remaining tokens.
- skipWhitespace ();
- while (!tryRead (')')) {
- require ('|');
- dataBufferAppend ('|');
- skipWhitespace ();
- dataBufferAppend (readNmtoken (isNames));
- skipWhitespace ();
- }
- dataBufferAppend (')');
- }
-
+ {
+ dataBufferAppend('(');
+
+ // Read the first token.
+ skipWhitespace();
+ dataBufferAppend(readNmtoken(isNames));
+ // Read the remaining tokens.
+ skipWhitespace();
+ while (!tryRead(')'))
+ {
+ require('|');
+ dataBufferAppend('|');
+ skipWhitespace();
+ dataBufferAppend(readNmtoken (isNames));
+ skipWhitespace();
+ }
+ dataBufferAppend(')');
+ }
- /**
- * Parse a notation type for an attribute.
- * <pre>
- * [58] NotationType ::= 'NOTATION' S '(' S? NameNtoks
- * (S? '|' S? name)* S? ')'
- * </pre>
- * <p>NOTE: the 'NOTATION' has already been read
- */
- private void parseNotationType ()
+ /**
+ * Parse a notation type for an attribute.
+ * <pre>
+ * [58] NotationType ::= 'NOTATION' S '(' S? NameNtoks
+ * (S? '|' S? name)* S? ')'
+ * </pre>
+ * <p>NOTE: the 'NOTATION' has already been read
+ */
+ private void parseNotationType()
throws Exception
- {
- requireWhitespace ();
- require ('(');
-
- parseEnumeration (true);
- }
-
-
- /**
- * Parse the default value for an attribute.
- * <pre>
- * [60] DefaultDecl ::= '#REQUIRED' | '#IMPLIED'
- * | (('#FIXED' S)? AttValue)
- * </pre>
- */
- private void parseDefault (
- String elementName,
- String name,
- String type,
- String enumer
- ) throws Exception
- {
- int valueType = ATTRIBUTE_DEFAULT_SPECIFIED;
- String value = null;
- int flags = LIT_ATTRIBUTE;
- boolean saved = expandPE;
- String defaultType = null;
-
- // LIT_ATTRIBUTE forces '<' checks now (ASAP) and turns whitespace
- // chars to spaces (doesn't matter when that's done if it doesn't
- // interfere with char refs expanding to whitespace).
-
- if (!skippedPE) {
- flags |= LIT_ENTITY_REF;
- if (handler.getFeature (SAXDriver.FEATURE + "string-interning")) {
- if ("CDATA" != type)
- flags |= LIT_NORMALIZE;
- } else {
- if (!"CDATA".equals(type))
- flags |= LIT_NORMALIZE;
- }
- }
-
- expandPE = false;
- if (tryRead ('#')) {
- if (tryRead ("FIXED")) {
- defaultType = "#FIXED";
- valueType = ATTRIBUTE_DEFAULT_FIXED;
- requireWhitespace ();
- value = readLiteral (flags);
- } else if (tryRead ("REQUIRED")) {
- defaultType = "#REQUIRED";
- valueType = ATTRIBUTE_DEFAULT_REQUIRED;
- } else if (tryRead ("IMPLIED")) {
- defaultType = "#IMPLIED";
- valueType = ATTRIBUTE_DEFAULT_IMPLIED;
- } else {
- error ("illegal keyword for attribute default value");
- }
- } else
- value = readLiteral (flags);
- expandPE = saved;
- setAttribute (elementName, name, type, enumer, value, valueType);
- if (handler.getFeature (SAXDriver.FEATURE + "string-interning")) {
- if ("ENUMERATION" == type)
- type = enumer;
- else if ("NOTATION" == type)
- type = "NOTATION " + enumer;
- } else {
- if ("ENUMERATION".equals(type))
- type = enumer;
- else if ("NOTATION".equals(type))
- type = "NOTATION " + enumer;
+ {
+ requireWhitespace();
+ require('(');
+
+ parseEnumeration(true);
}
- if (!skippedPE) handler.getDeclHandler ()
- .attributeDecl (elementName, name, type, defaultType, value);
- }
-
- /**
- * Parse a conditional section.
- * <pre>
- * [61] conditionalSect ::= includeSect || ignoreSect
- * [62] includeSect ::= '&lt;![' S? 'INCLUDE' S? '['
- * extSubsetDecl ']]&gt;'
- * [63] ignoreSect ::= '&lt;![' S? 'IGNORE' S? '['
- * ignoreSectContents* ']]&gt;'
- * [64] ignoreSectContents ::= Ignore
- * ('&lt;![' ignoreSectContents* ']]&gt;' Ignore )*
- * [65] Ignore ::= Char* - (Char* ( '&lt;![' | ']]&gt;') Char* )
- * </pre>
- * <p> NOTE: the '&gt;![' has already been read.
- */
- private void parseConditionalSect (char saved [])
+ /**
+ * Parse the default value for an attribute.
+ * <pre>
+ * [60] DefaultDecl ::= '#REQUIRED' | '#IMPLIED'
+ * | (('#FIXED' S)? AttValue)
+ * </pre>
+ */
+ private void parseDefault(String elementName, String name,
+ String type, String enumer)
throws Exception
- {
- skipWhitespace ();
- if (tryRead ("INCLUDE")) {
- skipWhitespace ();
- require ('[');
- // VC: Proper Conditional Section/PE Nesting
- if (readBuffer != saved)
- handler.verror ("Illegal Conditional Section/PE nesting");
- skipWhitespace ();
- while (!tryRead ("]]>")) {
- parseMarkupdecl ();
- skipWhitespace ();
- }
- } else if (tryRead ("IGNORE")) {
- skipWhitespace ();
- require ('[');
- // VC: Proper Conditional Section/PE Nesting
- if (readBuffer != saved)
- handler.verror ("Illegal Conditional Section/PE nesting");
- int nesting = 1;
- char c;
- expandPE = false;
- for (int nest = 1; nest > 0;) {
- c = readCh ();
- switch (c) {
- case '<':
- if (tryRead ("![")) {
- nest++;
- }
- case ']':
- if (tryRead ("]>")) {
- nest--;
- }
- }
- }
- expandPE = true;
- } else {
- error ("conditional section must begin with INCLUDE or IGNORE");
- }
- }
-
- private void parseCharRef ()
+ {
+ int valueType = ATTRIBUTE_DEFAULT_SPECIFIED;
+ String value = null;
+ int flags = LIT_ATTRIBUTE;
+ boolean saved = expandPE;
+ String defaultType = null;
+
+ // LIT_ATTRIBUTE forces '<' checks now (ASAP) and turns whitespace
+ // chars to spaces (doesn't matter when that's done if it doesn't
+ // interfere with char refs expanding to whitespace).
+
+ if (!skippedPE)
+ {
+ flags |= LIT_ENTITY_REF;
+ if (handler.stringInterning)
+ {
+ if ("CDATA" != type)
+ {
+ flags |= LIT_NORMALIZE;
+ }
+ }
+ else
+ {
+ if (!"CDATA".equals(type))
+ {
+ flags |= LIT_NORMALIZE;
+ }
+ }
+ }
+
+ expandPE = false;
+ if (tryRead('#'))
+ {
+ if (tryRead("FIXED"))
+ {
+ defaultType = "#FIXED";
+ valueType = ATTRIBUTE_DEFAULT_FIXED;
+ requireWhitespace();
+ value = readLiteral(flags);
+ }
+ else if (tryRead("REQUIRED"))
+ {
+ defaultType = "#REQUIRED";
+ valueType = ATTRIBUTE_DEFAULT_REQUIRED;
+ }
+ else if (tryRead("IMPLIED"))
+ {
+ defaultType = "#IMPLIED";
+ valueType = ATTRIBUTE_DEFAULT_IMPLIED;
+ }
+ else
+ {
+ error("illegal keyword for attribute default value");
+ }
+ }
+ else
+ {
+ value = readLiteral(flags);
+ }
+ expandPE = saved;
+ setAttribute(elementName, name, type, enumer, value, valueType);
+ if (handler.stringInterning)
+ {
+ if ("ENUMERATION" == type)
+ {
+ type = enumer;
+ }
+ else if ("NOTATION" == type)
+ {
+ type = "NOTATION " + enumer;
+ }
+ }
+ else
+ {
+ if ("ENUMERATION".equals(type))
+ {
+ type = enumer;
+ }
+ else if ("NOTATION".equals(type))
+ {
+ type = "NOTATION " + enumer;
+ }
+ }
+ if (!skippedPE)
+ {
+ handler.getDeclHandler().attributeDecl(elementName, name, type,
+ defaultType, value);
+ }
+ }
+
+ /**
+ * Parse a conditional section.
+ * <pre>
+ * [61] conditionalSect ::= includeSect || ignoreSect
+ * [62] includeSect ::= '&lt;![' S? 'INCLUDE' S? '['
+ * extSubsetDecl ']]&gt;'
+ * [63] ignoreSect ::= '&lt;![' S? 'IGNORE' S? '['
+ * ignoreSectContents* ']]&gt;'
+ * [64] ignoreSectContents ::= Ignore
+ * ('&lt;![' ignoreSectContents* ']]&gt;' Ignore )*
+ * [65] Ignore ::= Char* - (Char* ( '&lt;![' | ']]&gt;') Char* )
+ * </pre>
+ * <p> NOTE: the '&gt;![' has already been read.
+ */
+ private void parseConditionalSect(char[] saved)
+ throws Exception
+ {
+ skipWhitespace();
+ if (tryRead("INCLUDE"))
+ {
+ skipWhitespace();
+ require('[');
+ // VC: Proper Conditional Section/PE Nesting
+ if (readBuffer != saved)
+ {
+ handler.verror("Illegal Conditional Section/PE nesting");
+ }
+ skipWhitespace();
+ while (!tryRead("]]>"))
+ {
+ parseMarkupdecl();
+ skipWhitespace();
+ }
+ }
+ else if (tryRead("IGNORE"))
+ {
+ skipWhitespace();
+ require('[');
+ // VC: Proper Conditional Section/PE Nesting
+ if (readBuffer != saved)
+ {
+ handler.verror("Illegal Conditional Section/PE nesting");
+ }
+ int nesting = 1;
+ char c;
+ expandPE = false;
+ for (int nest = 1; nest > 0; )
+ {
+ c = readCh();
+ switch (c)
+ {
+ case '<':
+ if (tryRead("!["))
+ {
+ nest++;
+ }
+ case ']':
+ if (tryRead("]>"))
+ {
+ nest--;
+ }
+ }
+ }
+ expandPE = true;
+ }
+ else
+ {
+ error("conditional section must begin with INCLUDE or IGNORE");
+ }
+ }
+
+ private void parseCharRef()
throws SAXException, IOException
{
- parseCharRef (true /* do flushDataBuffer by default */);
+ parseCharRef(true /* do flushDataBuffer by default */);
}
/**
@@ -1830,1485 +2213,1717 @@ loop:
* </pre>
* <p>NOTE: the '&#' has already been read.
*/
- private void tryReadCharRef ()
- throws SAXException, IOException
+ private void tryReadCharRef()
+ throws SAXException, IOException
{
- int value = 0;
- char c;
-
- if (tryRead ('x')) {
+ int value = 0;
+ char c;
+
+ if (tryRead('x'))
+ {
loop1:
- while (true) {
- c = readCh ();
- int n;
- switch (c) {
- case '0': case '1': case '2': case '3': case '4':
- case '5': case '6': case '7': case '8': case '9':
- n = c - '0';
- break;
- case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
- n = (c - 'a') + 10;
- break;
- case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
- n = (c - 'A') + 10;
- break;
- case ';':
- break loop1;
- default:
- error ("illegal character in character reference", c, null);
- break loop1;
- }
- value *= 16;
- value += n;
- }
- } else {
+ while (true)
+ {
+ c = readCh();
+ if (c == ';')
+ {
+ break loop1;
+ }
+ else
+ {
+ int n = Character.digit(c, 16);
+ if (n == -1)
+ {
+ error("illegal character in character reference", c, null);
+ break loop1;
+ }
+ value *= 16;
+ value += n;
+ }
+ }
+ }
+ else
+ {
loop2:
- while (true) {
- c = readCh ();
- switch (c) {
- case '0': case '1': case '2': case '3': case '4':
- case '5': case '6': case '7': case '8': case '9':
- value *= 10;
- value += c - '0';
- break;
- case ';':
- break loop2;
- default:
- error ("illegal character in character reference", c, null);
- break loop2;
- }
- }
- }
-
- // check for character refs being legal XML
- if ((value < 0x0020
- && ! (value == '\n' || value == '\t' || value == '\r'))
- || (value >= 0xD800 && value <= 0xDFFF)
- || value == 0xFFFE || value == 0xFFFF
- || value > 0x0010ffff)
- error ("illegal XML character reference U+"
- + Integer.toHexString (value));
-
- // Check for surrogates: 00000000 0000xxxx yyyyyyyy zzzzzzzz
- // (1101|10xx|xxyy|yyyy + 1101|11yy|zzzz|zzzz:
- if (value > 0x0010ffff) {
- // too big for surrogate
- error ("character reference " + value + " is too large for UTF-16",
- new Integer (value).toString (), null);
- }
-
+ while (true)
+ {
+ c = readCh();
+ if (c == ';')
+ {
+ break loop2;
+ }
+ else
+ {
+ int n = Character.digit(c, 10);
+ if (n == -1)
+ {
+ error("illegal character in character reference", c, null);
+ break loop2;
+ }
+ value *= 10;
+ value += n;
+ }
+ }
+ }
+
+ // check for character refs being legal XML
+ if ((value < 0x0020
+ && ! (value == '\n' || value == '\t' || value == '\r'))
+ || (value >= 0xD800 && value <= 0xDFFF)
+ || value == 0xFFFE || value == 0xFFFF
+ || value > 0x0010ffff)
+ {
+ error("illegal XML character reference U+"
+ + Integer.toHexString(value));
+ }
+
+ // Check for surrogates: 00000000 0000xxxx yyyyyyyy zzzzzzzz
+ // (1101|10xx|xxyy|yyyy + 1101|11yy|zzzz|zzzz:
+ if (value > 0x0010ffff)
+ {
+ // too big for surrogate
+ error("character reference " + value + " is too large for UTF-16",
+ new Integer(value).toString(), null);
+ }
+
}
- /**
- * Read and interpret a character reference.
- * <pre>
- * [66] CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';'
- * </pre>
- * <p>NOTE: the '&#' has already been read.
- */
- private void parseCharRef (boolean doFlush)
+ /**
+ * Read and interpret a character reference.
+ * <pre>
+ * [66] CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';'
+ * </pre>
+ * <p>NOTE: the '&#' has already been read.
+ */
+ private void parseCharRef(boolean doFlush)
throws SAXException, IOException
- {
- int value = 0;
- char c;
-
- if (tryRead ('x')) {
+ {
+ int value = 0;
+ char c;
+
+ if (tryRead('x'))
+ {
loop1:
- while (true) {
- c = readCh ();
- int n;
- switch (c) {
- case '0': case '1': case '2': case '3': case '4':
- case '5': case '6': case '7': case '8': case '9':
- n = c - '0';
- break;
- case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
- n = (c - 'a') + 10;
- break;
- case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
- n = (c - 'A') + 10;
- break;
- case ';':
- break loop1;
- default:
- error ("illegal character in character reference", c, null);
- break loop1;
- }
- value *= 16;
- value += n;
- }
- } else {
+ while (true)
+ {
+ c = readCh();
+ if (c == ';')
+ {
+ break loop1;
+ }
+ else
+ {
+ int n = Character.digit(c, 16);
+ if (n == -1)
+ {
+ error("illegal character in character reference", c, null);
+ break loop1;
+ }
+ value *= 16;
+ value += n;
+ }
+ }
+ }
+ else
+ {
loop2:
- while (true) {
- c = readCh ();
- switch (c) {
- case '0': case '1': case '2': case '3': case '4':
- case '5': case '6': case '7': case '8': case '9':
- value *= 10;
- value += c - '0';
- break;
- case ';':
- break loop2;
- default:
- error ("illegal character in character reference", c, null);
- break loop2;
- }
- }
- }
-
- // check for character refs being legal XML
- if ((value < 0x0020
- && ! (value == '\n' || value == '\t' || value == '\r'))
- || (value >= 0xD800 && value <= 0xDFFF)
- || value == 0xFFFE || value == 0xFFFF
- || value > 0x0010ffff)
- error ("illegal XML character reference U+"
- + Integer.toHexString (value));
-
- // Check for surrogates: 00000000 0000xxxx yyyyyyyy zzzzzzzz
- // (1101|10xx|xxyy|yyyy + 1101|11yy|zzzz|zzzz:
- if (value <= 0x0000ffff) {
- // no surrogates needed
- dataBufferAppend ((char) value);
- } else if (value <= 0x0010ffff) {
- value -= 0x10000;
- // > 16 bits, surrogate needed
- dataBufferAppend ((char) (0xd800 | (value >> 10)));
- dataBufferAppend ((char) (0xdc00 | (value & 0x0003ff)));
- } else {
- // too big for surrogate
- error ("character reference " + value + " is too large for UTF-16",
- new Integer (value).toString (), null);
- }
- if (doFlush) dataBufferFlush ();
- }
-
-
- /**
- * Parse and expand an entity reference.
- * <pre>
- * [68] EntityRef ::= '&' Name ';'
- * </pre>
- * <p>NOTE: the '&amp;' has already been read.
- * @param externalAllowed External entities are allowed here.
- */
- private void parseEntityRef (boolean externalAllowed)
+ while (true)
+ {
+ c = readCh();
+ if (c == ';')
+ {
+ break loop2;
+ }
+ else
+ {
+ int n = Character.digit(c, 10);
+ if (n == -1)
+ {
+ error("illegal character in character reference", c, null);
+ break loop2;
+ }
+ value *= 10;
+ value += c - '0';
+ }
+ }
+ }
+
+ // check for character refs being legal XML
+ if ((value < 0x0020
+ && ! (value == '\n' || value == '\t' || value == '\r'))
+ || (value >= 0xD800 && value <= 0xDFFF)
+ || value == 0xFFFE || value == 0xFFFF
+ || value > 0x0010ffff)
+ {
+ error("illegal XML character reference U+"
+ + Integer.toHexString(value));
+ }
+
+ // Check for surrogates: 00000000 0000xxxx yyyyyyyy zzzzzzzz
+ // (1101|10xx|xxyy|yyyy + 1101|11yy|zzzz|zzzz:
+ if (value <= 0x0000ffff)
+ {
+ // no surrogates needed
+ dataBufferAppend((char) value);
+ }
+ else if (value <= 0x0010ffff)
+ {
+ value -= 0x10000;
+ // > 16 bits, surrogate needed
+ dataBufferAppend((char) (0xd800 | (value >> 10)));
+ dataBufferAppend((char) (0xdc00 | (value & 0x0003ff)));
+ }
+ else
+ {
+ // too big for surrogate
+ error("character reference " + value + " is too large for UTF-16",
+ new Integer(value).toString(), null);
+ }
+ if (doFlush)
+ {
+ dataBufferFlush();
+ }
+ }
+
+ /**
+ * Parse and expand an entity reference.
+ * <pre>
+ * [68] EntityRef ::= '&' Name ';'
+ * </pre>
+ * <p>NOTE: the '&amp;' has already been read.
+ * @param externalAllowed External entities are allowed here.
+ */
+ private void parseEntityRef(boolean externalAllowed)
throws SAXException, IOException
- {
- String name;
-
- name = readNmtoken (true);
- require (';');
- switch (getEntityType (name)) {
- case ENTITY_UNDECLARED:
- // NOTE: XML REC describes amazingly convoluted handling for
- // this case. Nothing as meaningful as being a WFness error
- // unless the processor might _legitimately_ not have seen a
- // declaration ... which is what this implements.
- String message;
-
- message = "reference to undeclared general entity " + name;
- if (skippedPE && !docIsStandalone) {
- handler.verror (message);
- // we don't know this entity, and it might be external...
- if (externalAllowed)
- handler.skippedEntity (name);
- } else
- error (message);
- break;
- case ENTITY_INTERNAL:
- pushString (name, getEntityValue (name));
-
- //workaround for possible input pop before marking
- //the buffer reading position
- char t = readCh ();
- unread (t);
- int bufferPosMark = readBufferPos;
-
- int end = readBufferPos + getEntityValue (name).length();
- for(int k = readBufferPos; k < end; k++){
- t = readCh ();
- if (t == '&'){
- t = readCh ();
- if (t == '#'){
- //try to match a character ref
- tryReadCharRef ();
-
- //everything has been read
- if (readBufferPos >= end)
- break;
- k = readBufferPos;
- continue;
- }
- else if (Character.isLetter(t)){
- //looks like an entity ref
- unread (t);
- readNmtoken (true);
- require (';');
-
- //everything has been read
- if (readBufferPos >= end)
- break;
- k = readBufferPos;
- continue;
- }
- error(" malformed entity reference");
- }
-
+ {
+ String name;
+
+ name = readNmtoken(true);
+ require(';');
+ switch (getEntityType(name))
+ {
+ case ENTITY_UNDECLARED:
+ // NOTE: XML REC describes amazingly convoluted handling for
+ // this case. Nothing as meaningful as being a WFness error
+ // unless the processor might _legitimately_ not have seen a
+ // declaration ... which is what this implements.
+ String message;
+
+ message = "reference to undeclared general entity " + name;
+ if (skippedPE && !docIsStandalone)
+ {
+ handler.verror(message);
+ // we don't know this entity, and it might be external...
+ if (externalAllowed)
+ {
+ handler.skippedEntity(name);
+ }
+ }
+ else
+ {
+ error(message);
+ }
+ break;
+ case ENTITY_INTERNAL:
+ pushString(name, getEntityValue(name));
+
+ //workaround for possible input pop before marking
+ //the buffer reading position
+ char t = readCh();
+ unread(t);
+ int bufferPosMark = readBufferPos;
+
+ int end = readBufferPos + getEntityValue(name).length();
+ for (int k = readBufferPos; k < end; k++)
+ {
+ t = readCh();
+ if (t == '&')
+ {
+ t = readCh();
+ if (t == '#')
+ {
+ //try to match a character ref
+ tryReadCharRef();
+
+ //everything has been read
+ if (readBufferPos >= end)
+ {
+ break;
+ }
+ k = readBufferPos;
+ continue;
+ }
+ else if (Character.isLetter(t))
+ {
+ //looks like an entity ref
+ unread(t);
+ readNmtoken(true);
+ require(';');
+
+ //everything has been read
+ if (readBufferPos >= end)
+ {
+ break;
+ }
+ k = readBufferPos;
+ continue;
+ }
+ error(" malformed entity reference");
+ }
+
}
- readBufferPos = bufferPosMark;
- break;
- case ENTITY_TEXT:
- if (externalAllowed) {
- pushURL (false, name, getEntityIds (name),
- null, null, null, true);
- } else {
- error ("reference to external entity in attribute value.",
- name, null);
- }
- break;
- case ENTITY_NDATA:
- if (externalAllowed) {
- error ("unparsed entity reference in content", name, null);
- } else {
- error ("reference to external entity in attribute value.",
- name, null);
- }
- break;
- default:
- throw new RuntimeException ();
- }
- }
-
-
- /**
- * Parse and expand a parameter entity reference.
- * <pre>
- * [69] PEReference ::= '%' Name ';'
- * </pre>
- * <p>NOTE: the '%' has already been read.
- */
- private void parsePEReference ()
+ readBufferPos = bufferPosMark;
+ break;
+ case ENTITY_TEXT:
+ if (externalAllowed)
+ {
+ pushURL(false, name, getEntityIds(name),
+ null, null, null, true);
+ }
+ else
+ {
+ error("reference to external entity in attribute value.",
+ name, null);
+ }
+ break;
+ case ENTITY_NDATA:
+ if (externalAllowed)
+ {
+ error("unparsed entity reference in content", name, null);
+ }
+ else
+ {
+ error("reference to external entity in attribute value.",
+ name, null);
+ }
+ break;
+ default:
+ throw new RuntimeException();
+ }
+ }
+
+ /**
+ * Parse and expand a parameter entity reference.
+ * <pre>
+ * [69] PEReference ::= '%' Name ';'
+ * </pre>
+ * <p>NOTE: the '%' has already been read.
+ */
+ private void parsePEReference()
throws SAXException, IOException
- {
- String name;
-
- name = "%" + readNmtoken (true);
- require (';');
- switch (getEntityType (name)) {
- case ENTITY_UNDECLARED:
- // VC: Entity Declared
- handler.verror ("reference to undeclared parameter entity " + name);
-
- // we should disable handling of all subsequent declarations
- // unless this is a standalone document (info discarded)
- break;
- case ENTITY_INTERNAL:
- if (inLiteral)
- pushString (name, getEntityValue (name));
- else
- pushString (name, ' ' + getEntityValue (name) + ' ');
- break;
- case ENTITY_TEXT:
- if (!inLiteral)
- pushString (null, " ");
- pushURL (true, name, getEntityIds (name), null, null, null, true);
- if (!inLiteral)
- pushString (null, " ");
- break;
- }
- }
-
- /**
- * Parse an entity declaration.
- * <pre>
- * [70] EntityDecl ::= GEDecl | PEDecl
- * [71] GEDecl ::= '&lt;!ENTITY' S Name S EntityDef S? '&gt;'
- * [72] PEDecl ::= '&lt;!ENTITY' S '%' S Name S PEDef S? '&gt;'
- * [73] EntityDef ::= EntityValue | (ExternalID NDataDecl?)
- * [74] PEDef ::= EntityValue | ExternalID
- * [75] ExternalID ::= 'SYSTEM' S SystemLiteral
- * | 'PUBLIC' S PubidLiteral S SystemLiteral
- * [76] NDataDecl ::= S 'NDATA' S Name
- * </pre>
- * <p>NOTE: the '&lt;!ENTITY' has already been read.
- */
- private void parseEntityDecl ()
+ {
+ String name;
+
+ name = "%" + readNmtoken(true);
+ require(';');
+ switch (getEntityType(name))
+ {
+ case ENTITY_UNDECLARED:
+ // VC: Entity Declared
+ handler.verror("reference to undeclared parameter entity " + name);
+
+ // we should disable handling of all subsequent declarations
+ // unless this is a standalone document (info discarded)
+ break;
+ case ENTITY_INTERNAL:
+ if (inLiteral)
+ {
+ pushString(name, getEntityValue(name));
+ }
+ else
+ {
+ pushString(name, ' ' + getEntityValue(name) + ' ');
+ }
+ break;
+ case ENTITY_TEXT:
+ if (!inLiteral)
+ {
+ pushString(null, " ");
+ }
+ pushURL(true, name, getEntityIds(name), null, null, null, true);
+ if (!inLiteral)
+ {
+ pushString(null, " ");
+ }
+ break;
+ }
+ }
+
+ /**
+ * Parse an entity declaration.
+ * <pre>
+ * [70] EntityDecl ::= GEDecl | PEDecl
+ * [71] GEDecl ::= '&lt;!ENTITY' S Name S EntityDef S? '&gt;'
+ * [72] PEDecl ::= '&lt;!ENTITY' S '%' S Name S PEDef S? '&gt;'
+ * [73] EntityDef ::= EntityValue | (ExternalID NDataDecl?)
+ * [74] PEDef ::= EntityValue | ExternalID
+ * [75] ExternalID ::= 'SYSTEM' S SystemLiteral
+ * | 'PUBLIC' S PubidLiteral S SystemLiteral
+ * [76] NDataDecl ::= S 'NDATA' S Name
+ * </pre>
+ * <p>NOTE: the '&lt;!ENTITY' has already been read.
+ */
+ private void parseEntityDecl()
throws Exception
- {
- boolean peFlag = false;
- int flags = 0;
-
- // Check for a parameter entity.
- expandPE = false;
- requireWhitespace ();
- if (tryRead ('%')) {
- peFlag = true;
- requireWhitespace ();
- }
- expandPE = true;
-
- // Read the entity name, and prepend
- // '%' if necessary.
- String name = readNmtoken (true);
- //NE08
- if (name.indexOf(':') >= 0)
- error ("Illegal character(':') in entity name ", name, null);
- if (peFlag) {
- name = "%" + name;
- }
-
- // Read the entity value.
- requireWhitespace ();
- char c = readCh ();
- unread (c);
- if (c == '"' || c == '\'') {
- // Internal entity ... replacement text has expanded refs
- // to characters and PEs, but not to general entities
- String value = readLiteral (flags);
- setInternalEntity (name, value);
- } else {
- // Read the external IDs
- String ids [] = readExternalIds (false, false);
-
- // Check for NDATA declaration.
- boolean white = tryWhitespace ();
- if (!peFlag && tryRead ("NDATA")) {
- if (!white)
- error ("whitespace required before NDATA");
- requireWhitespace ();
- String notationName = readNmtoken (true);
- if (!skippedPE) {
- setExternalEntity (name, ENTITY_NDATA, ids, notationName);
- handler.unparsedEntityDecl (name, ids, notationName);
- }
- } else if (!skippedPE) {
- setExternalEntity (name, ENTITY_TEXT, ids, null);
- handler.getDeclHandler ()
- .externalEntityDecl (name, ids [0],
- handler.resolveURIs ()
- // FIXME: ASSUMES not skipped
- // "false" forces error on bad URI
- ? handler.absolutize (ids [2], ids [1], false)
- : ids [1]);
- }
- }
-
- // Finish the declaration.
- skipWhitespace ();
- require ('>');
- }
+ {
+ boolean peFlag = false;
+ int flags = 0;
+
+ // Check for a parameter entity.
+ expandPE = false;
+ requireWhitespace();
+ if (tryRead('%'))
+ {
+ peFlag = true;
+ requireWhitespace();
+ }
+ expandPE = true;
+
+ // Read the entity name, and prepend
+ // '%' if necessary.
+ String name = readNmtoken(true);
+ //NE08
+ if (name.indexOf(':') >= 0)
+ {
+ error("Illegal character(':') in entity name ", name, null);
+ }
+ if (peFlag)
+ {
+ name = "%" + name;
+ }
+ // Read the entity value.
+ requireWhitespace();
+ char c = readCh();
+ unread (c);
+ if (c == '"' || c == '\'')
+ {
+ // Internal entity ... replacement text has expanded refs
+ // to characters and PEs, but not to general entities
+ String value = readLiteral(flags);
+ setInternalEntity(name, value);
+ }
+ else
+ {
+ // Read the external IDs
+ ExternalIdentifiers ids = readExternalIds(false, false);
+
+ // Check for NDATA declaration.
+ boolean white = tryWhitespace();
+ if (!peFlag && tryRead("NDATA"))
+ {
+ if (!white)
+ {
+ error("whitespace required before NDATA");
+ }
+ requireWhitespace();
+ String notationName = readNmtoken(true);
+ if (!skippedPE)
+ {
+ setExternalEntity(name, ENTITY_NDATA, ids, notationName);
+ handler.unparsedEntityDecl(name, ids.publicId, ids.systemId,
+ ids.baseUri, notationName);
+ }
+ }
+ else if (!skippedPE)
+ {
+ setExternalEntity(name, ENTITY_TEXT, ids, null);
+ handler.getDeclHandler()
+ .externalEntityDecl(name, ids.publicId,
+ handler.resolveURIs()
+ // FIXME: ASSUMES not skipped
+ // "false" forces error on bad URI
+ ? handler.absolutize(ids.baseUri,
+ ids.systemId,
+ false)
+ : ids.systemId);
+ }
+ }
+
+ // Finish the declaration.
+ skipWhitespace();
+ require('>');
+ }
- /**
- * Parse a notation declaration.
- * <pre>
- * [82] NotationDecl ::= '&lt;!NOTATION' S Name S
- * (ExternalID | PublicID) S? '&gt;'
- * [83] PublicID ::= 'PUBLIC' S PubidLiteral
- * </pre>
- * <P>NOTE: the '&lt;!NOTATION' has already been read.
- */
- private void parseNotationDecl ()
+ /**
+ * Parse a notation declaration.
+ * <pre>
+ * [82] NotationDecl ::= '&lt;!NOTATION' S Name S
+ * (ExternalID | PublicID) S? '&gt;'
+ * [83] PublicID ::= 'PUBLIC' S PubidLiteral
+ * </pre>
+ * <P>NOTE: the '&lt;!NOTATION' has already been read.
+ */
+ private void parseNotationDecl()
throws Exception
- {
- String nname, ids[];
-
-
- requireWhitespace ();
- nname = readNmtoken (true);
- //NE08
- if (nname.indexOf(':') >= 0)
- error ("Illegal character(':') in notation name ", nname, null);
- requireWhitespace ();
-
- // Read the external identifiers.
- ids = readExternalIds (true, false);
-
- // Register the notation.
- setNotation (nname, ids);
-
- skipWhitespace ();
- require ('>');
- }
+ {
+ String nname;
+ ExternalIdentifiers ids;
+
+ requireWhitespace();
+ nname = readNmtoken(true);
+ //NE08
+ if (nname.indexOf(':') >= 0)
+ {
+ error("Illegal character(':') in notation name ", nname, null);
+ }
+ requireWhitespace();
+ // Read the external identifiers.
+ ids = readExternalIds(true, false);
- /**
- * Parse character data.
- * <pre>
- * [14] CharData ::= [^&lt;&amp;]* - ([^&lt;&amp;]* ']]&gt;' [^&lt;&amp;]*)
- * </pre>
- */
- private void parseCharData ()
+ // Register the notation.
+ setNotation(nname, ids);
+
+ skipWhitespace();
+ require('>');
+ }
+
+ /**
+ * Parse character data.
+ * <pre>
+ * [14] CharData ::= [^&lt;&amp;]* - ([^&lt;&amp;]* ']]&gt;' [^&lt;&amp;]*)
+ * </pre>
+ */
+ private void parseCharData()
throws Exception
- {
- char c;
- int state = 0;
- boolean pureWhite = false;
-
- // assert (dataBufferPos == 0);
-
- // are we expecting pure whitespace? it might be dirty...
- if ((currentElementContent == CONTENT_ELEMENTS) && !isDirtyCurrentElement)
- pureWhite = true;
+ {
+ char c;
+ int state = 0;
+ boolean pureWhite = false;
- // always report right out of readBuffer
- // to minimize (pointless) buffer copies
- while (true) {
- int lineAugment = 0;
- int columnAugment = 0;
- int i;
+ // assert (dataBufferPos == 0);
+
+ // are we expecting pure whitespace? it might be dirty...
+ if ((currentElementContent == CONTENT_ELEMENTS) && !isDirtyCurrentElement)
+ {
+ pureWhite = true;
+ }
+ // always report right out of readBuffer
+ // to minimize (pointless) buffer copies
+ while (true)
+ {
+ int lineAugment = 0;
+ int columnAugment = 0;
+ int i;
+
loop:
- for (i = readBufferPos; i < readBufferLength; i++) {
- switch (c = readBuffer [i]) {
- case '\n':
- lineAugment++;
- columnAugment = 0;
- // pureWhite unmodified
- break;
- case '\r': // should not happen!!
- case '\t':
- case ' ':
- // pureWhite unmodified
- columnAugment++;
- break;
- case '&':
- case '<':
- columnAugment++;
- // pureWhite unmodified
- // CLEAN end of text sequence
- state = 1;
- break loop;
- case ']':
- // that's not a whitespace char, and
- // can not terminate pure whitespace either
- pureWhite = false;
- if ((i + 2) < readBufferLength) {
- if (readBuffer [i + 1] == ']'
- && readBuffer [i + 2] == '>') {
- // ERROR end of text sequence
- state = 2;
- break loop;
- }
- } else {
- // FIXME missing two end-of-buffer cases
- }
- columnAugment++;
- break;
- default:
- if ((c < 0x0020 || c > 0xFFFD)
- || ((c >= 0x007f) && (c <= 0x009f) && (c != 0x0085)
- && xmlVersion == XML_11))
- error ("illegal XML character U+"
- + Integer.toHexString (c));
- // that's not a whitespace char
- pureWhite = false;
- columnAugment++;
- }
- }
-
- // report text thus far
- if (lineAugment > 0) {
- line += lineAugment;
- column = columnAugment;
- } else {
- column += columnAugment;
- }
-
- // report characters/whitspace
- int length = i - readBufferPos;
-
- if (length != 0) {
- if (pureWhite)
- handler.ignorableWhitespace (readBuffer,
- readBufferPos, length);
- else
- handler.charData (readBuffer, readBufferPos, length);
- readBufferPos = i;
- }
-
- if (state != 0)
- break;
-
- // fill next buffer from this entity, or
- // pop stack and continue with previous entity
- unread (readCh ());
- }
- if (!pureWhite)
- isDirtyCurrentElement = true;
- // finish, maybe with error
- if (state != 1) // finish, no error
- error ("character data may not contain ']]>'");
- }
-
-
- //////////////////////////////////////////////////////////////////////
- // High-level reading and scanning methods.
- //////////////////////////////////////////////////////////////////////
-
- /**
- * Require whitespace characters.
- */
- private void requireWhitespace ()
+ for (i = readBufferPos; i < readBufferLength; i++)
+ {
+ switch (c = readBuffer[i])
+ {
+ case '\n':
+ lineAugment++;
+ columnAugment = 0;
+ // pureWhite unmodified
+ break;
+ case '\r': // should not happen!!
+ case '\t':
+ case ' ':
+ // pureWhite unmodified
+ columnAugment++;
+ break;
+ case '&':
+ case '<':
+ columnAugment++;
+ // pureWhite unmodified
+ // CLEAN end of text sequence
+ state = 1;
+ break loop;
+ case ']':
+ // that's not a whitespace char, and
+ // can not terminate pure whitespace either
+ pureWhite = false;
+ if ((i + 2) < readBufferLength)
+ {
+ if (readBuffer [i + 1] == ']'
+ && readBuffer [i + 2] == '>')
+ {
+ // ERROR end of text sequence
+ state = 2;
+ break loop;
+ }
+ }
+ else
+ {
+ // FIXME missing two end-of-buffer cases
+ }
+ columnAugment++;
+ break;
+ default:
+ if ((c < 0x0020 || c > 0xFFFD)
+ || ((c >= 0x007f) && (c <= 0x009f) && (c != 0x0085)
+ && xmlVersion == XML_11))
+ {
+ error("illegal XML character U+"
+ + Integer.toHexString(c));
+ }
+ // that's not a whitespace char
+ pureWhite = false;
+ columnAugment++;
+ }
+ }
+
+ // report text thus far
+ if (lineAugment > 0)
+ {
+ line += lineAugment;
+ column = columnAugment;
+ }
+ else
+ {
+ column += columnAugment;
+ }
+
+ // report characters/whitspace
+ int length = i - readBufferPos;
+
+ if (length != 0)
+ {
+ if (pureWhite)
+ {
+ handler.ignorableWhitespace(readBuffer,
+ readBufferPos, length);
+ }
+ else
+ {
+ handler.charData(readBuffer, readBufferPos, length);
+ }
+ readBufferPos = i;
+ }
+
+ if (state != 0)
+ {
+ break;
+ }
+
+ // fill next buffer from this entity, or
+ // pop stack and continue with previous entity
+ unread(readCh());
+ }
+ if (!pureWhite)
+ {
+ isDirtyCurrentElement = true;
+ }
+ // finish, maybe with error
+ if (state != 1) // finish, no error
+ {
+ error("character data may not contain ']]>'");
+ }
+ }
+
+ //////////////////////////////////////////////////////////////////////
+ // High-level reading and scanning methods.
+ //////////////////////////////////////////////////////////////////////
+
+ /**
+ * Require whitespace characters.
+ */
+ private void requireWhitespace()
throws SAXException, IOException
- {
- char c = readCh ();
- if (isWhitespace (c)) {
- skipWhitespace ();
- } else {
- error ("whitespace required", c, null);
- }
- }
-
+ {
+ char c = readCh();
+ if (isWhitespace(c))
+ {
+ skipWhitespace();
+ }
+ else
+ {
+ error("whitespace required", c, null);
+ }
+ }
- /**
- * Skip whitespace characters.
- * <pre>
- * [3] S ::= (#x20 | #x9 | #xd | #xa)+
- * </pre>
- */
- private void skipWhitespace ()
+ /**
+ * Skip whitespace characters.
+ * <pre>
+ * [3] S ::= (#x20 | #x9 | #xd | #xa)+
+ * </pre>
+ */
+ private void skipWhitespace()
throws SAXException, IOException
- {
- // Start with a little cheat. Most of
- // the time, the white space will fall
- // within the current read buffer; if
- // not, then fall through.
- if (USE_CHEATS) {
- int lineAugment = 0;
- int columnAugment = 0;
-
+ {
+ // Start with a little cheat. Most of
+ // the time, the white space will fall
+ // within the current read buffer; if
+ // not, then fall through.
+ if (USE_CHEATS)
+ {
+ int lineAugment = 0;
+ int columnAugment = 0;
+
loop:
- for (int i = readBufferPos; i < readBufferLength; i++) {
- switch (readBuffer [i]) {
- case ' ':
- case '\t':
- case '\r':
- columnAugment++;
- break;
- case '\n':
- lineAugment++;
- columnAugment = 0;
- break;
- case '%':
- if (expandPE)
- break loop;
- // else fall through...
- default:
- readBufferPos = i;
- if (lineAugment > 0) {
- line += lineAugment;
- column = columnAugment;
- } else {
- column += columnAugment;
- }
- return;
- }
- }
- }
-
- // OK, do it the slow way.
- char c = readCh ();
- while (isWhitespace (c)) {
- c = readCh ();
- }
- unread (c);
- }
-
-
- /**
- * Read a name or (when parsing an enumeration) name token.
- * <pre>
- * [5] Name ::= (Letter | '_' | ':') (NameChar)*
- * [7] Nmtoken ::= (NameChar)+
- * </pre>
- */
- private String readNmtoken (boolean isName)
+ for (int i = readBufferPos; i < readBufferLength; i++)
+ {
+ switch (readBuffer[i])
+ {
+ case ' ':
+ case '\t':
+ case '\r':
+ columnAugment++;
+ break;
+ case '\n':
+ lineAugment++;
+ columnAugment = 0;
+ break;
+ case '%':
+ if (expandPE)
+ {
+ break loop;
+ }
+ // else fall through...
+ default:
+ readBufferPos = i;
+ if (lineAugment > 0)
+ {
+ line += lineAugment;
+ column = columnAugment;
+ }
+ else
+ {
+ column += columnAugment;
+ }
+ return;
+ }
+ }
+ }
+
+ // OK, do it the slow way.
+ char c = readCh ();
+ while (isWhitespace(c))
+ {
+ c = readCh();
+ }
+ unread(c);
+ }
+
+ /**
+ * Read a name or (when parsing an enumeration) name token.
+ * <pre>
+ * [5] Name ::= (Letter | '_' | ':') (NameChar)*
+ * [7] Nmtoken ::= (NameChar)+
+ * </pre>
+ */
+ private String readNmtoken(boolean isName)
throws SAXException, IOException
- {
- char c;
-
- if (USE_CHEATS) {
-loop:
- for (int i = readBufferPos; i < readBufferLength; i++) {
- c = readBuffer [i];
- switch (c) {
- case '%':
- if (expandPE)
- break loop;
- // else fall through...
-
- // What may legitimately come AFTER a name/nmtoken?
- case '<': case '>': case '&':
- case ',': case '|': case '*': case '+': case '?':
- case ')':
- case '=':
- case '\'': case '"':
- case '[':
- case ' ': case '\t': case '\r': case '\n':
- case ';':
- case '/':
- int start = readBufferPos;
- if (i == start)
- error ("name expected", readBuffer [i], null);
- readBufferPos = i;
- return intern (readBuffer, start, i - start);
-
- default:
-// FIXME ... per IBM's OASIS test submission, these:
-// ? U+06dd
-// Combining U+309B
- //these switches are kind of ugly but at least we won't
- //have to go over the whole lits for each char
- if (isName && i == readBufferPos){
- char c2 = (char) (c & 0x00f0);
- switch (c & 0xff00){
- //starting with 01
- case 0x0100:
- switch (c2){
- case 0x0030:
- if (c == 0x0132 || c == 0x0133 || c == 0x013f)
- error ("Not a name start character, U+"
- + Integer.toHexString (c));
- break;
- case 0x0040:
- if (c == 0x0140 || c == 0x0149)
- error ("Not a name start character, U+"
- + Integer.toHexString (c));
- break;
- case 0x00c0:
- if (c == 0x01c4 || c == 0x01cc)
- error ("Not a name start character, U+"
- + Integer.toHexString (c));
- break;
- case 0x00f0:
- if (c == 0x01f1 || c == 0x01f3)
- error ("Not a name start character, U+"
- + Integer.toHexString (c));
- break;
- case 0x00b0:
- if (c == 0x01f1 || c == 0x01f3)
- error ("Not a name start character, U+"
- + Integer.toHexString (c));
- break;
- default:
- if (c == 0x017f)
- error ("Not a name start character, U+"
- + Integer.toHexString (c));
- }
-
- break;
- //starting with 11
- case 0x1100:
- switch (c2){
- case 0x0000:
- if (c == 0x1104 || c == 0x1108 ||
- c == 0x110a || c == 0x110d)
- error ("Not a name start character, U+"
- + Integer.toHexString (c));
- break;
- case 0x0030:
- if (c == 0x113b || c == 0x113f)
- error ("Not a name start character, U+"
- + Integer.toHexString (c));
- break;
- case 0x0040:
- if (c == 0x1141 || c == 0x114d
- || c == 0x114f )
- error ("Not a name start character, U+"
- + Integer.toHexString (c));
- break;
- case 0x0050:
- if (c == 0x1151 || c == 0x1156)
- error ("Not a name start character, U+"
- + Integer.toHexString (c));
- break;
- case 0x0060:
- if (c == 0x1162 || c == 0x1164
- || c == 0x1166 || c == 0x116b
- || c == 0x116f)
- error ("Not a name start character, U+"
- + Integer.toHexString (c));
- break;
- case 0x00b0:
- if (c == 0x11b6 || c == 0x11b9
- || c == 0x11bb || c == 0x116f)
- error ("Not a name start character, U+"
- + Integer.toHexString (c));
- break;
- default:
- if (c == 0x1174 || c == 0x119f
- || c == 0x11ac || c == 0x11c3
- || c == 0x11f1)
- error ("Not a name start character, U+"
- + Integer.toHexString (c));
- }
- break;
- default:
- if (c == 0x0e46 || c == 0x1011
- || c == 0x212f || c == 0x0587
- || c == 0x0230 )
- error ("Not a name start character, U+"
- + Integer.toHexString (c));
- }
- }
- // punt on exact tests from Appendix A; approximate
- // them using the Unicode ID start/part rules
- if (i == readBufferPos && isName) {
- if (!Character.isUnicodeIdentifierStart (c)
- && c != ':' && c != '_')
- error ("Not a name start character, U+"
- + Integer.toHexString (c));
- } else if (!Character.isUnicodeIdentifierPart (c)
- && c != '-' && c != ':' && c != '_' && c != '.'
- && !isExtender (c))
- error ("Not a name character, U+"
- + Integer.toHexString (c));
- }
- }
- }
-
- nameBufferPos = 0;
-
- // Read the first character.
+ {
+ char c;
+
+ if (USE_CHEATS)
+ {
loop:
- while (true) {
- c = readCh ();
- switch (c) {
- case '%':
- case '<': case '>': case '&':
- case ',': case '|': case '*': case '+': case '?':
- case ')':
- case '=':
- case '\'': case '"':
- case '[':
- case ' ': case '\t': case '\n': case '\r':
- case ';':
- case '/':
- unread (c);
- if (nameBufferPos == 0) {
- error ("name expected");
- }
- // punt on exact tests from Appendix A, but approximate them
- if (isName
- && !Character.isUnicodeIdentifierStart (
- nameBuffer [0])
- && ":_".indexOf (nameBuffer [0]) == -1)
- error ("Not a name start character, U+"
- + Integer.toHexString (nameBuffer [0]));
- String s = intern (nameBuffer, 0, nameBufferPos);
- nameBufferPos = 0;
- return s;
- default:
- // punt on exact tests from Appendix A, but approximate them
-
- if ((nameBufferPos != 0 || !isName)
- && !Character.isUnicodeIdentifierPart (c)
- && ":-_.".indexOf (c) == -1
- && !isExtender (c))
- error ("Not a name character, U+"
- + Integer.toHexString (c));
- if (nameBufferPos >= nameBuffer.length)
- nameBuffer =
- (char[]) extendArray (nameBuffer,
- nameBuffer.length, nameBufferPos);
- nameBuffer [nameBufferPos++] = c;
- }
- }
- }
-
- private static boolean isExtender (char c)
- {
- // [88] Extender ::= ...
- return c == 0x00b7 || c == 0x02d0 || c == 0x02d1 || c == 0x0387
- || c == 0x0640 || c == 0x0e46 || c == 0x0ec6 || c == 0x3005
- || (c >= 0x3031 && c <= 0x3035)
- || (c >= 0x309d && c <= 0x309e)
- || (c >= 0x30fc && c <= 0x30fe);
- }
+ for (int i = readBufferPos; i < readBufferLength; i++)
+ {
+ c = readBuffer[i];
+ switch (c)
+ {
+ case '%':
+ if (expandPE)
+ {
+ break loop;
+ }
+ // else fall through...
+
+ // What may legitimately come AFTER a name/nmtoken?
+ case '<': case '>': case '&':
+ case ',': case '|': case '*': case '+': case '?':
+ case ')':
+ case '=':
+ case '\'': case '"':
+ case '[':
+ case ' ': case '\t': case '\r': case '\n':
+ case ';':
+ case '/':
+ int start = readBufferPos;
+ if (i == start)
+ {
+ error("name expected", readBuffer[i], null);
+ }
+ readBufferPos = i;
+ return intern(readBuffer, start, i - start);
+
+ default:
+ // FIXME ... per IBM's OASIS test submission, these:
+ // ? U+06dd
+ // Combining U+309B
+ //these switches are kind of ugly but at least we won't
+ //have to go over the whole lits for each char
+ if (isName && i == readBufferPos)
+ {
+ char c2 = (char) (c & 0x00f0);
+ switch (c & 0xff00)
+ {
+ //starting with 01
+ case 0x0100:
+ switch (c2)
+ {
+ case 0x0030:
+ if (c == 0x0132 || c == 0x0133 || c == 0x013f)
+ {
+ error("Not a name start character, U+"
+ + Integer.toHexString(c));
+ }
+ break;
+ case 0x0040:
+ if (c == 0x0140 || c == 0x0149)
+ {
+ error("Not a name start character, U+"
+ + Integer.toHexString(c));
+ }
+ break;
+ case 0x00c0:
+ if (c == 0x01c4 || c == 0x01cc)
+ {
+ error("Not a name start character, U+"
+ + Integer.toHexString(c));
+ }
+ break;
+ case 0x00f0:
+ if (c == 0x01f1 || c == 0x01f3)
+ {
+ error("Not a name start character, U+"
+ + Integer.toHexString(c));
+ }
+ break;
+ case 0x00b0:
+ if (c == 0x01f1 || c == 0x01f3)
+ {
+ error("Not a name start character, U+"
+ + Integer.toHexString(c));
+ }
+ break;
+ default:
+ if (c == 0x017f)
+ {
+ error("Not a name start character, U+"
+ + Integer.toHexString(c));
+ }
+ }
+
+ break;
+ //starting with 11
+ case 0x1100:
+ switch (c2)
+ {
+ case 0x0000:
+ if (c == 0x1104 || c == 0x1108 ||
+ c == 0x110a || c == 0x110d)
+ {
+ error("Not a name start character, U+"
+ + Integer.toHexString(c));
+ }
+ break;
+ case 0x0030:
+ if (c == 0x113b || c == 0x113f)
+ {
+ error("Not a name start character, U+"
+ + Integer.toHexString(c));
+ }
+ break;
+ case 0x0040:
+ if (c == 0x1141 || c == 0x114d
+ || c == 0x114f )
+ {
+ error("Not a name start character, U+"
+ + Integer.toHexString(c));
+ }
+ break;
+ case 0x0050:
+ if (c == 0x1151 || c == 0x1156)
+ {
+ error("Not a name start character, U+"
+ + Integer.toHexString(c));
+ }
+ break;
+ case 0x0060:
+ if (c == 0x1162 || c == 0x1164
+ || c == 0x1166 || c == 0x116b
+ || c == 0x116f)
+ {
+ error("Not a name start character, U+"
+ + Integer.toHexString(c));
+ }
+ break;
+ case 0x00b0:
+ if (c == 0x11b6 || c == 0x11b9
+ || c == 0x11bb || c == 0x116f)
+ {
+ error("Not a name start character, U+"
+ + Integer.toHexString(c));
+ }
+ break;
+ default:
+ if (c == 0x1174 || c == 0x119f
+ || c == 0x11ac || c == 0x11c3
+ || c == 0x11f1)
+ {
+ error("Not a name start character, U+"
+ + Integer.toHexString(c));
+ }
+ }
+ break;
+ default:
+ if (c == 0x0e46 || c == 0x1011
+ || c == 0x212f || c == 0x0587
+ || c == 0x0230 )
+ {
+ error("Not a name start character, U+"
+ + Integer.toHexString(c));
+ }
+ }
+ }
+ // punt on exact tests from Appendix A; approximate
+ // them using the Unicode ID start/part rules
+ if (i == readBufferPos && isName)
+ {
+ if (!Character.isUnicodeIdentifierStart(c)
+ && c != ':' && c != '_')
+ {
+ error("Not a name start character, U+"
+ + Integer.toHexString(c));
+ }
+ }
+ else if (!Character.isUnicodeIdentifierPart(c)
+ && c != '-' && c != ':' && c != '_' && c != '.'
+ && !isExtender(c))
+ {
+ error("Not a name character, U+"
+ + Integer.toHexString(c));
+ }
+ }
+ }
+ }
+
+ nameBufferPos = 0;
+ // Read the first character.
+loop:
+ while (true)
+ {
+ c = readCh();
+ switch (c)
+ {
+ case '%':
+ case '<': case '>': case '&':
+ case ',': case '|': case '*': case '+': case '?':
+ case ')':
+ case '=':
+ case '\'': case '"':
+ case '[':
+ case ' ': case '\t': case '\n': case '\r':
+ case ';':
+ case '/':
+ unread(c);
+ if (nameBufferPos == 0)
+ {
+ error ("name expected");
+ }
+ // punt on exact tests from Appendix A, but approximate them
+ if (isName
+ && !Character.isUnicodeIdentifierStart(nameBuffer[0])
+ && ":_".indexOf(nameBuffer[0]) == -1)
+ {
+ error("Not a name start character, U+"
+ + Integer.toHexString(nameBuffer[0]));
+ }
+ String s = intern(nameBuffer, 0, nameBufferPos);
+ nameBufferPos = 0;
+ return s;
+ default:
+ // punt on exact tests from Appendix A, but approximate them
+
+ if ((nameBufferPos != 0 || !isName)
+ && !Character.isUnicodeIdentifierPart(c)
+ && ":-_.".indexOf(c) == -1
+ && !isExtender(c))
+ {
+ error("Not a name character, U+"
+ + Integer.toHexString(c));
+ }
+ if (nameBufferPos >= nameBuffer.length)
+ {
+ nameBuffer =
+ (char[]) extendArray(nameBuffer,
+ nameBuffer.length, nameBufferPos);
+ }
+ nameBuffer[nameBufferPos++] = c;
+ }
+ }
+ }
+
+ private static boolean isExtender(char c)
+ {
+ // [88] Extender ::= ...
+ return c == 0x00b7 || c == 0x02d0 || c == 0x02d1 || c == 0x0387
+ || c == 0x0640 || c == 0x0e46 || c == 0x0ec6 || c == 0x3005
+ || (c >= 0x3031 && c <= 0x3035)
+ || (c >= 0x309d && c <= 0x309e)
+ || (c >= 0x30fc && c <= 0x30fe);
+ }
- /**
- * Read a literal. With matching single or double quotes as
- * delimiters (and not embedded!) this is used to parse:
- * <pre>
- * [9] EntityValue ::= ... ([^%&amp;] | PEReference | Reference)* ...
- * [10] AttValue ::= ... ([^<&] | Reference)* ...
- * [11] SystemLiteral ::= ... (URLchar - "'")* ...
- * [12] PubidLiteral ::= ... (PubidChar - "'")* ...
- * </pre>
- * as well as the quoted strings in XML and text declarations
- * (for version, encoding, and standalone) which have their
- * own constraints.
- */
- private String readLiteral (int flags)
+ /**
+ * Read a literal. With matching single or double quotes as
+ * delimiters (and not embedded!) this is used to parse:
+ * <pre>
+ * [9] EntityValue ::= ... ([^%&amp;] | PEReference | Reference)* ...
+ * [10] AttValue ::= ... ([^<&] | Reference)* ...
+ * [11] SystemLiteral ::= ... (URLchar - "'")* ...
+ * [12] PubidLiteral ::= ... (PubidChar - "'")* ...
+ * </pre>
+ * as well as the quoted strings in XML and text declarations
+ * (for version, encoding, and standalone) which have their
+ * own constraints.
+ */
+ private String readLiteral(int flags)
throws SAXException, IOException
- {
- char delim, c;
- int startLine = line;
- boolean saved = expandPE;
- boolean savedReport = doReport;
-
- // Find the first delimiter.
- delim = readCh ();
- if (delim != '"' && delim != '\'') {
- error ("expected '\"' or \"'\"", delim, null);
- return null;
- }
- inLiteral = true;
- if ((flags & LIT_DISABLE_PE) != 0)
- expandPE = false;
- doReport = false;
-
- // Each level of input source has its own buffer; remember
- // ours, so we won't read the ending delimiter from any
- // other input source, regardless of entity processing.
- char ourBuf [] = readBuffer;
-
- // Read the literal.
- try {
- c = readCh ();
- boolean ampRead = false;
+ {
+ char delim, c;
+ int startLine = line;
+ boolean saved = expandPE;
+ boolean savedReport = doReport;
+
+ // Find the first delimiter.
+ delim = readCh();
+ if (delim != '"' && delim != '\'')
+ {
+ error("expected '\"' or \"'\"", delim, null);
+ return null;
+ }
+ inLiteral = true;
+ if ((flags & LIT_DISABLE_PE) != 0)
+ {
+ expandPE = false;
+ }
+ doReport = false;
+
+ // Each level of input source has its own buffer; remember
+ // ours, so we won't read the ending delimiter from any
+ // other input source, regardless of entity processing.
+ char[] ourBuf = readBuffer;
+
+ // Read the literal.
+ try
+ {
+ c = readCh();
+ boolean ampRead = false;
loop:
- while (! (c == delim && readBuffer == ourBuf)) {
- switch (c) {
- // attributes and public ids are normalized
- // in almost the same ways
- case '\n':
- case '\r':
- if ((flags & (LIT_ATTRIBUTE | LIT_PUBID)) != 0)
- c = ' ';
- break;
- case '\t':
- if ((flags & LIT_ATTRIBUTE) != 0)
- c = ' ';
- break;
- case '&':
- c = readCh ();
- // Char refs are expanded immediately, except for
- // all the cases where it's deferred.
- if (c == '#') {
- if ((flags & LIT_DISABLE_CREF) != 0) {
- dataBufferAppend ('&');
- break;
- }
- parseCharRef (false /* Do not do flushDataBuffer */);
-
- // exotic WFness risk: this is an entity literal,
- // dataBuffer [dataBufferPos - 1] == '&', and
- // following chars are a _partial_ entity/char ref
-
- // It looks like an entity ref ...
- } else {
- unread (c);
- // Expand it?
- if ((flags & LIT_ENTITY_REF) > 0) {
- parseEntityRef (false);
- if (String.valueOf (readBuffer).equals("&#38;"))
- ampRead = true;
+ while (! (c == delim && readBuffer == ourBuf))
+ {
+ switch (c)
+ {
+ // attributes and public ids are normalized
+ // in almost the same ways
+ case '\n':
+ case '\r':
+ if ((flags & (LIT_ATTRIBUTE | LIT_PUBID)) != 0)
+ {
+ c = ' ';
+ }
+ break;
+ case '\t':
+ if ((flags & LIT_ATTRIBUTE) != 0)
+ {
+ c = ' ';
+ }
+ break;
+ case '&':
+ c = readCh();
+ // Char refs are expanded immediately, except for
+ // all the cases where it's deferred.
+ if (c == '#')
+ {
+ if ((flags & LIT_DISABLE_CREF) != 0)
+ {
+ dataBufferAppend('&');
+ break;
+ }
+ parseCharRef(false /* Do not do flushDataBuffer */);
+
+ // exotic WFness risk: this is an entity literal,
+ // dataBuffer [dataBufferPos - 1] == '&', and
+ // following chars are a _partial_ entity/char ref
+
+ // It looks like an entity ref ...
+ }
+ else
+ {
+ unread(c);
+ // Expand it?
+ if ((flags & LIT_ENTITY_REF) > 0)
+ {
+ parseEntityRef(false);
+ if (String.valueOf(readBuffer).equals("&#38;"))
+ {
+ ampRead = true;
+ }
//Is it just data?
- } else if ((flags & LIT_DISABLE_EREF) != 0) {
- dataBufferAppend ('&');
-
- // OK, it will be an entity ref -- expanded later.
- } else {
- String name = readNmtoken (true);
- require (';');
- dataBufferAppend ('&');
- dataBufferAppend (name);
- dataBufferAppend (';');
- }
- }
- c = readCh ();
- continue loop;
-
- case '<':
- // and why? Perhaps so "&foo;" expands the same
- // inside and outside an attribute?
- if ((flags & LIT_ATTRIBUTE) != 0)
- error ("attribute values may not contain '<'");
- break;
-
- // We don't worry about case '%' and PE refs, readCh does.
-
- default:
- break;
- }
- dataBufferAppend (c);
- c = readCh ();
- }
- } catch (EOFException e) {
- error ("end of input while looking for delimiter (started on line "
- + startLine + ')', null, new Character (delim).toString ());
- }
- inLiteral = false;
- expandPE = saved;
- doReport = savedReport;
-
- // Normalise whitespace if necessary.
- if ((flags & LIT_NORMALIZE) > 0) {
- dataBufferNormalize ();
- }
-
- // Return the value.
- return dataBufferToString ();
- }
-
-
- /**
- * Try reading external identifiers.
- * A system identifier is not required for notations.
- * @param inNotation Are we parsing a notation decl?
- * @param isSubset Parsing external subset decl (may be omitted)?
- * @return A three-member String array containing the identifiers,
- * or nulls. Order: public, system, baseURI.
- */
- private String[] readExternalIds (boolean inNotation, boolean isSubset)
+ }
+ else if ((flags & LIT_DISABLE_EREF) != 0)
+ {
+ dataBufferAppend('&');
+
+ // OK, it will be an entity ref -- expanded later.
+ }
+ else
+ {
+ String name = readNmtoken(true);
+ require(';');
+ dataBufferAppend('&');
+ dataBufferAppend(name);
+ dataBufferAppend(';');
+ }
+ }
+ c = readCh();
+ continue loop;
+
+ case '<':
+ // and why? Perhaps so "&foo;" expands the same
+ // inside and outside an attribute?
+ if ((flags & LIT_ATTRIBUTE) != 0)
+ {
+ error("attribute values may not contain '<'");
+ }
+ break;
+
+ // We don't worry about case '%' and PE refs, readCh does.
+
+ default:
+ break;
+ }
+ dataBufferAppend(c);
+ c = readCh();
+ }
+ }
+ catch (EOFException e)
+ {
+ error("end of input while looking for delimiter (started on line "
+ + startLine + ')', null, new Character(delim).toString());
+ }
+ inLiteral = false;
+ expandPE = saved;
+ doReport = savedReport;
+
+ // Normalise whitespace if necessary.
+ if ((flags & LIT_NORMALIZE) > 0)
+ {
+ dataBufferNormalize();
+ }
+
+ // Return the value.
+ return dataBufferToString();
+ }
+
+ /**
+ * Try reading external identifiers.
+ * A system identifier is not required for notations.
+ * @param inNotation Are we parsing a notation decl?
+ * @param isSubset Parsing external subset decl (may be omitted)?
+ * @return A three-member String array containing the identifiers,
+ * or nulls. Order: public, system, baseURI.
+ */
+ private ExternalIdentifiers readExternalIds(boolean inNotation,
+ boolean isSubset)
throws Exception
- {
- char c;
- String ids[] = new String [3];
- int flags = LIT_DISABLE_CREF | LIT_DISABLE_PE | LIT_DISABLE_EREF;
-
- if (tryRead ("PUBLIC")) {
- requireWhitespace ();
- ids [0] = readLiteral (LIT_NORMALIZE | LIT_PUBID | flags);
- if (inNotation) {
- skipWhitespace ();
- c = readCh ();
- unread (c);
- if (c == '"' || c == '\'') {
- ids [1] = readLiteral (flags);
- }
- } else {
- requireWhitespace ();
- ids [1] = readLiteral (flags);
- }
-
- for (int i = 0; i < ids [0].length (); i++) {
- c = ids [0].charAt (i);
- if (c >= 'a' && c <= 'z')
- continue;
- if (c >= 'A' && c <= 'Z')
- continue;
- if (" \r\n0123456789-' ()+,./:=?;!*#@$_%".indexOf (c) != -1)
- continue;
- error ("illegal PUBLIC id character U+"
- + Integer.toHexString (c));
- }
- } else if (tryRead ("SYSTEM")) {
- requireWhitespace ();
- ids [1] = readLiteral (flags);
- } else if (!isSubset)
- error ("missing SYSTEM or PUBLIC keyword");
-
- if (ids [1] != null) {
- if (ids [1].indexOf ('#') != -1)
- handler.verror ("SYSTEM id has a URI fragment: " + ids [1]);
- ids [2] = handler.getSystemId ();
- if (ids [2] == null)
- handler.warn ("No base URI; hope URI is absolute: "
- + ids [1]);
- }
-
- return ids;
- }
-
-
- /**
- * Test if a character is whitespace.
- * <pre>
- * [3] S ::= (#x20 | #x9 | #xd | #xa)+
- * </pre>
- * @param c The character to test.
- * @return true if the character is whitespace.
- */
- private final boolean isWhitespace (char c)
- {
- if (c > 0x20)
- return false;
- if (c == 0x20 || c == 0x0a || c == 0x09 || c == 0x0d)
- return true;
- return false; // illegal ...
- }
-
-
- //////////////////////////////////////////////////////////////////////
- // Utility routines.
- //////////////////////////////////////////////////////////////////////
-
-
- /**
- * Add a character to the data buffer.
- */
- private void dataBufferAppend (char c)
- {
- // Expand buffer if necessary.
- if (dataBufferPos >= dataBuffer.length)
- dataBuffer =
- (char[]) extendArray (dataBuffer,
- dataBuffer.length, dataBufferPos);
- dataBuffer [dataBufferPos++] = c;
- }
-
-
- /**
- * Add a string to the data buffer.
- */
- private void dataBufferAppend (String s)
- {
- dataBufferAppend (s.toCharArray (), 0, s.length ());
- }
-
+ {
+ char c;
+ ExternalIdentifiers ids = new ExternalIdentifiers();
+ int flags = LIT_DISABLE_CREF | LIT_DISABLE_PE | LIT_DISABLE_EREF;
+
+ if (tryRead("PUBLIC"))
+ {
+ requireWhitespace();
+ ids.publicId = readLiteral(LIT_NORMALIZE | LIT_PUBID | flags);
+ if (inNotation)
+ {
+ skipWhitespace();
+ c = readCh();
+ unread(c);
+ if (c == '"' || c == '\'')
+ {
+ ids.systemId = readLiteral(flags);
+ }
+ }
+ else
+ {
+ requireWhitespace();
+ ids.systemId = readLiteral(flags);
+ }
+
+ for (int i = 0; i < ids.publicId.length(); i++)
+ {
+ c = ids.publicId.charAt(i);
+ if (c >= 'a' && c <= 'z')
+ {
+ continue;
+ }
+ if (c >= 'A' && c <= 'Z')
+ {
+ continue;
+ }
+ if (" \r\n0123456789-' ()+,./:=?;!*#@$_%".indexOf(c) != -1)
+ {
+ continue;
+ }
+ error("illegal PUBLIC id character U+"
+ + Integer.toHexString(c));
+ }
+ }
+ else if (tryRead("SYSTEM"))
+ {
+ requireWhitespace();
+ ids.systemId = readLiteral(flags);
+ }
+ else if (!isSubset)
+ {
+ error("missing SYSTEM or PUBLIC keyword");
+ }
+
+ if (ids.systemId != null)
+ {
+ if (ids.systemId.indexOf('#') != -1)
+ {
+ handler.verror("SYSTEM id has an URI fragment: " + ids.systemId);
+ }
+ ids.baseUri = handler.getSystemId();
+ if (ids.baseUri == null && uriWarnings)
+ {
+ handler.warn("No base URI; hope URI is absolute: "
+ + ids.systemId);
+ }
+ }
+
+ return ids;
+ }
- /**
- * Append (part of) a character array to the data buffer.
- */
- private void dataBufferAppend (char ch[], int start, int length)
- {
- dataBuffer = (char[])
- extendArray (dataBuffer, dataBuffer.length,
- dataBufferPos + length);
+ /**
+ * Test if a character is whitespace.
+ * <pre>
+ * [3] S ::= (#x20 | #x9 | #xd | #xa)+
+ * </pre>
+ * @param c The character to test.
+ * @return true if the character is whitespace.
+ */
+ private final boolean isWhitespace(char c)
+ {
+ if (c > 0x20)
+ {
+ return false;
+ }
+ if (c == 0x20 || c == 0x0a || c == 0x09 || c == 0x0d)
+ {
+ return true;
+ }
+ return false; // illegal ...
+ }
- System.arraycopy (ch, start, dataBuffer, dataBufferPos, length);
- dataBufferPos += length;
- }
+ //////////////////////////////////////////////////////////////////////
+ // Utility routines.
+ //////////////////////////////////////////////////////////////////////
+
+ /**
+ * Add a character to the data buffer.
+ */
+ private void dataBufferAppend(char c)
+ {
+ // Expand buffer if necessary.
+ if (dataBufferPos >= dataBuffer.length)
+ {
+ dataBuffer = (char[]) extendArray(dataBuffer,
+ dataBuffer.length, dataBufferPos);
+ }
+ dataBuffer[dataBufferPos++] = c;
+ }
+ /**
+ * Add a string to the data buffer.
+ */
+ private void dataBufferAppend(String s)
+ {
+ dataBufferAppend(s.toCharArray(), 0, s.length());
+ }
- /**
- * Normalise space characters in the data buffer.
- */
- private void dataBufferNormalize ()
- {
- int i = 0;
- int j = 0;
- int end = dataBufferPos;
-
- // Skip spaces at the start.
- while (j < end && dataBuffer [j] == ' ') {
- j++;
- }
-
- // Skip whitespace at the end.
- while (end > j && dataBuffer [end - 1] == ' ') {
- end --;
- }
-
- // Start copying to the left.
- while (j < end) {
-
- char c = dataBuffer [j++];
-
- // Normalise all other spaces to
- // a single space.
- if (c == ' ') {
- while (j < end && dataBuffer [j++] == ' ')
- continue;
- dataBuffer [i++] = ' ';
- dataBuffer [i++] = dataBuffer [j - 1];
- } else {
- dataBuffer [i++] = c;
- }
- }
-
- // The new length is <= the old one.
- dataBufferPos = i;
- }
+ /**
+ * Append (part of) a character array to the data buffer.
+ */
+ private void dataBufferAppend(char[] ch, int start, int length)
+ {
+ dataBuffer = (char[]) extendArray(dataBuffer, dataBuffer.length,
+ dataBufferPos + length);
+
+ System.arraycopy(ch, start, dataBuffer, dataBufferPos, length);
+ dataBufferPos += length;
+ }
+ /**
+ * Normalise space characters in the data buffer.
+ */
+ private void dataBufferNormalize()
+ {
+ int i = 0;
+ int j = 0;
+ int end = dataBufferPos;
+
+ // Skip spaces at the start.
+ while (j < end && dataBuffer[j] == ' ')
+ {
+ j++;
+ }
+
+ // Skip whitespace at the end.
+ while (end > j && dataBuffer[end - 1] == ' ')
+ {
+ end --;
+ }
- /**
- * Convert the data buffer to a string.
- */
- private String dataBufferToString ()
- {
- String s = new String (dataBuffer, 0, dataBufferPos);
- dataBufferPos = 0;
- return s;
- }
+ // Start copying to the left.
+ while (j < end)
+ {
+
+ char c = dataBuffer[j++];
+
+ // Normalise all other spaces to
+ // a single space.
+ if (c == ' ')
+ {
+ while (j < end && dataBuffer[j++] == ' ')
+ {
+ continue;
+ }
+ dataBuffer[i++] = ' ';
+ dataBuffer[i++] = dataBuffer[j - 1];
+ }
+ else
+ {
+ dataBuffer[i++] = c;
+ }
+ }
+
+ // The new length is <= the old one.
+ dataBufferPos = i;
+ }
+ /**
+ * Convert the data buffer to a string.
+ */
+ private String dataBufferToString()
+ {
+ String s = new String(dataBuffer, 0, dataBufferPos);
+ dataBufferPos = 0;
+ return s;
+ }
- /**
- * Flush the contents of the data buffer to the handler, as
- * appropriate, and reset the buffer for new input.
- */
- private void dataBufferFlush ()
+ /**
+ * Flush the contents of the data buffer to the handler, as
+ * appropriate, and reset the buffer for new input.
+ */
+ private void dataBufferFlush()
throws SAXException
- {
- if (currentElementContent == CONTENT_ELEMENTS
- && dataBufferPos > 0
- && !inCDATA
- ) {
- // We can't just trust the buffer to be whitespace, there
- // are (error) cases when it isn't
- for (int i = 0; i < dataBufferPos; i++) {
- if (!isWhitespace (dataBuffer [i])) {
- handler.charData (dataBuffer, 0, dataBufferPos);
- dataBufferPos = 0;
- }
- }
- if (dataBufferPos > 0) {
- handler.ignorableWhitespace (dataBuffer, 0, dataBufferPos);
- dataBufferPos = 0;
- }
- } else if (dataBufferPos > 0) {
- handler.charData (dataBuffer, 0, dataBufferPos);
- dataBufferPos = 0;
- }
- }
-
+ {
+ if (currentElementContent == CONTENT_ELEMENTS
+ && dataBufferPos > 0
+ && !inCDATA)
+ {
+ // We can't just trust the buffer to be whitespace, there
+ // are (error) cases when it isn't
+ for (int i = 0; i < dataBufferPos; i++)
+ {
+ if (!isWhitespace(dataBuffer[i]))
+ {
+ handler.charData(dataBuffer, 0, dataBufferPos);
+ dataBufferPos = 0;
+ }
+ }
+ if (dataBufferPos > 0)
+ {
+ handler.ignorableWhitespace(dataBuffer, 0, dataBufferPos);
+ dataBufferPos = 0;
+ }
+ }
+ else if (dataBufferPos > 0)
+ {
+ handler.charData(dataBuffer, 0, dataBufferPos);
+ dataBufferPos = 0;
+ }
+ }
- /**
- * Require a string to appear, or throw an exception.
- * <p><em>Precondition:</em> Entity expansion is not required.
- * <p><em>Precondition:</em> data buffer has no characters that
- * will get sent to the application.
- */
- private void require (String delim)
+ /**
+ * Require a string to appear, or throw an exception.
+ * <p><em>Precondition:</em> Entity expansion is not required.
+ * <p><em>Precondition:</em> data buffer has no characters that
+ * will get sent to the application.
+ */
+ private void require(String delim)
throws SAXException, IOException
- {
- int length = delim.length ();
- char ch [];
-
- if (length < dataBuffer.length) {
- ch = dataBuffer;
- delim.getChars (0, length, ch, 0);
- } else
- ch = delim.toCharArray ();
-
- if (USE_CHEATS
- && length <= (readBufferLength - readBufferPos)) {
- int offset = readBufferPos;
-
- for (int i = 0; i < length; i++, offset++)
- if (ch [i] != readBuffer [offset])
- error ("required string", null, delim);
- readBufferPos = offset;
-
- } else {
- for (int i = 0; i < length; i++)
- require (ch [i]);
- }
- }
-
+ {
+ int length = delim.length();
+ char[] ch;
+
+ if (length < dataBuffer.length)
+ {
+ ch = dataBuffer;
+ delim.getChars(0, length, ch, 0);
+ }
+ else
+ {
+ ch = delim.toCharArray();
+ }
+
+ if (USE_CHEATS && length <= (readBufferLength - readBufferPos))
+ {
+ int offset = readBufferPos;
+
+ for (int i = 0; i < length; i++, offset++)
+ {
+ if (ch[i] != readBuffer[offset])
+ {
+ error ("required string", null, delim);
+ }
+ }
+ readBufferPos = offset;
+
+ }
+ else
+ {
+ for (int i = 0; i < length; i++)
+ {
+ require(ch[i]);
+ }
+ }
+ }
- /**
- * Require a character to appear, or throw an exception.
- */
- private void require (char delim)
+ /**
+ * Require a character to appear, or throw an exception.
+ */
+ private void require(char delim)
throws SAXException, IOException
- {
- char c = readCh ();
-
- if (c != delim) {
- error ("required character", c, new Character (delim).toString ());
- }
- }
-
-
- /**
- * Create an interned string from a character array.
- * &AElig;lfred uses this method to create an interned version
- * of all names and name tokens, so that it can test equality
- * with <code>==</code> instead of <code>String.equals ()</code>.
- *
- * <p>This is much more efficient than constructing a non-interned
- * string first, and then interning it.
- *
- * @param ch an array of characters for building the string.
- * @param start the starting position in the array.
- * @param length the number of characters to place in the string.
- * @return an interned string.
- * @see #intern (String)
- * @see java.lang.String#intern
- */
- public String intern (char ch[], int start, int length)
- {
- int index = 0;
- int hash = 0;
- Object bucket [];
-
- // Generate a hash code. This is a widely used string hash,
- // often attributed to Brian Kernighan.
- for (int i = start; i < start + length; i++)
- hash = 31 * hash + ch [i];
- hash = (hash & 0x7fffffff) % SYMBOL_TABLE_LENGTH;
-
- // Get the bucket -- consists of {array,String} pairs
- if ((bucket = symbolTable [hash]) == null) {
- // first string in this bucket
- bucket = new Object [8];
-
- // Search for a matching tuple, and
- // return the string if we find one.
- } else {
- while (index < bucket.length) {
- char chFound [] = (char []) bucket [index];
-
- // Stop when we hit an empty entry.
- if (chFound == null)
- break;
-
- // If they're the same length, check for a match.
- if (chFound.length == length) {
- for (int i = 0; i < chFound.length; i++) {
- // continue search on failure
- if (ch [start + i] != chFound [i]) {
- break;
- } else if (i == length - 1) {
- // That's it, we have a match!
- return (String) bucket [index + 1];
- }
- }
- }
- index += 2;
- }
- // Not found -- we'll have to add it.
-
- // Do we have to grow the bucket?
- bucket = (Object []) extendArray (bucket, bucket.length, index);
- }
- symbolTable [hash] = bucket;
-
- // OK, add it to the end of the bucket -- "local" interning.
- // Intern "globally" to let applications share interning benefits.
- // That is, "!=" and "==" work on our strings, not just equals().
- String s = new String (ch, start, length).intern ();
- bucket [index] = s.toCharArray ();
- bucket [index + 1] = s;
- return s;
- }
-
- /**
- * Ensure the capacity of an array, allocating a new one if
- * necessary. Usually extends only for name hash collisions.
- */
- private Object extendArray (Object array, int currentSize, int requiredSize)
- {
- if (requiredSize < currentSize) {
- return array;
- } else {
- Object newArray = null;
- int newSize = currentSize * 2;
-
- if (newSize <= requiredSize)
- newSize = requiredSize + 1;
-
- if (array instanceof char[])
- newArray = new char [newSize];
- else if (array instanceof Object[])
- newArray = new Object [newSize];
- else
- throw new RuntimeException ();
-
- System.arraycopy (array, 0, newArray, 0, currentSize);
- return newArray;
- }
- }
-
-
- //////////////////////////////////////////////////////////////////////
- // XML query routines.
- //////////////////////////////////////////////////////////////////////
-
-
- boolean isStandalone () { return docIsStandalone; }
-
-
- //
- // Elements
- //
-
- private int getContentType (Object element [], int defaultType)
- {
- int retval;
-
- if (element == null)
- return defaultType;
- retval = ((Integer) element [0]).intValue ();
- if (retval == CONTENT_UNDECLARED)
- retval = defaultType;
- return retval;
- }
-
-
- /**
- * Look up the content type of an element.
- * @param name The element type name.
- * @return An integer constant representing the content type.
- * @see #CONTENT_UNDECLARED
- * @see #CONTENT_ANY
- * @see #CONTENT_EMPTY
- * @see #CONTENT_MIXED
- * @see #CONTENT_ELEMENTS
- */
- public int getElementContentType (String name)
- {
- Object element [] = (Object []) elementInfo.get (name);
- return getContentType (element, CONTENT_UNDECLARED);
- }
-
-
- /**
- * Register an element.
- * Array format:
- * [0] element type name
- * [1] content model (mixed, elements only)
- * [2] attribute hash table
- */
- private void setElement (
- String name,
- int contentType,
- String contentModel,
- Hashtable attributes
- ) throws SAXException
- {
- if (skippedPE)
- return;
-
- Object element [] = (Object []) elementInfo.get (name);
-
- // first <!ELEMENT ...> or <!ATTLIST ...> for this type?
- if (element == null) {
- element = new Object [3];
- element [0] = new Integer (contentType);
- element [1] = contentModel;
- element [2] = attributes;
- elementInfo.put (name, element);
- return;
- }
-
- // <!ELEMENT ...> declaration?
- if (contentType != CONTENT_UNDECLARED) {
- // ... following an associated <!ATTLIST ...>
- if (((Integer) element [0]).intValue () == CONTENT_UNDECLARED) {
- element [0] = new Integer (contentType);
- element [1] = contentModel;
- } else
- // VC: Unique Element Type Declaration
- handler.verror ("multiple declarations for element type: "
- + name);
- }
-
- // first <!ATTLIST ...>, before <!ELEMENT ...> ?
- else if (attributes != null)
- element [2] = attributes;
- }
-
-
- /**
- * Look up the attribute hash table for an element.
- * The hash table is the second item in the element array.
- */
- private Hashtable getElementAttributes (String name)
- {
- Object element[] = (Object[]) elementInfo.get (name);
- if (element == null)
- return null;
- else
- return (Hashtable) element [2];
- }
-
-
-
- //
- // Attributes
- //
+ {
+ char c = readCh();
+
+ if (c != delim)
+ {
+ error("required character", c, new Character(delim).toString());
+ }
+ }
+
+ /**
+ * Create an interned string from a character array.
+ * &AElig;lfred uses this method to create an interned version
+ * of all names and name tokens, so that it can test equality
+ * with <code>==</code> instead of <code>String.equals ()</code>.
+ *
+ * <p>This is much more efficient than constructing a non-interned
+ * string first, and then interning it.
+ *
+ * @param ch an array of characters for building the string.
+ * @param start the starting position in the array.
+ * @param length the number of characters to place in the string.
+ * @return an interned string.
+ * @see #intern (String)
+ * @see java.lang.String#intern
+ */
+ public String intern(char[] ch, int start, int length)
+ {
+ int index = 0;
+ int hash = 0;
+ Object[] bucket;
+
+ // Generate a hash code. This is a widely used string hash,
+ // often attributed to Brian Kernighan.
+ for (int i = start; i < start + length; i++)
+ {
+ hash = 31 * hash + ch[i];
+ }
+ hash = (hash & 0x7fffffff) % SYMBOL_TABLE_LENGTH;
+
+ // Get the bucket -- consists of {array,String} pairs
+ if ((bucket = symbolTable[hash]) == null)
+ {
+ // first string in this bucket
+ bucket = new Object[8];
+
+ // Search for a matching tuple, and
+ // return the string if we find one.
+ }
+ else
+ {
+ while (index < bucket.length)
+ {
+ char[] chFound = (char[]) bucket[index];
+
+ // Stop when we hit an empty entry.
+ if (chFound == null)
+ {
+ break;
+ }
+
+ // If they're the same length, check for a match.
+ if (chFound.length == length)
+ {
+ for (int i = 0; i < chFound.length; i++)
+ {
+ // continue search on failure
+ if (ch[start + i] != chFound[i])
+ {
+ break;
+ }
+ else if (i == length - 1)
+ {
+ // That's it, we have a match!
+ return (String) bucket[index + 1];
+ }
+ }
+ }
+ index += 2;
+ }
+ // Not found -- we'll have to add it.
+
+ // Do we have to grow the bucket?
+ bucket = (Object[]) extendArray(bucket, bucket.length, index);
+ }
+ symbolTable[hash] = bucket;
+
+ // OK, add it to the end of the bucket -- "local" interning.
+ // Intern "globally" to let applications share interning benefits.
+ // That is, "!=" and "==" work on our strings, not just equals().
+ String s = new String(ch, start, length).intern();
+ bucket[index] = s.toCharArray();
+ bucket[index + 1] = s;
+ return s;
+ }
- /**
- * Get the declared attributes for an element type.
- * @param elname The name of the element type.
- * @return An Enumeration of all the attributes declared for
- * a specific element type. The results will be valid only
- * after the DTD (if any) has been parsed.
- * @see #getAttributeType
- * @see #getAttributeEnumeration
- * @see #getAttributeDefaultValueType
- * @see #getAttributeDefaultValue
- * @see #getAttributeExpandedValue
- */
- private Enumeration declaredAttributes (Object element [])
- {
- Hashtable attlist;
+ /**
+ * Ensure the capacity of an array, allocating a new one if
+ * necessary. Usually extends only for name hash collisions.
+ */
+ private Object extendArray(Object array, int currentSize, int requiredSize)
+ {
+ if (requiredSize < currentSize)
+ {
+ return array;
+ }
+ else
+ {
+ Object newArray = null;
+ int newSize = currentSize * 2;
+
+ if (newSize <= requiredSize)
+ {
+ newSize = requiredSize + 1;
+ }
+
+ if (array instanceof char[])
+ {
+ newArray = new char[newSize];
+ }
+ else if (array instanceof Object[])
+ {
+ newArray = new Object[newSize];
+ }
+ else
+ {
+ throw new RuntimeException();
+ }
+
+ System.arraycopy(array, 0, newArray, 0, currentSize);
+ return newArray;
+ }
+ }
- if (element == null)
- return null;
- if ((attlist = (Hashtable) element [2]) == null)
- return null;
- return attlist.keys ();
- }
+ //////////////////////////////////////////////////////////////////////
+ // XML query routines.
+ //////////////////////////////////////////////////////////////////////
+
+ boolean isStandalone()
+ {
+ return docIsStandalone;
+ }
+
+ //
+ // Elements
+ //
+
+ private int getContentType(ElementDecl element, int defaultType)
+ {
+ int retval;
+
+ if (element == null)
+ {
+ return defaultType;
+ }
+ retval = element.contentType;
+ if (retval == CONTENT_UNDECLARED)
+ {
+ retval = defaultType;
+ }
+ return retval;
+ }
- /**
- * Get the declared attributes for an element type.
- * @param elname The name of the element type.
- * @return An Enumeration of all the attributes declared for
- * a specific element type. The results will be valid only
- * after the DTD (if any) has been parsed.
- * @see #getAttributeType
- * @see #getAttributeEnumeration
- * @see #getAttributeDefaultValueType
- * @see #getAttributeDefaultValue
- * @see #getAttributeExpandedValue
- */
- public Enumeration declaredAttributes (String elname)
- {
- return declaredAttributes ((Object []) elementInfo.get (elname));
- }
+ /**
+ * Look up the content type of an element.
+ * @param name The element type name.
+ * @return An integer constant representing the content type.
+ * @see #CONTENT_UNDECLARED
+ * @see #CONTENT_ANY
+ * @see #CONTENT_EMPTY
+ * @see #CONTENT_MIXED
+ * @see #CONTENT_ELEMENTS
+ */
+ public int getElementContentType(String name)
+ {
+ ElementDecl element = (ElementDecl) elementInfo.get(name);
+ return getContentType(element, CONTENT_UNDECLARED);
+ }
+
+ /**
+ * Register an element.
+ * Array format:
+ * [0] element type name
+ * [1] content model (mixed, elements only)
+ * [2] attribute hash table
+ */
+ private void setElement(String name, int contentType,
+ String contentModel, HashMap attributes)
+ throws SAXException
+ {
+ if (skippedPE)
+ {
+ return;
+ }
+ ElementDecl element = (ElementDecl) elementInfo.get(name);
+
+ // first <!ELEMENT ...> or <!ATTLIST ...> for this type?
+ if (element == null)
+ {
+ element = new ElementDecl();
+ element.contentType = contentType;
+ element.contentModel = contentModel;
+ element.attributes = attributes;
+ elementInfo.put(name, element);
+ return;
+ }
+
+ // <!ELEMENT ...> declaration?
+ if (contentType != CONTENT_UNDECLARED)
+ {
+ // ... following an associated <!ATTLIST ...>
+ if (element.contentType == CONTENT_UNDECLARED)
+ {
+ element.contentType = contentType;
+ element.contentModel = contentModel;
+ }
+ else
+ {
+ // VC: Unique Element Type Declaration
+ handler.verror("multiple declarations for element type: "
+ + name);
+ }
+ }
+
+ // first <!ATTLIST ...>, before <!ELEMENT ...> ?
+ else if (attributes != null)
+ {
+ element.attributes = attributes;
+ }
+ }
+
+ /**
+ * Look up the attribute hash table for an element.
+ * The hash table is the second item in the element array.
+ */
+ private HashMap getElementAttributes(String name)
+ {
+ ElementDecl element = (ElementDecl) elementInfo.get(name);
+ return (element == null) ? null : element.attributes;
+ }
- /**
- * Retrieve the declared type of an attribute.
- * @param name The name of the associated element.
- * @param aname The name of the attribute.
- * @return An interend string denoting the type, or null
- * indicating an undeclared attribute.
- */
- public String getAttributeType (String name, String aname)
- {
- Object attribute[] = getAttribute (name, aname);
- if (attribute == null) {
- return null;
- } else {
- return (String) attribute [0];
- }
- }
+ //
+ // Attributes
+ //
+
+ /**
+ * Get the declared attributes for an element type.
+ * @param elname The name of the element type.
+ * @return An iterator over all the attributes declared for
+ * a specific element type. The results will be valid only
+ * after the DTD (if any) has been parsed.
+ * @see #getAttributeType
+ * @see #getAttributeEnumeration
+ * @see #getAttributeDefaultValueType
+ * @see #getAttributeDefaultValue
+ * @see #getAttributeExpandedValue
+ */
+ private Iterator declaredAttributes(ElementDecl element)
+ {
+ HashMap attlist;
+
+ if (element == null)
+ {
+ return null;
+ }
+ if ((attlist = element.attributes) == null)
+ {
+ return null;
+ }
+ return attlist.keySet().iterator();
+ }
+ /**
+ * Get the declared attributes for an element type.
+ * @param elname The name of the element type.
+ * @return An iterator over all the attributes declared for
+ * a specific element type. The results will be valid only
+ * after the DTD (if any) has been parsed.
+ * @see #getAttributeType
+ * @see #getAttributeEnumeration
+ * @see #getAttributeDefaultValueType
+ * @see #getAttributeDefaultValue
+ * @see #getAttributeExpandedValue
+ */
+ public Iterator declaredAttributes(String elname)
+ {
+ return declaredAttributes((ElementDecl) elementInfo.get(elname));
+ }
- /**
- * Retrieve the allowed values for an enumerated attribute type.
- * @param name The name of the associated element.
- * @param aname The name of the attribute.
- * @return A string containing the token list.
- */
- public String getAttributeEnumeration (String name, String aname)
- {
- Object attribute[] = getAttribute (name, aname);
- if (attribute == null) {
- return null;
- } else {
- // assert: attribute [0] is "ENUMERATION" or "NOTATION"
- return (String) attribute [3];
- }
- }
+ /**
+ * Retrieve the declared type of an attribute.
+ * @param name The name of the associated element.
+ * @param aname The name of the attribute.
+ * @return An interend string denoting the type, or null
+ * indicating an undeclared attribute.
+ */
+ public String getAttributeType(String name, String aname)
+ {
+ AttributeDecl attribute = getAttribute(name, aname);
+ return (attribute == null) ? null : attribute.type;
+ }
+ /**
+ * Retrieve the allowed values for an enumerated attribute type.
+ * @param name The name of the associated element.
+ * @param aname The name of the attribute.
+ * @return A string containing the token list.
+ */
+ public String getAttributeEnumeration(String name, String aname)
+ {
+ AttributeDecl attribute = getAttribute(name, aname);
+ // assert: attribute.enumeration is "ENUMERATION" or "NOTATION"
+ return (attribute == null) ? null : attribute.enumeration;
+ }
- /**
- * Retrieve the default value of a declared attribute.
- * @param name The name of the associated element.
- * @param aname The name of the attribute.
- * @return The default value, or null if the attribute was
- * #IMPLIED or simply undeclared and unspecified.
- * @see #getAttributeExpandedValue
- */
- public String getAttributeDefaultValue (String name, String aname)
- {
- Object attribute[] = getAttribute (name, aname);
- if (attribute == null) {
- return null;
- } else {
- return (String) attribute [1];
- }
- }
+ /**
+ * Retrieve the default value of a declared attribute.
+ * @param name The name of the associated element.
+ * @param aname The name of the attribute.
+ * @return The default value, or null if the attribute was
+ * #IMPLIED or simply undeclared and unspecified.
+ * @see #getAttributeExpandedValue
+ */
+ public String getAttributeDefaultValue(String name, String aname)
+ {
+ AttributeDecl attribute = getAttribute(name, aname);
+ return (attribute == null) ? null : attribute.value;
+ }
/*
@@ -3325,1789 +3940,1896 @@ loop:
* @param name The name of the associated element.
* @param aname The name of the attribute.
* @return The expanded default value, or null if the attribute was
- * #IMPLIED or simply undeclared
+ * #IMPLIED or simply undeclared
* @see #getAttributeDefaultValue
public String getAttributeExpandedValue (String name, String aname)
throws Exception
{
- Object attribute[] = getAttribute (name, aname);
-
- if (attribute == null) {
- return null;
- } else if (attribute [4] == null && attribute [1] != null) {
- // we MUST use the same buf for both quotes else the literal
- // can't be properly terminated
- char buf [] = new char [1];
- int flags = LIT_ENTITY_REF | LIT_ATTRIBUTE;
- String type = getAttributeType (name, aname);
-
- if (type != "CDATA" && type != null)
- flags |= LIT_NORMALIZE;
- buf [0] = '"';
- pushCharArray (null, buf, 0, 1);
- pushString (null, (String) attribute [1]);
- pushCharArray (null, buf, 0, 1);
- attribute [4] = readLiteral (flags);
- }
- return (String) attribute [4];
+ AttributeDecl attribute = getAttribute (name, aname);
+
+ if (attribute == null) {
+ return null;
+ } else if (attribute.defaultValue == null && attribute.value != null) {
+ // we MUST use the same buf for both quotes else the literal
+ // can't be properly terminated
+ char buf [] = new char [1];
+ int flags = LIT_ENTITY_REF | LIT_ATTRIBUTE;
+ String type = getAttributeType (name, aname);
+
+ if (type != "CDATA" && type != null)
+ flags |= LIT_NORMALIZE;
+ buf [0] = '"';
+ pushCharArray (null, buf, 0, 1);
+ pushString (null, attribute.value);
+ pushCharArray (null, buf, 0, 1);
+ attribute.defaultValue = readLiteral (flags);
+ }
+ return attribute.defaultValue;
}
*/
- /**
- * Retrieve the default value mode of a declared attribute.
- * @see #ATTRIBUTE_DEFAULT_SPECIFIED
- * @see #ATTRIBUTE_DEFAULT_IMPLIED
- * @see #ATTRIBUTE_DEFAULT_REQUIRED
- * @see #ATTRIBUTE_DEFAULT_FIXED
- */
- public int getAttributeDefaultValueType (String name, String aname)
- {
- Object attribute[] = getAttribute (name, aname);
- if (attribute == null) {
- return ATTRIBUTE_DEFAULT_UNDECLARED;
- } else {
- return ((Integer) attribute [2]).intValue ();
- }
- }
-
-
- /**
- * Register an attribute declaration for later retrieval.
- * Format:
- * - String type
- * - String default value
- * - int value type
- * - enumeration
- * - processed default value
- */
- private void setAttribute (String elName, String name, String type,
- String enumeration,
- String value, int valueType)
+ /**
+ * Retrieve the default value mode of a declared attribute.
+ * @see #ATTRIBUTE_DEFAULT_SPECIFIED
+ * @see #ATTRIBUTE_DEFAULT_IMPLIED
+ * @see #ATTRIBUTE_DEFAULT_REQUIRED
+ * @see #ATTRIBUTE_DEFAULT_FIXED
+ */
+ public int getAttributeDefaultValueType(String name, String aname)
+ {
+ AttributeDecl attribute = getAttribute(name, aname);
+ return (attribute == null) ? ATTRIBUTE_DEFAULT_UNDECLARED :
+ attribute.valueType;
+ }
+
+ /**
+ * Register an attribute declaration for later retrieval.
+ * Format:
+ * - String type
+ * - String default value
+ * - int value type
+ * - enumeration
+ * - processed default value
+ */
+ private void setAttribute(String elName, String name, String type,
+ String enumeration, String value, int valueType)
throws Exception
- {
- Hashtable attlist;
-
- if (skippedPE)
- return;
-
- // Create a new hashtable if necessary.
- attlist = getElementAttributes (elName);
- if (attlist == null)
- attlist = new Hashtable ();
-
- // ignore multiple attribute declarations!
- if (attlist.get (name) != null) {
- // warn ...
- return;
- } else {
- Object attribute [] = new Object [5];
- attribute [0] = type;
- attribute [1] = value;
- attribute [2] = new Integer (valueType);
- attribute [3] = enumeration;
- attribute [4] = null;
- attlist.put (name, attribute);
-
- // save; but don't overwrite any existing <!ELEMENT ...>
- setElement (elName, CONTENT_UNDECLARED, null, attlist);
- }
- }
-
-
- /**
- * Retrieve the array representing an attribute declaration.
- */
- private Object[] getAttribute (String elName, String name)
- {
- Hashtable attlist;
-
- attlist = getElementAttributes (elName);
- if (attlist == null)
- return null;
- return (Object[]) attlist.get (name);
- }
-
+ {
+ HashMap attlist;
+
+ if (skippedPE)
+ {
+ return;
+ }
+
+ // Create a new hashtable if necessary.
+ attlist = getElementAttributes(elName);
+ if (attlist == null)
+ {
+ attlist = new HashMap();
+ }
+
+ // ignore multiple attribute declarations!
+ if (attlist.get(name) != null)
+ {
+ // warn ...
+ return;
+ }
+ else
+ {
+ AttributeDecl attribute = new AttributeDecl();
+ attribute.type = type;
+ attribute.value = value;
+ attribute.valueType = valueType;
+ attribute.enumeration = enumeration;
+ attlist.put(name, attribute);
+
+ // save; but don't overwrite any existing <!ELEMENT ...>
+ setElement(elName, CONTENT_UNDECLARED, null, attlist);
+ }
+ }
- //
- // Entities
- //
+ /**
+ * Retrieve the attribute declaration for the given element name and name.
+ */
+ private AttributeDecl getAttribute(String elName, String name)
+ {
+ HashMap attlist = getElementAttributes(elName);
+ return (attlist == null) ? null : (AttributeDecl) attlist.get(name);
+ }
- /**
- * Find the type of an entity.
- * @returns An integer constant representing the entity type.
- * @see #ENTITY_UNDECLARED
- * @see #ENTITY_INTERNAL
- * @see #ENTITY_NDATA
- * @see #ENTITY_TEXT
- */
- public int getEntityType (String ename)
- {
- Object entity[] = (Object[]) entityInfo.get (ename);
- if (entity == null) {
- return ENTITY_UNDECLARED;
- } else {
- return ((Integer) entity [0]).intValue ();
- }
- }
+ //
+ // Entities
+ //
+
+ /**
+ * Find the type of an entity.
+ * @returns An integer constant representing the entity type.
+ * @see #ENTITY_UNDECLARED
+ * @see #ENTITY_INTERNAL
+ * @see #ENTITY_NDATA
+ * @see #ENTITY_TEXT
+ */
+ public int getEntityType(String ename)
+ {
+ EntityInfo entity = (EntityInfo) entityInfo.get(ename);
+ return (entity == null) ? ENTITY_UNDECLARED : entity.type;
+ }
+ /**
+ * Return an external entity's identifiers.
+ * @param ename The name of the external entity.
+ * @return The entity's public identifier, system identifier, and base URI.
+ * Null if the entity was not declared as an external entity.
+ * @see #getEntityType
+ */
+ public ExternalIdentifiers getEntityIds(String ename)
+ {
+ EntityInfo entity = (EntityInfo) entityInfo.get(ename);
+ return (entity == null) ? null : entity.ids;
+ }
- /**
- * Return an external entity's identifier array.
- * @param ename The name of the external entity.
- * @return Three element array containing (in order) the entity's
- * public identifier, system identifier, and base URI. Null if
- * the entity was not declared as an external entity.
- * @see #getEntityType
- */
- public String [] getEntityIds (String ename)
- {
- Object entity[] = (Object[]) entityInfo.get (ename);
- if (entity == null) {
- return null;
- } else {
- return (String []) entity [1];
- }
- }
+ /**
+ * Return an internal entity's replacement text.
+ * @param ename The name of the internal entity.
+ * @return The entity's replacement text, or null if
+ * the entity was not declared as an internal entity.
+ * @see #getEntityType
+ */
+ public String getEntityValue(String ename)
+ {
+ EntityInfo entity = (EntityInfo) entityInfo.get(ename);
+ return (entity == null) ? null : entity.value;
+ }
+ /**
+ * Register an entity declaration for later retrieval.
+ */
+ private void setInternalEntity(String eName, String value)
+ throws SAXException
+ {
+ if (skippedPE)
+ {
+ return;
+ }
- /**
- * Return an internal entity's replacement text.
- * @param ename The name of the internal entity.
- * @return The entity's replacement text, or null if
- * the entity was not declared as an internal entity.
- * @see #getEntityType
- */
- public String getEntityValue (String ename)
- {
- Object entity[] = (Object[]) entityInfo.get (ename);
- if (entity == null) {
- return null;
- } else {
- return (String) entity [3];
- }
- }
+ if (entityInfo.get(eName) == null)
+ {
+ EntityInfo entity = new EntityInfo();
+ entity.type = ENTITY_INTERNAL;
+ entity.value = value;
+ entityInfo.put(eName, entity);
+ }
+ if (handler.stringInterning)
+ {
+ if ("lt" == eName || "gt" == eName || "quot" == eName
+ || "apos" == eName || "amp" == eName)
+ {
+ return;
+ }
+ }
+ else
+ {
+ if ("lt".equals(eName) || "gt".equals(eName) || "quot".equals(eName)
+ || "apos".equals(eName) || "amp".equals(eName))
+ {
+ return;
+ }
+ }
+ handler.getDeclHandler().internalEntityDecl(eName, value);
+ }
+ /**
+ * Register an external entity declaration for later retrieval.
+ */
+ private void setExternalEntity(String eName, int eClass,
+ ExternalIdentifiers ids, String nName)
+ {
+ if (entityInfo.get(eName) == null)
+ {
+ EntityInfo entity = new EntityInfo();
+ entity.type = eClass;
+ entity.ids = ids;
+ entity.notationName = nName;
+ entityInfo.put(eName, entity);
+ }
+ }
- /**
- * Register an entity declaration for later retrieval.
- */
- private void setInternalEntity (String eName, String value)
+ //
+ // Notations.
+ //
+
+ /**
+ * Report a notation declaration, checking for duplicates.
+ */
+ private void setNotation(String nname, ExternalIdentifiers ids)
throws SAXException
- {
- if (skippedPE)
- return;
-
- if (entityInfo.get (eName) == null) {
- Object entity[] = new Object [5];
- entity [0] = new Integer (ENTITY_INTERNAL);
-// FIXME: shrink!! [2] useless
- entity [3] = value;
- entityInfo.put (eName, entity);
- }
- if (handler.getFeature (SAXDriver.FEATURE + "string-interning")) {
- if ("lt" == eName || "gt" == eName || "quot" == eName
- || "apos" == eName || "amp" == eName)
- return;
- } else {
- if ("lt".equals(eName) || "gt".equals(eName) || "quot".equals(eName)
- || "apos".equals(eName) || "amp".equals(eName))
- return;
+ {
+ if (skippedPE)
+ {
+ return;
+ }
+
+ handler.notationDecl(nname, ids.publicId, ids.systemId, ids.baseUri);
+ if (notationInfo.get(nname) == null)
+ {
+ notationInfo.put(nname, nname);
+ }
+ else
+ {
+ // VC: Unique Notation Name
+ handler.verror("Duplicate notation name decl: " + nname);
+ }
+ }
+
+ //
+ // Location.
+ //
+
+ /**
+ * Return the current line number.
+ */
+ public int getLineNumber()
+ {
+ return line;
}
- handler.getDeclHandler ()
- .internalEntityDecl (eName, value);
- }
+ /**
+ * Return the current column number.
+ */
+ public int getColumnNumber()
+ {
+ return column;
+ }
- /**
- * Register an external entity declaration for later retrieval.
- */
- private void setExternalEntity (String eName, int eClass,
- String ids [], String nName)
- {
- if (entityInfo.get (eName) == null) {
- Object entity[] = new Object [5];
- entity [0] = new Integer (eClass);
- entity [1] = ids;
-// FIXME: shrink!! [2] no longer used, [4] irrelevant given [0]
- entity [4] = nName;
- entityInfo.put (eName, entity);
- }
- }
+ //////////////////////////////////////////////////////////////////////
+ // High-level I/O.
+ //////////////////////////////////////////////////////////////////////
+
+ /**
+ * Read a single character from the readBuffer.
+ * <p>The readDataChunk () method maintains the buffer.
+ * <p>If we hit the end of an entity, try to pop the stack and
+ * keep going.
+ * <p> (This approach doesn't really enforce XML's rules about
+ * entity boundaries, but this is not currently a validating
+ * parser).
+ * <p>This routine also attempts to keep track of the current
+ * position in external entities, but it's not entirely accurate.
+ * @return The next available input character.
+ * @see #unread (char)
+ * @see #readDataChunk
+ * @see #readBuffer
+ * @see #line
+ * @return The next character from the current input source.
+ */
+ private char readCh()
+ throws SAXException, IOException
+ {
+ // As long as there's nothing in the
+ // read buffer, try reading more data
+ // (for an external entity) or popping
+ // the entity stack (for either).
+ while (readBufferPos >= readBufferLength)
+ {
+ switch (sourceType)
+ {
+ case INPUT_READER:
+ case INPUT_STREAM:
+ readDataChunk();
+ while (readBufferLength < 1)
+ {
+ popInput();
+ if (readBufferLength < 1)
+ {
+ readDataChunk();
+ }
+ }
+ break;
+
+ default:
+
+ popInput();
+ break;
+ }
+ }
+
+ char c = readBuffer[readBufferPos++];
+
+ if (c == '\n')
+ {
+ line++;
+ column = 0;
+ }
+ else
+ {
+ if (c == '<')
+ {
+ /* the most common return to parseContent () ... NOP */
+ }
+ else if (((c < 0x0020 && (c != '\t') && (c != '\r')) || c > 0xFFFD)
+ || ((c >= 0x007f) && (c <= 0x009f) && (c != 0x0085)
+ && xmlVersion == XML_11))
+ {
+ error("illegal XML character U+" + Integer.toHexString(c));
+ }
+ // If we're in the DTD and in a context where PEs get expanded,
+ // do so ... 1/14/2000 errata identify those contexts. There
+ // are also spots in the internal subset where PE refs are fatal
+ // errors, hence yet another flag.
+ else if (c == '%' && expandPE)
+ {
+ if (peIsError)
+ {
+ error("PE reference within decl in internal subset.");
+ }
+ parsePEReference();
+ return readCh();
+ }
+ column++;
+ }
- //
- // Notations.
- //
+ return c;
+ }
- /**
- * Report a notation declaration, checking for duplicates.
- */
- private void setNotation (String nname, String ids [])
+ /**
+ * Push a single character back onto the current input stream.
+ * <p>This method usually pushes the character back onto
+ * the readBuffer.
+ * <p>I don't think that this would ever be called with
+ * readBufferPos = 0, because the methods always reads a character
+ * before unreading it, but just in case, I've added a boundary
+ * condition.
+ * @param c The character to push back.
+ * @see #readCh
+ * @see #unread (char[])
+ * @see #readBuffer
+ */
+ private void unread(char c)
throws SAXException
- {
- if (skippedPE)
- return;
-
- handler.notationDecl (nname, ids);
- if (notationInfo.get (nname) == null)
- notationInfo.put (nname, nname);
- else
- // VC: Unique Notation Name
- handler.verror ("Duplicate notation name decl: " + nname);
- }
-
-
- //
- // Location.
- //
-
-
- /**
- * Return the current line number.
- */
- public int getLineNumber ()
- {
- return line;
- }
-
-
- /**
- * Return the current column number.
- */
- public int getColumnNumber ()
- {
- return column;
- }
+ {
+ // Normal condition.
+ if (c == '\n')
+ {
+ line--;
+ column = -1;
+ }
+ if (readBufferPos > 0)
+ {
+ readBuffer[--readBufferPos] = c;
+ }
+ else
+ {
+ pushString(null, new Character(c).toString());
+ }
+ }
+ /**
+ * Push a char array back onto the current input stream.
+ * <p>NOTE: you must <em>never</em> push back characters that you
+ * haven't actually read: use pushString () instead.
+ * @see #readCh
+ * @see #unread (char)
+ * @see #readBuffer
+ * @see #pushString
+ */
+ private void unread(char[] ch, int length)
+ throws SAXException
+ {
+ for (int i = 0; i < length; i++)
+ {
+ if (ch[i] == '\n')
+ {
+ line--;
+ column = -1;
+ }
+ }
+ if (length < readBufferPos)
+ {
+ readBufferPos -= length;
+ }
+ else
+ {
+ pushCharArray(null, ch, 0, length);
+ }
+ }
- //////////////////////////////////////////////////////////////////////
- // High-level I/O.
- //////////////////////////////////////////////////////////////////////
-
-
- /**
- * Read a single character from the readBuffer.
- * <p>The readDataChunk () method maintains the buffer.
- * <p>If we hit the end of an entity, try to pop the stack and
- * keep going.
- * <p> (This approach doesn't really enforce XML's rules about
- * entity boundaries, but this is not currently a validating
- * parser).
- * <p>This routine also attempts to keep track of the current
- * position in external entities, but it's not entirely accurate.
- * @return The next available input character.
- * @see #unread (char)
- * @see #readDataChunk
- * @see #readBuffer
- * @see #line
- * @return The next character from the current input source.
- */
- private char readCh ()
+ /**
+ * Push, or skip, a new external input source.
+ * The source will be some kind of parsed entity, such as a PE
+ * (including the external DTD subset) or content for the body.
+ *
+ * @param url The java.net.URL object for the entity.
+ * @see SAXDriver#resolveEntity
+ * @see #pushString
+ * @see #sourceType
+ * @see #pushInput
+ * @see #detectEncoding
+ * @see #sourceType
+ * @see #readBuffer
+ */
+ private void pushURL(boolean isPE,
+ String ename,
+ ExternalIdentifiers ids,
+ Reader reader,
+ InputStream stream,
+ String encoding,
+ boolean doResolve)
throws SAXException, IOException
- {
- // As long as there's nothing in the
- // read buffer, try reading more data
- // (for an external entity) or popping
- // the entity stack (for either).
- while (readBufferPos >= readBufferLength) {
- switch (sourceType) {
- case INPUT_READER:
- case INPUT_STREAM:
- readDataChunk ();
- while (readBufferLength < 1) {
- popInput ();
- if (readBufferLength < 1) {
- readDataChunk ();
- }
- }
- break;
-
- default:
-
- popInput ();
- break;
- }
- }
-
- char c = readBuffer [readBufferPos++];
-
- if (c == '\n') {
- line++;
- column = 0;
- } else {
- if (c == '<') {
- /* the most common return to parseContent () ... NOP */
- } else if (((c < 0x0020 && (c != '\t') && (c != '\r')) || c > 0xFFFD)
- || ((c >= 0x007f) && (c <= 0x009f) && (c != 0x0085)
- && xmlVersion == XML_11))
- error ("illegal XML character U+"
- + Integer.toHexString (c));
-
- // If we're in the DTD and in a context where PEs get expanded,
- // do so ... 1/14/2000 errata identify those contexts. There
- // are also spots in the internal subset where PE refs are fatal
- // errors, hence yet another flag.
- else if (c == '%' && expandPE) {
- if (peIsError)
- error ("PE reference within decl in internal subset.");
- parsePEReference ();
- return readCh ();
- }
- column++;
- }
-
- return c;
- }
+ {
+ boolean ignoreEncoding;
+ String systemId;
+ InputSource source;
+ if (!isPE)
+ {
+ dataBufferFlush();
+ }
- /**
- * Push a single character back onto the current input stream.
- * <p>This method usually pushes the character back onto
- * the readBuffer.
- * <p>I don't think that this would ever be called with
- * readBufferPos = 0, because the methods always reads a character
- * before unreading it, but just in case, I've added a boundary
- * condition.
- * @param c The character to push back.
- * @see #readCh
- * @see #unread (char[])
- * @see #readBuffer
- */
- private void unread (char c)
- throws SAXException
- {
- // Normal condition.
- if (c == '\n') {
- line--;
- column = -1;
- }
- if (readBufferPos > 0) {
- readBuffer [--readBufferPos] = c;
- } else {
- pushString (null, new Character (c).toString ());
- }
- }
+ scratch.setPublicId(ids.publicId);
+ scratch.setSystemId(ids.systemId);
+
+ // See if we should skip or substitute the entity.
+ // If we're not skipping, resolving reports startEntity()
+ // and updates the (handler's) stack of URIs.
+ if (doResolve)
+ {
+ // assert (stream == null && reader == null && encoding == null)
+ source = handler.resolveEntity(isPE, ename, scratch, ids.baseUri);
+ if (source == null)
+ {
+ handler.warn("skipping entity: " + ename);
+ handler.skippedEntity(ename);
+ if (isPE)
+ {
+ skippedPE = true;
+ }
+ return;
+ }
+ // we might be using alternate IDs/encoding
+ systemId = source.getSystemId();
+ // The following warning and setting systemId was deleted bcause
+ // the application has the option of not setting systemId
+ // provided that it has set the characte/byte stream.
+ /*
+ if (systemId == null) {
+ handler.warn ("missing system ID, using " + ids.systemId);
+ systemId = ids.systemId;
+ }
+ */
+ }
+ else
+ {
+ // "[document]", or "[dtd]" via getExternalSubset()
+ scratch.setCharacterStream(reader);
+ scratch.setByteStream(stream);
+ scratch.setEncoding(encoding);
+ source = scratch;
+ systemId = ids.systemId;
+ if (handler.stringInterning)
+ {
+ handler.startExternalEntity(ename, systemId,
+ "[document]" == ename);
+ }
+ else
+ {
+ handler.startExternalEntity(ename, systemId,
+ "[document]".equals(ename));
+ }
+ }
- /**
- * Push a char array back onto the current input stream.
- * <p>NOTE: you must <em>never</em> push back characters that you
- * haven't actually read: use pushString () instead.
- * @see #readCh
- * @see #unread (char)
- * @see #readBuffer
- * @see #pushString
- */
- private void unread (char ch[], int length)
- throws SAXException
- {
- for (int i = 0; i < length; i++) {
- if (ch [i] == '\n') {
- line--;
- column = -1;
- }
- }
- if (length < readBufferPos) {
- readBufferPos -= length;
- } else {
- pushCharArray (null, ch, 0, length);
- }
- }
+ // we may have been given I/O streams directly
+ if (source.getCharacterStream() != null)
+ {
+ if (source.getByteStream() != null)
+ error("InputSource has two streams!");
+ reader = source.getCharacterStream();
+ }
+ else if (source.getByteStream() != null)
+ {
+ encoding = source.getEncoding();
+ if (encoding == null)
+ {
+ stream = source.getByteStream();
+ }
+ else
+ {
+ try
+ {
+ reader = new InputStreamReader(source.getByteStream(),
+ encoding);
+ }
+ catch (IOException e)
+ {
+ stream = source.getByteStream();
+ }
+ }
+ }
+ else if (systemId == null)
+ {
+ error("InputSource has no URI!");
+ }
+ scratch.setCharacterStream(null);
+ scratch.setByteStream(null);
+ scratch.setEncoding(null);
+
+ // Push the existing status.
+ pushInput(ename);
+
+ // Create a new read buffer.
+ // (Note the four-character margin)
+ readBuffer = new char[READ_BUFFER_MAX + 4];
+ readBufferPos = 0;
+ readBufferLength = 0;
+ readBufferOverflow = -1;
+ is = null;
+ line = 1;
+ column = 0;
+ currentByteCount = 0;
+
+ // If there's an explicit character stream, just
+ // ignore encoding declarations.
+ if (reader != null)
+ {
+ sourceType = INPUT_READER;
+ this.reader = reader;
+ tryEncodingDecl(true);
+ return;
+ }
+
+ // Else we handle the conversion, and need to ensure
+ // it's done right.
+ sourceType = INPUT_STREAM;
+ if (stream != null)
+ {
+ is = stream;
+ }
+ else
+ {
+ // We have to open our own stream to the URL.
+ URL url = new URL(systemId);
+
+ externalEntity = url.openConnection();
+ externalEntity.connect();
+ is = externalEntity.getInputStream();
+ }
+
+ // If we get to here, there must be
+ // an InputStream available.
+ if (!is.markSupported())
+ {
+ is = new BufferedInputStream(is);
+ }
+ // Get any external encoding label.
+ if (encoding == null && externalEntity != null)
+ {
+ // External labels can be untrustworthy; filesystems in
+ // particular often have the wrong default for content
+ // that wasn't locally originated. Those we autodetect.
+ if (!"file".equals(externalEntity.getURL().getProtocol()))
+ {
+ int temp;
+
+ // application/xml;charset=something;otherAttr=...
+ // ... with many variants on 'something'
+ encoding = externalEntity.getContentType();
+
+ // MHK code (fix for Saxon 5.5.1/007):
+ // protect against encoding==null
+ if (encoding == null)
+ {
+ temp = -1;
+ }
+ else
+ {
+ temp = encoding.indexOf("charset");
+ }
+
+ // RFC 2376 sez MIME text defaults to ASCII, but since the
+ // JDK will create a MIME type out of thin air, we always
+ // autodetect when there's no explicit charset attribute.
+ if (temp < 0)
+ {
+ encoding = null; // autodetect
+ }
+ else
+ {
+ // only this one attribute
+ if ((temp = encoding.indexOf(';')) > 0)
+ {
+ encoding = encoding.substring(0, temp);
+ }
+
+ if ((temp = encoding.indexOf('=', temp + 7)) > 0)
+ {
+ encoding = encoding.substring(temp + 1);
+
+ // attributes can have comment fields (RFC 822)
+ if ((temp = encoding.indexOf('(')) > 0)
+ {
+ encoding = encoding.substring(0, temp);
+ }
+ // ... and values may be quoted
+ if ((temp = encoding.indexOf('"')) > 0)
+ {
+ encoding =
+ encoding.substring(temp + 1,
+ encoding.indexOf('"', temp + 2));
+ }
+ encoding.trim();
+ }
+ else
+ {
+ handler.warn("ignoring illegal MIME attribute: "
+ + encoding);
+ encoding = null;
+ }
+ }
+ }
+ }
+
+ // if we got an external encoding label, use it ...
+ if (encoding != null)
+ {
+ this.encoding = ENCODING_EXTERNAL;
+ setupDecoding(encoding);
+ ignoreEncoding = true;
+
+ // ... else autodetect from first bytes.
+ }
+ else
+ {
+ detectEncoding();
+ ignoreEncoding = false;
+ }
- /**
- * Push, or skip, a new external input source.
- * The source will be some kind of parsed entity, such as a PE
- * (including the external DTD subset) or content for the body.
- *
- * @param url The java.net.URL object for the entity.
- * @see SAXDriver#resolveEntity
- * @see #pushString
- * @see #sourceType
- * @see #pushInput
- * @see #detectEncoding
- * @see #sourceType
- * @see #readBuffer
- */
- private void pushURL (
- boolean isPE,
- String ename,
- String ids [], // public, system, baseURI
- Reader reader,
- InputStream stream,
- String encoding,
- boolean doResolve
- ) throws SAXException, IOException
- {
- boolean ignoreEncoding;
- String systemId;
- InputSource source;
-
- if (!isPE)
- dataBufferFlush ();
-
- scratch.setPublicId (ids [0]);
- scratch.setSystemId (ids [1]);
-
- // See if we should skip or substitute the entity.
- // If we're not skipping, resolving reports startEntity()
- // and updates the (handler's) stack of URIs.
- if (doResolve) {
- // assert (stream == null && reader == null && encoding == null)
- source = handler.resolveEntity (isPE, ename, scratch, ids [2]);
- if (source == null) {
- handler.warn ("skipping entity: " + ename);
- handler.skippedEntity (ename);
- if (isPE)
- skippedPE = true;
- return;
- }
-
- // we might be using alternate IDs/encoding
- systemId = source.getSystemId ();
- // The following warning and setting systemId was deleted bcause
- // the application has the option of not setting systemId
- // provided that it has set the characte/byte stream.
- /*
- if (systemId == null) {
- handler.warn ("missing system ID, using " + ids [1]);
- systemId = ids [1];
- }
- */
- } else {
- // "[document]", or "[dtd]" via getExternalSubset()
- scratch.setCharacterStream (reader);
- scratch.setByteStream (stream);
- scratch.setEncoding (encoding);
- source = scratch;
- systemId = ids [1];
- if (handler.getFeature (SAXDriver.FEATURE + "string-interning")) {
- handler.startExternalEntity (ename, systemId,
- "[document]" == ename);
- } else {
- handler.startExternalEntity (ename, systemId,
- "[document]".equals(ename));
- }
- }
-
- // we may have been given I/O streams directly
- if (source.getCharacterStream () != null) {
- if (source.getByteStream () != null)
- error ("InputSource has two streams!");
- reader = source.getCharacterStream ();
- } else if (source.getByteStream () != null) {
- encoding = source.getEncoding ();
- if (encoding == null)
- stream = source.getByteStream ();
- else try {
- reader = new InputStreamReader (
- source.getByteStream (),
- encoding);
- } catch (IOException e) {
- stream = source.getByteStream ();
- }
- } else if (systemId == null)
- error ("InputSource has no URI!");
- scratch.setCharacterStream (null);
- scratch.setByteStream (null);
- scratch.setEncoding (null);
-
- // Push the existing status.
- pushInput (ename);
-
- // Create a new read buffer.
- // (Note the four-character margin)
- readBuffer = new char [READ_BUFFER_MAX + 4];
- readBufferPos = 0;
- readBufferLength = 0;
- readBufferOverflow = -1;
- is = null;
- line = 1;
- column = 0;
- currentByteCount = 0;
-
- // If there's an explicit character stream, just
- // ignore encoding declarations.
- if (reader != null) {
- sourceType = INPUT_READER;
- this.reader = reader;
- tryEncodingDecl (true);
- return;
- }
-
- // Else we handle the conversion, and need to ensure
- // it's done right.
- sourceType = INPUT_STREAM;
- if (stream != null) {
- is = stream;
- } else {
- // We have to open our own stream to the URL.
- URL url = new URL (systemId);
-
- externalEntity = url.openConnection ();
- externalEntity.connect ();
- is = externalEntity.getInputStream ();
- }
-
- // If we get to here, there must be
- // an InputStream available.
- if (!is.markSupported ()) {
- is = new BufferedInputStream (is);
- }
-
- // Get any external encoding label.
- if (encoding == null && externalEntity != null) {
- // External labels can be untrustworthy; filesystems in
- // particular often have the wrong default for content
- // that wasn't locally originated. Those we autodetect.
- if (!"file".equals (externalEntity.getURL ().getProtocol ())) {
- int temp;
-
- // application/xml;charset=something;otherAttr=...
- // ... with many variants on 'something'
- encoding = externalEntity.getContentType ();
-
- // MHK code (fix for Saxon 5.5.1/007):
- // protect against encoding==null
- if (encoding==null) {
- temp = -1;
- } else {
- temp = encoding.indexOf ("charset");
- }
-
- // RFC 2376 sez MIME text defaults to ASCII, but since the
- // JDK will create a MIME type out of thin air, we always
- // autodetect when there's no explicit charset attribute.
- if (temp < 0)
- encoding = null; // autodetect
- else {
- // only this one attribute
- if ((temp = encoding.indexOf (';')) > 0)
- encoding = encoding.substring (0, temp);
-
- if ((temp = encoding.indexOf ('=', temp + 7)) > 0) {
- encoding = encoding.substring (temp + 1);
-
- // attributes can have comment fields (RFC 822)
- if ((temp = encoding.indexOf ('(')) > 0)
- encoding = encoding.substring (0, temp);
- // ... and values may be quoted
- if ((temp = encoding.indexOf ('"')) > 0)
- encoding = encoding.substring (temp + 1,
- encoding.indexOf ('"', temp + 2));
- encoding.trim ();
- } else {
- handler.warn ("ignoring illegal MIME attribute: "
- + encoding);
- encoding = null;
- }
- }
- }
- }
-
- // if we got an external encoding label, use it ...
- if (encoding != null) {
- this.encoding = ENCODING_EXTERNAL;
- setupDecoding (encoding);
- ignoreEncoding = true;
-
- // ... else autodetect from first bytes.
- } else {
- detectEncoding ();
- ignoreEncoding = false;
- }
-
- // Read any XML or text declaration.
- // If we autodetected, it may tell us the "real" encoding.
- try {
- tryEncodingDecl (ignoreEncoding);
- } catch (UnsupportedEncodingException x) {
- encoding = x.getMessage ();
-
- // if we don't handle the declared encoding,
- // try letting a JVM InputStreamReader do it
- try {
- if (sourceType != INPUT_STREAM)
- throw x;
-
- is.reset ();
- readBufferPos = 0;
- readBufferLength = 0;
- readBufferOverflow = -1;
- line = 1;
- currentByteCount = column = 0;
-
- sourceType = INPUT_READER;
- this.reader = new InputStreamReader (is, encoding);
- is = null;
-
- tryEncodingDecl (true);
-
- } catch (IOException e) {
- error ("unsupported text encoding",
- encoding,
- null);
- }
- }
- }
+ // Read any XML or text declaration.
+ // If we autodetected, it may tell us the "real" encoding.
+ try
+ {
+ tryEncodingDecl(ignoreEncoding);
+ }
+ catch (UnsupportedEncodingException x)
+ {
+ encoding = x.getMessage();
+ // if we don't handle the declared encoding,
+ // try letting a JVM InputStreamReader do it
+ try
+ {
+ if (sourceType != INPUT_STREAM)
+ {
+ throw x;
+ }
+
+ is.reset();
+ readBufferPos = 0;
+ readBufferLength = 0;
+ readBufferOverflow = -1;
+ line = 1;
+ currentByteCount = column = 0;
+
+ sourceType = INPUT_READER;
+ this.reader = new InputStreamReader(is, encoding);
+ is = null;
+
+ tryEncodingDecl(true);
+
+ }
+ catch (IOException e)
+ {
+ error("unsupported text encoding",
+ encoding,
+ null);
+ }
+ }
+ }
- /**
- * Check for an encoding declaration. This is the second part of the
- * XML encoding autodetection algorithm, relying on detectEncoding to
- * get to the point that this part can read any encoding declaration
- * in the document (using only US-ASCII characters).
- *
- * <p> Because this part starts to fill parser buffers with this data,
- * it's tricky to setup a reader so that Java's built-in decoders can be
- * used for the character encodings that aren't built in to this parser
- * (such as EUC-JP, KOI8-R, Big5, etc).
- *
- * @return any encoding in the declaration, uppercased; or null
- * @see detectEncoding
- */
- private String tryEncodingDecl (boolean ignoreEncoding)
+ /**
+ * Check for an encoding declaration. This is the second part of the
+ * XML encoding autodetection algorithm, relying on detectEncoding to
+ * get to the point that this part can read any encoding declaration
+ * in the document (using only US-ASCII characters).
+ *
+ * <p> Because this part starts to fill parser buffers with this data,
+ * it's tricky to setup a reader so that Java's built-in decoders can be
+ * used for the character encodings that aren't built in to this parser
+ * (such as EUC-JP, KOI8-R, Big5, etc).
+ *
+ * @return any encoding in the declaration, uppercased; or null
+ * @see detectEncoding
+ */
+ private String tryEncodingDecl(boolean ignoreEncoding)
throws SAXException, IOException
- {
- // Read the XML/text declaration.
- if (tryRead ("<?xml")) {
- if (tryWhitespace ()) {
- if (inputStack.size () > 0) {
- return parseTextDecl (ignoreEncoding);
- } else {
- return parseXMLDecl (ignoreEncoding);
- }
- } else {
- // <?xml-stylesheet ...?> or similar
- unread ('l');
- unread ('m');
- unread ('x');
- unread ('?');
- unread ('<');
- }
- }
- return null;
- }
-
+ {
+ // Read the XML/text declaration.
+ if (tryRead("<?xml"))
+ {
+ if (tryWhitespace())
+ {
+ if (inputStack.size() > 0)
+ {
+ return parseTextDecl(ignoreEncoding);
+ }
+ else
+ {
+ return parseXMLDecl(ignoreEncoding);
+ }
+ }
+ else
+ {
+ // <?xml-stylesheet ...?> or similar
+ unread('l');
+ unread('m');
+ unread('x');
+ unread('?');
+ unread('<');
+ }
+ }
+ return null;
+ }
- /**
- * Attempt to detect the encoding of an entity.
- * <p>The trick here (as suggested in the XML standard) is that
- * any entity not in UTF-8, or in UCS-2 with a byte-order mark,
- * <b>must</b> begin with an XML declaration or an encoding
- * declaration; we simply have to look for "&lt;?xml" in various
- * encodings.
- * <p>This method has no way to distinguish among 8-bit encodings.
- * Instead, it sets up for UTF-8, then (possibly) revises its assumption
- * later in setupDecoding (). Any ASCII-derived 8-bit encoding
- * should work, but most will be rejected later by setupDecoding ().
- * @see #tryEncoding (byte[], byte, byte, byte, byte)
- * @see #tryEncoding (byte[], byte, byte)
- * @see #setupDecoding
- */
- private void detectEncoding ()
+ /**
+ * Attempt to detect the encoding of an entity.
+ * <p>The trick here (as suggested in the XML standard) is that
+ * any entity not in UTF-8, or in UCS-2 with a byte-order mark,
+ * <b>must</b> begin with an XML declaration or an encoding
+ * declaration; we simply have to look for "&lt;?xml" in various
+ * encodings.
+ * <p>This method has no way to distinguish among 8-bit encodings.
+ * Instead, it sets up for UTF-8, then (possibly) revises its assumption
+ * later in setupDecoding (). Any ASCII-derived 8-bit encoding
+ * should work, but most will be rejected later by setupDecoding ().
+ * @see #tryEncoding (byte[], byte, byte, byte, byte)
+ * @see #tryEncoding (byte[], byte, byte)
+ * @see #setupDecoding
+ */
+ private void detectEncoding()
throws SAXException, IOException
- {
- byte signature[] = new byte [4];
-
- // Read the first four bytes for
- // autodetection.
- is.mark (4);
- is.read (signature);
- is.reset ();
-
- //
- // FIRST: four byte encodings (who uses these?)
- //
- if (tryEncoding (signature, (byte) 0x00, (byte) 0x00,
- (byte) 0x00, (byte) 0x3c)) {
- // UCS-4 must begin with "<?xml"
- // 0x00 0x00 0x00 0x3c: UCS-4, big-endian (1234)
- // "UTF-32BE"
- encoding = ENCODING_UCS_4_1234;
-
- } else if (tryEncoding (signature, (byte) 0x3c, (byte) 0x00,
- (byte) 0x00, (byte) 0x00)) {
- // 0x3c 0x00 0x00 0x00: UCS-4, little-endian (4321)
- // "UTF-32LE"
- encoding = ENCODING_UCS_4_4321;
-
- } else if (tryEncoding (signature, (byte) 0x00, (byte) 0x00,
- (byte) 0x3c, (byte) 0x00)) {
- // 0x00 0x00 0x3c 0x00: UCS-4, unusual (2143)
- encoding = ENCODING_UCS_4_2143;
-
- } else if (tryEncoding (signature, (byte) 0x00, (byte) 0x3c,
- (byte) 0x00, (byte) 0x00)) {
- // 0x00 0x3c 0x00 0x00: UCS-4, unusual (3421)
- encoding = ENCODING_UCS_4_3412;
-
- // 00 00 fe ff UCS_4_1234 (with BOM)
- // ff fe 00 00 UCS_4_4321 (with BOM)
- }
-
- //
- // SECOND: two byte encodings
- // note ... with 1/14/2000 errata the XML spec identifies some
- // more "broken UTF-16" autodetection cases, with no XML decl,
- // which we don't handle here (that's legal too).
- //
- else if (tryEncoding (signature, (byte) 0xfe, (byte) 0xff)) {
- // UCS-2 with a byte-order marker. (UTF-16)
- // 0xfe 0xff: UCS-2, big-endian (12)
- encoding = ENCODING_UCS_2_12;
- is.read (); is.read ();
-
- } else if (tryEncoding (signature, (byte) 0xff, (byte) 0xfe)) {
- // UCS-2 with a byte-order marker. (UTF-16)
- // 0xff 0xfe: UCS-2, little-endian (21)
- encoding = ENCODING_UCS_2_21;
- is.read (); is.read ();
-
- } else if (tryEncoding (signature, (byte) 0x00, (byte) 0x3c,
- (byte) 0x00, (byte) 0x3f)) {
- // UTF-16BE (otherwise, malformed UTF-16)
- // 0x00 0x3c 0x00 0x3f: UCS-2, big-endian, no byte-order mark
- encoding = ENCODING_UCS_2_12;
- error ("no byte-order mark for UCS-2 entity");
-
- } else if (tryEncoding (signature, (byte) 0x3c, (byte) 0x00,
- (byte) 0x3f, (byte) 0x00)) {
- // UTF-16LE (otherwise, malformed UTF-16)
- // 0x3c 0x00 0x3f 0x00: UCS-2, little-endian, no byte-order mark
- encoding = ENCODING_UCS_2_21;
- error ("no byte-order mark for UCS-2 entity");
- }
-
- //
- // THIRD: ASCII-derived encodings, fixed and variable lengths
- //
- else if (tryEncoding (signature, (byte) 0x3c, (byte) 0x3f,
- (byte) 0x78, (byte) 0x6d)) {
- // ASCII derived
- // 0x3c 0x3f 0x78 0x6d: UTF-8 or other 8-bit markup (read ENCODING)
- encoding = ENCODING_UTF_8;
- prefetchASCIIEncodingDecl ();
-
- } else if (signature [0] == (byte) 0xef
- && signature [1] == (byte) 0xbb
- && signature [2] == (byte) 0xbf) {
- // 0xef 0xbb 0xbf: UTF-8 BOM (not part of document text)
- // this un-needed notion slipped into XML 2nd ed through a
- // "non-normative" erratum; now required by MSFT and UDDI,
- // and E22 made it normative.
- encoding = ENCODING_UTF_8;
- is.read (); is.read (); is.read ();
-
- } else {
- // 4c 6f a7 94 ... we don't understand EBCDIC flavors
- // ... but we COULD at least kick in some fixed code page
-
- // (default) UTF-8 without encoding/XML declaration
- encoding = ENCODING_UTF_8;
- }
- }
-
+ {
+ byte[] signature = new byte[4];
- /**
- * Check for a four-byte signature.
- * <p>Utility routine for detectEncoding ().
- * <p>Always looks for some part of "<?XML" in a specific encoding.
- * @param sig The first four bytes read.
- * @param b1 The first byte of the signature
- * @param b2 The second byte of the signature
- * @param b3 The third byte of the signature
- * @param b4 The fourth byte of the signature
- * @see #detectEncoding
- */
- private static boolean tryEncoding (
- byte sig[], byte b1, byte b2, byte b3, byte b4)
- {
- return (sig [0] == b1 && sig [1] == b2
- && sig [2] == b3 && sig [3] == b4);
- }
+ // Read the first four bytes for
+ // autodetection.
+ is.mark(4);
+ is.read(signature);
+ is.reset();
+ //
+ // FIRST: four byte encodings (who uses these?)
+ //
+ if (tryEncoding(signature, (byte) 0x00, (byte) 0x00,
+ (byte) 0x00, (byte) 0x3c))
+ {
+ // UCS-4 must begin with "<?xml"
+ // 0x00 0x00 0x00 0x3c: UCS-4, big-endian (1234)
+ // "UTF-32BE"
+ encoding = ENCODING_UCS_4_1234;
+ }
+ else if (tryEncoding(signature, (byte) 0x3c, (byte) 0x00,
+ (byte) 0x00, (byte) 0x00))
+ {
+ // 0x3c 0x00 0x00 0x00: UCS-4, little-endian (4321)
+ // "UTF-32LE"
+ encoding = ENCODING_UCS_4_4321;
+ }
+ else if (tryEncoding(signature, (byte) 0x00, (byte) 0x00,
+ (byte) 0x3c, (byte) 0x00))
+ {
+ // 0x00 0x00 0x3c 0x00: UCS-4, unusual (2143)
+ encoding = ENCODING_UCS_4_2143;
+ }
+ else if (tryEncoding(signature, (byte) 0x00, (byte) 0x3c,
+ (byte) 0x00, (byte) 0x00))
+ {
+ // 0x00 0x3c 0x00 0x00: UCS-4, unusual (3421)
+ encoding = ENCODING_UCS_4_3412;
+
+ // 00 00 fe ff UCS_4_1234 (with BOM)
+ // ff fe 00 00 UCS_4_4321 (with BOM)
+ }
- /**
- * Check for a two-byte signature.
- * <p>Looks for a UCS-2 byte-order mark.
- * <p>Utility routine for detectEncoding ().
- * @param sig The first four bytes read.
- * @param b1 The first byte of the signature
- * @param b2 The second byte of the signature
- * @see #detectEncoding
- */
- private static boolean tryEncoding (byte sig[], byte b1, byte b2)
- {
- return ((sig [0] == b1) && (sig [1] == b2));
- }
+ //
+ // SECOND: two byte encodings
+ // note ... with 1/14/2000 errata the XML spec identifies some
+ // more "broken UTF-16" autodetection cases, with no XML decl,
+ // which we don't handle here (that's legal too).
+ //
+ else if (tryEncoding(signature, (byte) 0xfe, (byte) 0xff))
+ {
+ // UCS-2 with a byte-order marker. (UTF-16)
+ // 0xfe 0xff: UCS-2, big-endian (12)
+ encoding = ENCODING_UCS_2_12;
+ is.read(); is.read();
+ }
+ else if (tryEncoding(signature, (byte) 0xff, (byte) 0xfe))
+ {
+ // UCS-2 with a byte-order marker. (UTF-16)
+ // 0xff 0xfe: UCS-2, little-endian (21)
+ encoding = ENCODING_UCS_2_21;
+ is.read(); is.read();
+ }
+ else if (tryEncoding(signature, (byte) 0x00, (byte) 0x3c,
+ (byte) 0x00, (byte) 0x3f))
+ {
+ // UTF-16BE (otherwise, malformed UTF-16)
+ // 0x00 0x3c 0x00 0x3f: UCS-2, big-endian, no byte-order mark
+ encoding = ENCODING_UCS_2_12;
+ error("no byte-order mark for UCS-2 entity");
+ }
+ else if (tryEncoding(signature, (byte) 0x3c, (byte) 0x00,
+ (byte) 0x3f, (byte) 0x00))
+ {
+ // UTF-16LE (otherwise, malformed UTF-16)
+ // 0x3c 0x00 0x3f 0x00: UCS-2, little-endian, no byte-order mark
+ encoding = ENCODING_UCS_2_21;
+ error("no byte-order mark for UCS-2 entity");
+ }
+ //
+ // THIRD: ASCII-derived encodings, fixed and variable lengths
+ //
+ else if (tryEncoding(signature, (byte) 0x3c, (byte) 0x3f,
+ (byte) 0x78, (byte) 0x6d))
+ {
+ // ASCII derived
+ // 0x3c 0x3f 0x78 0x6d: UTF-8 or other 8-bit markup (read ENCODING)
+ encoding = ENCODING_UTF_8;
+ prefetchASCIIEncodingDecl();
+ }
+ else if (signature[0] == (byte) 0xef
+ && signature[1] == (byte) 0xbb
+ && signature[2] == (byte) 0xbf)
+ {
+ // 0xef 0xbb 0xbf: UTF-8 BOM (not part of document text)
+ // this un-needed notion slipped into XML 2nd ed through a
+ // "non-normative" erratum; now required by MSFT and UDDI,
+ // and E22 made it normative.
+ encoding = ENCODING_UTF_8;
+ is.read(); is.read(); is.read();
+ }
+ else
+ {
+ // 4c 6f a7 94 ... we don't understand EBCDIC flavors
+ // ... but we COULD at least kick in some fixed code page
+
+ // (default) UTF-8 without encoding/XML declaration
+ encoding = ENCODING_UTF_8;
+ }
+ }
- /**
- * This method pushes a string back onto input.
- * <p>It is useful either as the expansion of an internal entity,
- * or for backtracking during the parse.
- * <p>Call pushCharArray () to do the actual work.
- * @param s The string to push back onto input.
- * @see #pushCharArray
- */
- private void pushString (String ename, String s)
- throws SAXException
- {
- char ch[] = s.toCharArray ();
- pushCharArray (ename, ch, 0, ch.length);
- }
+ /**
+ * Check for a four-byte signature.
+ * <p>Utility routine for detectEncoding ().
+ * <p>Always looks for some part of "<?XML" in a specific encoding.
+ * @param sig The first four bytes read.
+ * @param b1 The first byte of the signature
+ * @param b2 The second byte of the signature
+ * @param b3 The third byte of the signature
+ * @param b4 The fourth byte of the signature
+ * @see #detectEncoding
+ */
+ private static boolean tryEncoding(byte[] sig, byte b1, byte b2,
+ byte b3, byte b4)
+ {
+ return (sig[0] == b1 && sig[1] == b2
+ && sig[2] == b3 && sig[3] == b4);
+ }
+ /**
+ * Check for a two-byte signature.
+ * <p>Looks for a UCS-2 byte-order mark.
+ * <p>Utility routine for detectEncoding ().
+ * @param sig The first four bytes read.
+ * @param b1 The first byte of the signature
+ * @param b2 The second byte of the signature
+ * @see #detectEncoding
+ */
+ private static boolean tryEncoding(byte[] sig, byte b1, byte b2)
+ {
+ return ((sig[0] == b1) && (sig[1] == b2));
+ }
- /**
- * Push a new internal input source.
- * <p>This method is useful for expanding an internal entity,
- * or for unreading a string of characters. It creates a new
- * readBuffer containing the characters in the array, instead
- * of characters converted from an input byte stream.
- * @param ch The char array to push.
- * @see #pushString
- * @see #pushURL
- * @see #readBuffer
- * @see #sourceType
- * @see #pushInput
- */
- private void pushCharArray (String ename, char ch[], int start, int length)
+ /**
+ * This method pushes a string back onto input.
+ * <p>It is useful either as the expansion of an internal entity,
+ * or for backtracking during the parse.
+ * <p>Call pushCharArray () to do the actual work.
+ * @param s The string to push back onto input.
+ * @see #pushCharArray
+ */
+ private void pushString(String ename, String s)
throws SAXException
- {
- // Push the existing status
- pushInput (ename);
- if (ename != null && doReport) {
- dataBufferFlush ();
- handler.startInternalEntity (ename);
- }
- sourceType = INPUT_INTERNAL;
- readBuffer = ch;
- readBufferPos = start;
- readBufferLength = length;
- readBufferOverflow = -1;
- }
-
+ {
+ char[] ch = s.toCharArray();
+ pushCharArray(ename, ch, 0, ch.length);
+ }
- /**
- * Save the current input source onto the stack.
- * <p>This method saves all of the global variables associated with
- * the current input source, so that they can be restored when a new
- * input source has finished. It also tests for entity recursion.
- * <p>The method saves the following global variables onto a stack
- * using a fixed-length array:
- * <ol>
- * <li>sourceType
- * <li>externalEntity
- * <li>readBuffer
- * <li>readBufferPos
- * <li>readBufferLength
- * <li>line
- * <li>encoding
- * </ol>
- * @param ename The name of the entity (if any) causing the new input.
- * @see #popInput
- * @see #sourceType
- * @see #externalEntity
- * @see #readBuffer
- * @see #readBufferPos
- * @see #readBufferLength
- * @see #line
- * @see #encoding
- */
- private void pushInput (String ename)
+ /**
+ * Push a new internal input source.
+ * <p>This method is useful for expanding an internal entity,
+ * or for unreading a string of characters. It creates a new
+ * readBuffer containing the characters in the array, instead
+ * of characters converted from an input byte stream.
+ * @param ch The char array to push.
+ * @see #pushString
+ * @see #pushURL
+ * @see #readBuffer
+ * @see #sourceType
+ * @see #pushInput
+ */
+ private void pushCharArray(String ename, char[] ch, int start, int length)
throws SAXException
- {
- // Check for entity recursion.
- if (ename != null) {
- Enumeration entities = entityStack.elements ();
- while (entities.hasMoreElements ()) {
- String e = (String) entities.nextElement ();
- if (e != null && e == ename) {
- error ("recursive reference to entity", ename, null);
- }
- }
- }
- entityStack.push (ename);
-
- // Don't bother if there is no current input.
- if (sourceType == INPUT_NONE) {
- return;
- }
-
- // Set up a snapshot of the current
- // input source.
- Object input[] = new Object [12];
-
- input [0] = new Integer (sourceType);
- input [1] = externalEntity;
- input [2] = readBuffer;
- input [3] = new Integer (readBufferPos);
- input [4] = new Integer (readBufferLength);
- input [5] = new Integer (line);
- input [6] = new Integer (encoding);
- input [7] = new Integer (readBufferOverflow);
- input [8] = is;
- input [9] = new Integer (currentByteCount);
- input [10] = new Integer (column);
- input [11] = reader;
-
- // Push it onto the stack.
- inputStack.push (input);
- }
+ {
+ // Push the existing status
+ pushInput(ename);
+ if (ename != null && doReport)
+ {
+ dataBufferFlush();
+ handler.startInternalEntity(ename);
+ }
+ sourceType = INPUT_INTERNAL;
+ readBuffer = ch;
+ readBufferPos = start;
+ readBufferLength = length;
+ readBufferOverflow = -1;
+ }
+ /**
+ * Save the current input source onto the stack.
+ * <p>This method saves all of the global variables associated with
+ * the current input source, so that they can be restored when a new
+ * input source has finished. It also tests for entity recursion.
+ * <p>The method saves the following global variables onto a stack
+ * using a fixed-length array:
+ * <ol>
+ * <li>sourceType
+ * <li>externalEntity
+ * <li>readBuffer
+ * <li>readBufferPos
+ * <li>readBufferLength
+ * <li>line
+ * <li>encoding
+ * </ol>
+ * @param ename The name of the entity (if any) causing the new input.
+ * @see #popInput
+ * @see #sourceType
+ * @see #externalEntity
+ * @see #readBuffer
+ * @see #readBufferPos
+ * @see #readBufferLength
+ * @see #line
+ * @see #encoding
+ */
+ private void pushInput(String ename)
+ throws SAXException
+ {
+ // Check for entity recursion.
+ if (ename != null)
+ {
+ Iterator entities = entityStack.iterator();
+ while (entities.hasNext())
+ {
+ String e = (String) entities.next();
+ if (e != null && e == ename)
+ {
+ error("recursive reference to entity", ename, null);
+ }
+ }
+ }
+ entityStack.addLast(ename);
+
+ // Don't bother if there is no current input.
+ if (sourceType == INPUT_NONE)
+ {
+ return;
+ }
+
+ // Set up a snapshot of the current
+ // input source.
+ Input input = new Input();
+
+ input.sourceType = sourceType;
+ input.externalEntity = externalEntity;
+ input.readBuffer = readBuffer;
+ input.readBufferPos = readBufferPos;
+ input.readBufferLength = readBufferLength;
+ input.line = line;
+ input.encoding = encoding;
+ input.readBufferOverflow = readBufferOverflow;
+ input.is = is;
+ input.currentByteCount = currentByteCount;
+ input.column = column;
+ input.reader = reader;
+
+ // Push it onto the stack.
+ inputStack.addLast(input);
+ }
- /**
- * Restore a previous input source.
- * <p>This method restores all of the global variables associated with
- * the current input source.
- * @exception java.io.EOFException
- * If there are no more entries on the input stack.
- * @see #pushInput
- * @see #sourceType
- * @see #externalEntity
- * @see #readBuffer
- * @see #readBufferPos
- * @see #readBufferLength
- * @see #line
- * @see #encoding
- */
- private void popInput ()
+ /**
+ * Restore a previous input source.
+ * <p>This method restores all of the global variables associated with
+ * the current input source.
+ * @exception java.io.EOFException
+ * If there are no more entries on the input stack.
+ * @see #pushInput
+ * @see #sourceType
+ * @see #externalEntity
+ * @see #readBuffer
+ * @see #readBufferPos
+ * @see #readBufferLength
+ * @see #line
+ * @see #encoding
+ */
+ private void popInput()
throws SAXException, IOException
- {
- String ename = (String) entityStack.pop ();
-
- if (ename != null && doReport)
- dataBufferFlush ();
- switch (sourceType) {
- case INPUT_STREAM:
- handler.endExternalEntity (ename);
- is.close ();
- break;
- case INPUT_READER:
- handler.endExternalEntity (ename);
- reader.close ();
- break;
- case INPUT_INTERNAL:
- if (ename != null && doReport)
- handler.endInternalEntity (ename);
- break;
- }
-
- // Throw an EOFException if there
- // is nothing else to pop.
- if (inputStack.isEmpty ()) {
- throw new EOFException ("no more input");
- }
-
- Object input [] = (Object[]) inputStack.pop ();
-
- sourceType = ((Integer) input [0]).intValue ();
- externalEntity = (URLConnection) input [1];
- readBuffer = (char[]) input [2];
- readBufferPos = ((Integer) input [3]).intValue ();
- readBufferLength = ((Integer) input [4]).intValue ();
- line = ((Integer) input [5]).intValue ();
- encoding = ((Integer) input [6]).intValue ();
- readBufferOverflow = ((Integer) input [7]).intValue ();
- is = (InputStream) input [8];
- currentByteCount = ((Integer) input [9]).intValue ();
- column = ((Integer) input [10]).intValue ();
- reader = (Reader) input [11];
- }
-
+ {
+ String ename = (String) entityStack.removeLast();
- /**
- * Return true if we can read the expected character.
- * <p>Note that the character will be removed from the input stream
- * on success, but will be put back on failure. Do not attempt to
- * read the character again if the method succeeds.
- * @param delim The character that should appear next. For a
- * insensitive match, you must supply this in upper-case.
- * @return true if the character was successfully read, or false if
- * it was not.
- * @see #tryRead (String)
- */
- private boolean tryRead (char delim)
- throws SAXException, IOException
- {
- char c;
-
- // Read the character
- c = readCh ();
-
- // Test for a match, and push the character
- // back if the match fails.
- if (c == delim) {
- return true;
- } else {
- unread (c);
- return false;
- }
- }
+ if (ename != null && doReport)
+ {
+ dataBufferFlush();
+ }
+ switch (sourceType)
+ {
+ case INPUT_STREAM:
+ handler.endExternalEntity(ename);
+ is.close();
+ break;
+ case INPUT_READER:
+ handler.endExternalEntity(ename);
+ reader.close();
+ break;
+ case INPUT_INTERNAL:
+ if (ename != null && doReport)
+ {
+ handler.endInternalEntity(ename);
+ }
+ break;
+ }
+ // Throw an EOFException if there
+ // is nothing else to pop.
+ if (inputStack.isEmpty())
+ {
+ throw new EOFException("no more input");
+ }
- /**
- * Return true if we can read the expected string.
- * <p>This is simply a convenience method.
- * <p>Note that the string will be removed from the input stream
- * on success, but will be put back on failure. Do not attempt to
- * read the string again if the method succeeds.
- * <p>This method will push back a character rather than an
- * array whenever possible (probably the majority of cases).
- * @param delim The string that should appear next.
- * @return true if the string was successfully read, or false if
- * it was not.
- * @see #tryRead (char)
- */
- private boolean tryRead (String delim)
+ Input input = (Input) inputStack.removeLast();
+
+ sourceType = input.sourceType;
+ externalEntity = input.externalEntity;
+ readBuffer = input.readBuffer;
+ readBufferPos = input.readBufferPos;
+ readBufferLength = input.readBufferLength;
+ line = input.line;
+ encoding = input.encoding;
+ readBufferOverflow = input.readBufferOverflow;
+ is = input.is;
+ currentByteCount = input.currentByteCount;
+ column = input.column;
+ reader = input.reader;
+ }
+
+ /**
+ * Return true if we can read the expected character.
+ * <p>Note that the character will be removed from the input stream
+ * on success, but will be put back on failure. Do not attempt to
+ * read the character again if the method succeeds.
+ * @param delim The character that should appear next. For a
+ * insensitive match, you must supply this in upper-case.
+ * @return true if the character was successfully read, or false if
+ * it was not.
+ * @see #tryRead (String)
+ */
+ private boolean tryRead(char delim)
throws SAXException, IOException
- {
- return tryRead (delim.toCharArray ());
- }
+ {
+ char c;
+
+ // Read the character
+ c = readCh();
+
+ // Test for a match, and push the character
+ // back if the match fails.
+ if (c == delim)
+ {
+ return true;
+ }
+ else
+ {
+ unread(c);
+ return false;
+ }
+ }
- private boolean tryRead (char ch [])
+ /**
+ * Return true if we can read the expected string.
+ * <p>This is simply a convenience method.
+ * <p>Note that the string will be removed from the input stream
+ * on success, but will be put back on failure. Do not attempt to
+ * read the string again if the method succeeds.
+ * <p>This method will push back a character rather than an
+ * array whenever possible (probably the majority of cases).
+ * @param delim The string that should appear next.
+ * @return true if the string was successfully read, or false if
+ * it was not.
+ * @see #tryRead (char)
+ */
+ private boolean tryRead(String delim)
throws SAXException, IOException
- {
- char c;
-
- // Compare the input, character-
- // by character.
-
- for (int i = 0; i < ch.length; i++) {
- c = readCh ();
- if (c != ch [i]) {
- unread (c);
- if (i != 0) {
- unread (ch, i);
- }
- return false;
- }
- }
- return true;
- }
-
-
+ {
+ return tryRead(delim.toCharArray());
+ }
- /**
- * Return true if we can read some whitespace.
- * <p>This is simply a convenience method.
- * <p>This method will push back a character rather than an
- * array whenever possible (probably the majority of cases).
- * @return true if whitespace was found.
- */
- private boolean tryWhitespace ()
+ private boolean tryRead(char[] ch)
throws SAXException, IOException
- {
- char c;
- c = readCh ();
- if (isWhitespace (c)) {
- skipWhitespace ();
- return true;
- } else {
- unread (c);
- return false;
- }
- }
+ {
+ char c;
+ // Compare the input, character-
+ // by character.
+
+ for (int i = 0; i < ch.length; i++)
+ {
+ c = readCh();
+ if (c != ch[i])
+ {
+ unread(c);
+ if (i != 0)
+ {
+ unread(ch, i);
+ }
+ return false;
+ }
+ }
+ return true;
+ }
- /**
- * Read all data until we find the specified string.
- * This is useful for scanning CDATA sections and PIs.
- * <p>This is inefficient right now, since it calls tryRead ()
- * for every character.
- * @param delim The string delimiter
- * @see #tryRead (String, boolean)
- * @see #readCh
- */
- private void parseUntil (String delim)
+ /**
+ * Return true if we can read some whitespace.
+ * <p>This is simply a convenience method.
+ * <p>This method will push back a character rather than an
+ * array whenever possible (probably the majority of cases).
+ * @return true if whitespace was found.
+ */
+ private boolean tryWhitespace()
throws SAXException, IOException
- {
- parseUntil (delim.toCharArray ());
- }
-
- private void parseUntil (char delim [])
+ {
+ char c;
+ c = readCh();
+ if (isWhitespace(c))
+ {
+ skipWhitespace();
+ return true;
+ }
+ else
+ {
+ unread(c);
+ return false;
+ }
+ }
+
+ /**
+ * Read all data until we find the specified string.
+ * This is useful for scanning CDATA sections and PIs.
+ * <p>This is inefficient right now, since it calls tryRead ()
+ * for every character.
+ * @param delim The string delimiter
+ * @see #tryRead (String, boolean)
+ * @see #readCh
+ */
+ private void parseUntil(String delim)
throws SAXException, IOException
- {
- char c;
- int startLine = line;
-
- try {
- while (!tryRead (delim)) {
- c = readCh ();
- dataBufferAppend (c);
- }
- } catch (EOFException e) {
- error ("end of input while looking for delimiter "
- + "(started on line " + startLine
- + ')', null, new String (delim));
- }
- }
-
-
- //////////////////////////////////////////////////////////////////////
- // Low-level I/O.
- //////////////////////////////////////////////////////////////////////
+ {
+ parseUntil(delim.toCharArray());
+ }
+ private void parseUntil(char[] delim)
+ throws SAXException, IOException
+ {
+ char c;
+ int startLine = line;
+
+ try
+ {
+ while (!tryRead(delim))
+ {
+ c = readCh();
+ dataBufferAppend(c);
+ }
+ }
+ catch (EOFException e)
+ {
+ error("end of input while looking for delimiter "
+ + "(started on line " + startLine
+ + ')', null, new String(delim));
+ }
+ }
- /**
- * Prefetch US-ASCII XML/text decl from input stream into read buffer.
- * Doesn't buffer more than absolutely needed, so that when an encoding
- * decl says we need to create an InputStreamReader, we can discard our
- * buffer and reset(). Caller knows the first chars of the decl exist
- * in the input stream.
- */
- private void prefetchASCIIEncodingDecl ()
+ //////////////////////////////////////////////////////////////////////
+ // Low-level I/O.
+ //////////////////////////////////////////////////////////////////////
+
+ /**
+ * Prefetch US-ASCII XML/text decl from input stream into read buffer.
+ * Doesn't buffer more than absolutely needed, so that when an encoding
+ * decl says we need to create an InputStreamReader, we can discard our
+ * buffer and reset(). Caller knows the first chars of the decl exist
+ * in the input stream.
+ */
+ private void prefetchASCIIEncodingDecl()
throws SAXException, IOException
- {
- int ch;
- readBufferPos = readBufferLength = 0;
-
- is.mark (readBuffer.length);
- while (true) {
- ch = is.read ();
- readBuffer [readBufferLength++] = (char) ch;
- switch (ch) {
- case (int) '>':
- return;
- case -1:
- error ("file ends before end of XML or encoding declaration.",
- null, "?>");
- }
- if (readBuffer.length == readBufferLength)
- error ("unfinished XML or encoding declaration");
- }
- }
+ {
+ int ch;
+ readBufferPos = readBufferLength = 0;
+
+ is.mark(readBuffer.length);
+ while (true)
+ {
+ ch = is.read();
+ readBuffer[readBufferLength++] = (char) ch;
+ switch (ch)
+ {
+ case (int) '>':
+ return;
+ case -1:
+ error("file ends before end of XML or encoding declaration.",
+ null, "?>");
+ }
+ if (readBuffer.length == readBufferLength)
+ {
+ error("unfinished XML or encoding declaration");
+ }
+ }
+ }
- /**
- * Read a chunk of data from an external input source.
- * <p>This is simply a front-end that fills the rawReadBuffer
- * with bytes, then calls the appropriate encoding handler.
- * @see #encoding
- * @see #rawReadBuffer
- * @see #readBuffer
- * @see #filterCR
- * @see #copyUtf8ReadBuffer
- * @see #copyIso8859_1ReadBuffer
- * @see #copyUcs_2ReadBuffer
- * @see #copyUcs_4ReadBuffer
- */
- private void readDataChunk ()
+ /**
+ * Read a chunk of data from an external input source.
+ * <p>This is simply a front-end that fills the rawReadBuffer
+ * with bytes, then calls the appropriate encoding handler.
+ * @see #encoding
+ * @see #rawReadBuffer
+ * @see #readBuffer
+ * @see #filterCR
+ * @see #copyUtf8ReadBuffer
+ * @see #copyIso8859_1ReadBuffer
+ * @see #copyUcs_2ReadBuffer
+ * @see #copyUcs_4ReadBuffer
+ */
+ private void readDataChunk()
throws SAXException, IOException
- {
- int count;
-
- // See if we have any overflow (filterCR sets for CR at end)
- if (readBufferOverflow > -1) {
- readBuffer [0] = (char) readBufferOverflow;
- readBufferOverflow = -1;
- readBufferPos = 1;
- sawCR = true;
- } else {
- readBufferPos = 0;
- sawCR = false;
- }
-
- // input from a character stream.
- if (sourceType == INPUT_READER) {
- count = reader.read (readBuffer,
- readBufferPos, READ_BUFFER_MAX - readBufferPos);
- if (count < 0)
- readBufferLength = readBufferPos;
- else
- readBufferLength = readBufferPos + count;
- if (readBufferLength > 0)
- filterCR (count >= 0);
- sawCR = false;
- return;
- }
-
- // Read as many bytes as possible into the raw buffer.
- count = is.read (rawReadBuffer, 0, READ_BUFFER_MAX);
-
- // Dispatch to an encoding-specific reader method to populate
- // the readBuffer. In most parser speed profiles, these routines
- // show up at the top of the CPU usage chart.
- if (count > 0) {
- switch (encoding) {
- // one byte builtins
- case ENCODING_ASCII:
- copyIso8859_1ReadBuffer (count, (char) 0x0080);
- break;
- case ENCODING_UTF_8:
- copyUtf8ReadBuffer (count);
- break;
- case ENCODING_ISO_8859_1:
- copyIso8859_1ReadBuffer (count, (char) 0);
- break;
-
- // two byte builtins
- case ENCODING_UCS_2_12:
- copyUcs2ReadBuffer (count, 8, 0);
- break;
- case ENCODING_UCS_2_21:
- copyUcs2ReadBuffer (count, 0, 8);
- break;
-
- // four byte builtins
- case ENCODING_UCS_4_1234:
- copyUcs4ReadBuffer (count, 24, 16, 8, 0);
- break;
- case ENCODING_UCS_4_4321:
- copyUcs4ReadBuffer (count, 0, 8, 16, 24);
- break;
- case ENCODING_UCS_4_2143:
- copyUcs4ReadBuffer (count, 16, 24, 0, 8);
- break;
- case ENCODING_UCS_4_3412:
- copyUcs4ReadBuffer (count, 8, 0, 24, 16);
- break;
- }
- } else
- readBufferLength = readBufferPos;
-
- readBufferPos = 0;
-
- // Filter out all carriage returns if we've seen any
- // (including any saved from a previous read)
- if (sawCR) {
- filterCR (count >= 0);
- sawCR = false;
-
- // must actively report EOF, lest some CRs get lost.
- if (readBufferLength == 0 && count >= 0)
- readDataChunk ();
- }
-
- if (count > 0)
- currentByteCount += count;
- }
+ {
+ int count;
+
+ // See if we have any overflow (filterCR sets for CR at end)
+ if (readBufferOverflow > -1)
+ {
+ readBuffer[0] = (char) readBufferOverflow;
+ readBufferOverflow = -1;
+ readBufferPos = 1;
+ sawCR = true;
+ }
+ else
+ {
+ readBufferPos = 0;
+ sawCR = false;
+ }
+ // input from a character stream.
+ if (sourceType == INPUT_READER)
+ {
+ count = reader.read(readBuffer,
+ readBufferPos, READ_BUFFER_MAX - readBufferPos);
+ if (count < 0)
+ {
+ readBufferLength = readBufferPos;
+ }
+ else
+ {
+ readBufferLength = readBufferPos + count;
+ }
+ if (readBufferLength > 0)
+ {
+ filterCR(count >= 0);
+ }
+ sawCR = false;
+ return;
+ }
+
+ // Read as many bytes as possible into the raw buffer.
+ count = is.read(rawReadBuffer, 0, READ_BUFFER_MAX);
+
+ // Dispatch to an encoding-specific reader method to populate
+ // the readBuffer. In most parser speed profiles, these routines
+ // show up at the top of the CPU usage chart.
+ if (count > 0)
+ {
+ switch (encoding)
+ {
+ // one byte builtins
+ case ENCODING_ASCII:
+ copyIso8859_1ReadBuffer(count, (char) 0x0080);
+ break;
+ case ENCODING_UTF_8:
+ copyUtf8ReadBuffer(count);
+ break;
+ case ENCODING_ISO_8859_1:
+ copyIso8859_1ReadBuffer(count, (char) 0);
+ break;
- /**
- * Filter carriage returns in the read buffer.
- * CRLF becomes LF; CR becomes LF.
- * @param moreData true iff more data might come from the same source
- * @see #readDataChunk
- * @see #readBuffer
- * @see #readBufferOverflow
- */
- private void filterCR (boolean moreData)
- {
- int i, j;
+ // two byte builtins
+ case ENCODING_UCS_2_12:
+ copyUcs2ReadBuffer(count, 8, 0);
+ break;
+ case ENCODING_UCS_2_21:
+ copyUcs2ReadBuffer(count, 0, 8);
+ break;
+
+ // four byte builtins
+ case ENCODING_UCS_4_1234:
+ copyUcs4ReadBuffer(count, 24, 16, 8, 0);
+ break;
+ case ENCODING_UCS_4_4321:
+ copyUcs4ReadBuffer(count, 0, 8, 16, 24);
+ break;
+ case ENCODING_UCS_4_2143:
+ copyUcs4ReadBuffer(count, 16, 24, 0, 8);
+ break;
+ case ENCODING_UCS_4_3412:
+ copyUcs4ReadBuffer(count, 8, 0, 24, 16);
+ break;
+ }
+ }
+ else
+ {
+ readBufferLength = readBufferPos;
+ }
- readBufferOverflow = -1;
+ readBufferPos = 0;
+
+ // Filter out all carriage returns if we've seen any
+ // (including any saved from a previous read)
+ if (sawCR)
+ {
+ filterCR(count >= 0);
+ sawCR = false;
+
+ // must actively report EOF, lest some CRs get lost.
+ if (readBufferLength == 0 && count >= 0)
+ {
+ readDataChunk();
+ }
+ }
+
+ if (count > 0)
+ {
+ currentByteCount += count;
+ }
+ }
+
+ /**
+ * Filter carriage returns in the read buffer.
+ * CRLF becomes LF; CR becomes LF.
+ * @param moreData true iff more data might come from the same source
+ * @see #readDataChunk
+ * @see #readBuffer
+ * @see #readBufferOverflow
+ */
+ private void filterCR(boolean moreData)
+ {
+ int i, j;
+ readBufferOverflow = -1;
+
loop:
- for (i = j = readBufferPos; j < readBufferLength; i++, j++) {
- switch (readBuffer [j]) {
- case '\r':
- if (j == readBufferLength - 1) {
- if (moreData) {
- readBufferOverflow = '\r';
- readBufferLength--;
- } else // CR at end of buffer
- readBuffer [i++] = '\n';
- break loop;
- } else if (readBuffer [j + 1] == '\n') {
- j++;
- }
- readBuffer [i] = '\n';
- break;
-
- case '\n':
- default:
- readBuffer [i] = readBuffer [j];
- break;
- }
- }
- readBufferLength = i;
- }
+ for (i = j = readBufferPos; j < readBufferLength; i++, j++)
+ {
+ switch (readBuffer[j])
+ {
+ case '\r':
+ if (j == readBufferLength - 1)
+ {
+ if (moreData)
+ {
+ readBufferOverflow = '\r';
+ readBufferLength--;
+ }
+ else // CR at end of buffer
+ {
+ readBuffer[i++] = '\n';
+ }
+ break loop;
+ }
+ else if (readBuffer[j + 1] == '\n')
+ {
+ j++;
+ }
+ readBuffer[i] = '\n';
+ break;
- /**
- * Convert a buffer of UTF-8-encoded bytes into UTF-16 characters.
- * <p>When readDataChunk () calls this method, the raw bytes are in
- * rawReadBuffer, and the final characters will appear in
- * readBuffer.
- * <p>Note that as of Unicode 3.1, good practice became a requirement,
- * so that each Unicode character has exactly one UTF-8 representation.
- * @param count The number of bytes to convert.
- * @see #readDataChunk
- * @see #rawReadBuffer
- * @see #readBuffer
- * @see #getNextUtf8Byte
- */
- private void copyUtf8ReadBuffer (int count)
+ case '\n':
+ default:
+ readBuffer[i] = readBuffer[j];
+ break;
+ }
+ }
+ readBufferLength = i;
+ }
+
+ /**
+ * Convert a buffer of UTF-8-encoded bytes into UTF-16 characters.
+ * <p>When readDataChunk () calls this method, the raw bytes are in
+ * rawReadBuffer, and the final characters will appear in
+ * readBuffer.
+ * <p>Note that as of Unicode 3.1, good practice became a requirement,
+ * so that each Unicode character has exactly one UTF-8 representation.
+ * @param count The number of bytes to convert.
+ * @see #readDataChunk
+ * @see #rawReadBuffer
+ * @see #readBuffer
+ * @see #getNextUtf8Byte
+ */
+ private void copyUtf8ReadBuffer(int count)
throws SAXException, IOException
- {
- int i = 0;
- int j = readBufferPos;
- int b1;
- char c = 0;
-
- /*
- // check once, so the runtime won't (if it's smart enough)
- if (count < 0 || count > rawReadBuffer.length)
- throw new ArrayIndexOutOfBoundsException (Integer.toString (count));
- */
-
- while (i < count) {
- b1 = rawReadBuffer [i++];
-
- // Determine whether we are dealing
- // with a one-, two-, three-, or four-
- // byte sequence.
- if (b1 < 0) {
- if ((b1 & 0xe0) == 0xc0) {
- // 2-byte sequence: 00000yyyyyxxxxxx = 110yyyyy 10xxxxxx
- c = (char) (((b1 & 0x1f) << 6)
- | getNextUtf8Byte (i++, count));
- if (c < 0x0080)
- encodingError ("Illegal two byte UTF-8 sequence",
- c, 0);
- //Sec 2.11
- // [1] the two-character sequence #xD #xA
- // [2] the two-character sequence #xD #x85
- if ((c == 0x0085 || c == 0x000a) && sawCR)
- continue;
-
- // Sec 2.11
- // [3] the single character #x85
-
- if(c == 0x0085 && xmlVersion == XML_11)
- readBuffer[j++] = '\r';
- } else if ((b1 & 0xf0) == 0xe0) {
- // 3-byte sequence:
- // zzzzyyyyyyxxxxxx = 1110zzzz 10yyyyyy 10xxxxxx
- // most CJKV characters
- c = (char) (((b1 & 0x0f) << 12) |
- (getNextUtf8Byte (i++, count) << 6) |
- getNextUtf8Byte (i++, count));
- //sec 2.11
- //[4] the single character #x2028
- if(c == 0x2028 && xmlVersion == XML_11){
- readBuffer[j++] = '\r';
- sawCR = true;
- continue;
- }
- if (c < 0x0800 || (c >= 0xd800 && c <= 0xdfff))
- encodingError ("Illegal three byte UTF-8 sequence",
- c, 0);
- } else if ((b1 & 0xf8) == 0xf0) {
- // 4-byte sequence: 11101110wwwwzzzzyy + 110111yyyyxxxxxx
- // = 11110uuu 10uuzzzz 10yyyyyy 10xxxxxx
- // (uuuuu = wwww + 1)
- // "Surrogate Pairs" ... from the "Astral Planes"
- // Unicode 3.1 assigned the first characters there
- int iso646 = b1 & 07;
- iso646 = (iso646 << 6) + getNextUtf8Byte (i++, count);
- iso646 = (iso646 << 6) + getNextUtf8Byte (i++, count);
- iso646 = (iso646 << 6) + getNextUtf8Byte (i++, count);
-
- if (iso646 <= 0xffff) {
- encodingError ("Illegal four byte UTF-8 sequence",
- iso646, 0);
- } else {
- if (iso646 > 0x0010ffff)
- encodingError (
- "UTF-8 value out of range for Unicode",
- iso646, 0);
- iso646 -= 0x010000;
- readBuffer [j++] = (char) (0xd800 | (iso646 >> 10));
- readBuffer [j++] = (char) (0xdc00 | (iso646 & 0x03ff));
- continue;
- }
- } else {
- // The five and six byte encodings aren't supported;
- // they exceed the Unicode (and XML) range.
- encodingError (
- "unsupported five or six byte UTF-8 sequence",
- 0xff & b1, i);
- // NOTREACHED
- c = 0;
- }
- } else {
- // 1-byte sequence: 000000000xxxxxxx = 0xxxxxxx
- // (US-ASCII character, "common" case, one branch to here)
- c = (char) b1;
- }
- readBuffer [j++] = c;
- if (c == '\r')
- sawCR = true;
- }
- // How many characters have we read?
- readBufferLength = j;
- }
+ {
+ int i = 0;
+ int j = readBufferPos;
+ int b1;
+ char c = 0;
+
+ /*
+ // check once, so the runtime won't (if it's smart enough)
+ if (count < 0 || count > rawReadBuffer.length)
+ throw new ArrayIndexOutOfBoundsException (Integer.toString (count));
+ */
+ while (i < count)
+ {
+ b1 = rawReadBuffer[i++];
- /**
- * Return the next byte value in a UTF-8 sequence.
- * If it is not possible to get a byte from the current
- * entity, throw an exception.
- * @param pos The current position in the rawReadBuffer.
- * @param count The number of bytes in the rawReadBuffer
- * @return The significant six bits of a non-initial byte in
- * a UTF-8 sequence.
- * @exception EOFException If the sequence is incomplete.
- */
- private int getNextUtf8Byte (int pos, int count)
+ // Determine whether we are dealing
+ // with a one-, two-, three-, or four-
+ // byte sequence.
+ if (b1 < 0)
+ {
+ if ((b1 & 0xe0) == 0xc0)
+ {
+ // 2-byte sequence: 00000yyyyyxxxxxx = 110yyyyy 10xxxxxx
+ c = (char) (((b1 & 0x1f) << 6)
+ | getNextUtf8Byte(i++, count));
+ if (c < 0x0080)
+ {
+ encodingError("Illegal two byte UTF-8 sequence",
+ c, 0);
+ }
+
+ //Sec 2.11
+ // [1] the two-character sequence #xD #xA
+ // [2] the two-character sequence #xD #x85
+ if ((c == 0x0085 || c == 0x000a) && sawCR)
+ {
+ continue;
+ }
+
+ // Sec 2.11
+ // [3] the single character #x85
+
+ if (c == 0x0085 && xmlVersion == XML_11)
+ {
+ readBuffer[j++] = '\r';
+ }
+ }
+ else if ((b1 & 0xf0) == 0xe0)
+ {
+ // 3-byte sequence:
+ // zzzzyyyyyyxxxxxx = 1110zzzz 10yyyyyy 10xxxxxx
+ // most CJKV characters
+ c = (char) (((b1 & 0x0f) << 12) |
+ (getNextUtf8Byte(i++, count) << 6) |
+ getNextUtf8Byte(i++, count));
+ //sec 2.11
+ //[4] the single character #x2028
+ if (c == 0x2028 && xmlVersion == XML_11)
+ {
+ readBuffer[j++] = '\r';
+ sawCR = true;
+ continue;
+ }
+ if (c < 0x0800 || (c >= 0xd800 && c <= 0xdfff))
+ {
+ encodingError("Illegal three byte UTF-8 sequence",
+ c, 0);
+ }
+ }
+ else if ((b1 & 0xf8) == 0xf0)
+ {
+ // 4-byte sequence: 11101110wwwwzzzzyy + 110111yyyyxxxxxx
+ // = 11110uuu 10uuzzzz 10yyyyyy 10xxxxxx
+ // (uuuuu = wwww + 1)
+ // "Surrogate Pairs" ... from the "Astral Planes"
+ // Unicode 3.1 assigned the first characters there
+ int iso646 = b1 & 07;
+ iso646 = (iso646 << 6) + getNextUtf8Byte(i++, count);
+ iso646 = (iso646 << 6) + getNextUtf8Byte(i++, count);
+ iso646 = (iso646 << 6) + getNextUtf8Byte(i++, count);
+
+ if (iso646 <= 0xffff)
+ {
+ encodingError("Illegal four byte UTF-8 sequence",
+ iso646, 0);
+ }
+ else
+ {
+ if (iso646 > 0x0010ffff)
+ {
+ encodingError("UTF-8 value out of range for Unicode",
+ iso646, 0);
+ }
+ iso646 -= 0x010000;
+ readBuffer[j++] = (char) (0xd800 | (iso646 >> 10));
+ readBuffer[j++] = (char) (0xdc00 | (iso646 & 0x03ff));
+ continue;
+ }
+ }
+ else
+ {
+ // The five and six byte encodings aren't supported;
+ // they exceed the Unicode (and XML) range.
+ encodingError("unsupported five or six byte UTF-8 sequence",
+ 0xff & b1, i);
+ // NOTREACHED
+ c = 0;
+ }
+ }
+ else
+ {
+ // 1-byte sequence: 000000000xxxxxxx = 0xxxxxxx
+ // (US-ASCII character, "common" case, one branch to here)
+ c = (char) b1;
+ }
+ readBuffer[j++] = c;
+ if (c == '\r')
+ {
+ sawCR = true;
+ }
+ }
+ // How many characters have we read?
+ readBufferLength = j;
+ }
+
+ /**
+ * Return the next byte value in a UTF-8 sequence.
+ * If it is not possible to get a byte from the current
+ * entity, throw an exception.
+ * @param pos The current position in the rawReadBuffer.
+ * @param count The number of bytes in the rawReadBuffer
+ * @return The significant six bits of a non-initial byte in
+ * a UTF-8 sequence.
+ * @exception EOFException If the sequence is incomplete.
+ */
+ private int getNextUtf8Byte(int pos, int count)
throws SAXException, IOException
- {
- int val;
-
- // Take a character from the buffer
- // or from the actual input stream.
- if (pos < count) {
- val = rawReadBuffer [pos];
- } else {
- val = is.read ();
- if (val == -1) {
- encodingError ("unfinished multi-byte UTF-8 sequence at EOF",
- -1, pos);
- }
- }
-
- // Check for the correct bits at the start.
- if ((val & 0xc0) != 0x80) {
- encodingError ("bad continuation of multi-byte UTF-8 sequence",
- val, pos + 1);
- }
-
- // Return the significant bits.
- return (val & 0x3f);
- }
+ {
+ int val;
+
+ // Take a character from the buffer
+ // or from the actual input stream.
+ if (pos < count)
+ {
+ val = rawReadBuffer[pos];
+ }
+ else
+ {
+ val = is.read();
+ if (val == -1)
+ {
+ encodingError("unfinished multi-byte UTF-8 sequence at EOF",
+ -1, pos);
+ }
+ }
+ // Check for the correct bits at the start.
+ if ((val & 0xc0) != 0x80)
+ {
+ encodingError("bad continuation of multi-byte UTF-8 sequence",
+ val, pos + 1);
+ }
- /**
- * Convert a buffer of US-ASCII or ISO-8859-1-encoded bytes into
- * UTF-16 characters.
- *
- * <p>When readDataChunk () calls this method, the raw bytes are in
- * rawReadBuffer, and the final characters will appear in
- * readBuffer.
- *
- * @param count The number of bytes to convert.
- * @param mask For ASCII conversion, 0x7f; else, 0xff.
- * @see #readDataChunk
- * @see #rawReadBuffer
- * @see #readBuffer
- */
- private void copyIso8859_1ReadBuffer (int count, char mask)
- throws IOException
- {
- int i, j;
- for (i = 0, j = readBufferPos; i < count; i++, j++) {
- char c = (char) (rawReadBuffer [i] & 0xff);
- if ((c & mask) != 0)
- throw new CharConversionException ("non-ASCII character U+"
- + Integer.toHexString (c));
- if (c == 0x0085 && xmlVersion == XML_11)
- c = '\r';
- readBuffer [j] = c;
- if (c == '\r') {
- sawCR = true;
- }
- }
- readBufferLength = j;
- }
+ // Return the significant bits.
+ return (val & 0x3f);
+ }
+ /**
+ * Convert a buffer of US-ASCII or ISO-8859-1-encoded bytes into
+ * UTF-16 characters.
+ *
+ * <p>When readDataChunk () calls this method, the raw bytes are in
+ * rawReadBuffer, and the final characters will appear in
+ * readBuffer.
+ *
+ * @param count The number of bytes to convert.
+ * @param mask For ASCII conversion, 0x7f; else, 0xff.
+ * @see #readDataChunk
+ * @see #rawReadBuffer
+ * @see #readBuffer
+ */
+ private void copyIso8859_1ReadBuffer(int count, char mask)
+ throws IOException
+ {
+ int i, j;
+ for (i = 0, j = readBufferPos; i < count; i++, j++)
+ {
+ char c = (char) (rawReadBuffer[i] & 0xff);
+ if ((c & mask) != 0)
+ {
+ throw new CharConversionException("non-ASCII character U+"
+ + Integer.toHexString(c));
+ }
+ if (c == 0x0085 && xmlVersion == XML_11)
+ {
+ c = '\r';
+ }
+ readBuffer[j] = c;
+ if (c == '\r')
+ {
+ sawCR = true;
+ }
+ }
+ readBufferLength = j;
+ }
- /**
- * Convert a buffer of UCS-2-encoded bytes into UTF-16 characters
- * (as used in Java string manipulation).
- *
- * <p>When readDataChunk () calls this method, the raw bytes are in
- * rawReadBuffer, and the final characters will appear in
- * readBuffer.
- * @param count The number of bytes to convert.
- * @param shift1 The number of bits to shift byte 1.
- * @param shift2 The number of bits to shift byte 2
- * @see #readDataChunk
- * @see #rawReadBuffer
- * @see #readBuffer
- */
- private void copyUcs2ReadBuffer (int count, int shift1, int shift2)
+ /**
+ * Convert a buffer of UCS-2-encoded bytes into UTF-16 characters
+ * (as used in Java string manipulation).
+ *
+ * <p>When readDataChunk () calls this method, the raw bytes are in
+ * rawReadBuffer, and the final characters will appear in
+ * readBuffer.
+ * @param count The number of bytes to convert.
+ * @param shift1 The number of bits to shift byte 1.
+ * @param shift2 The number of bits to shift byte 2
+ * @see #readDataChunk
+ * @see #rawReadBuffer
+ * @see #readBuffer
+ */
+ private void copyUcs2ReadBuffer(int count, int shift1, int shift2)
throws SAXException
- {
- int j = readBufferPos;
-
- if (count > 0 && (count % 2) != 0) {
- encodingError ("odd number of bytes in UCS-2 encoding", -1, count);
- }
- // The loops are faster with less internal brancing; hence two
- if (shift1 == 0) { // "UTF-16-LE"
- for (int i = 0; i < count; i += 2) {
- char c = (char) (rawReadBuffer [i + 1] << 8);
- c |= 0xff & rawReadBuffer [i];
- readBuffer [j++] = c;
- if (c == '\r')
- sawCR = true;
- }
- } else { // "UTF-16-BE"
- for (int i = 0; i < count; i += 2) {
- char c = (char) (rawReadBuffer [i] << 8);
- c |= 0xff & rawReadBuffer [i + 1];
- readBuffer [j++] = c;
- if (c == '\r')
- sawCR = true;
- }
- }
- readBufferLength = j;
- }
-
+ {
+ int j = readBufferPos;
+
+ if (count > 0 && (count % 2) != 0)
+ {
+ encodingError("odd number of bytes in UCS-2 encoding", -1, count);
+ }
+ // The loops are faster with less internal brancing; hence two
+ if (shift1 == 0)
+ { // "UTF-16-LE"
+ for (int i = 0; i < count; i += 2)
+ {
+ char c = (char) (rawReadBuffer[i + 1] << 8);
+ c |= 0xff & rawReadBuffer[i];
+ readBuffer[j++] = c;
+ if (c == '\r')
+ {
+ sawCR = true;
+ }
+ }
+ }
+ else
+ { // "UTF-16-BE"
+ for (int i = 0; i < count; i += 2)
+ {
+ char c = (char) (rawReadBuffer[i] << 8);
+ c |= 0xff & rawReadBuffer[i + 1];
+ readBuffer[j++] = c;
+ if (c == '\r')
+ {
+ sawCR = true;
+ }
+ }
+ }
+ readBufferLength = j;
+ }
- /**
- * Convert a buffer of UCS-4-encoded bytes into UTF-16 characters.
- *
- * <p>When readDataChunk () calls this method, the raw bytes are in
- * rawReadBuffer, and the final characters will appear in
- * readBuffer.
- * <p>Java has Unicode chars, and this routine uses surrogate pairs
- * for ISO-10646 values between 0x00010000 and 0x000fffff. An
- * exception is thrown if the ISO-10646 character has no Unicode
- * representation.
- *
- * @param count The number of bytes to convert.
- * @param shift1 The number of bits to shift byte 1.
- * @param shift2 The number of bits to shift byte 2
- * @param shift3 The number of bits to shift byte 2
- * @param shift4 The number of bits to shift byte 2
- * @see #readDataChunk
- * @see #rawReadBuffer
- * @see #readBuffer
- */
- private void copyUcs4ReadBuffer (int count, int shift1, int shift2,
- int shift3, int shift4)
+ /**
+ * Convert a buffer of UCS-4-encoded bytes into UTF-16 characters.
+ *
+ * <p>When readDataChunk () calls this method, the raw bytes are in
+ * rawReadBuffer, and the final characters will appear in
+ * readBuffer.
+ * <p>Java has Unicode chars, and this routine uses surrogate pairs
+ * for ISO-10646 values between 0x00010000 and 0x000fffff. An
+ * exception is thrown if the ISO-10646 character has no Unicode
+ * representation.
+ *
+ * @param count The number of bytes to convert.
+ * @param shift1 The number of bits to shift byte 1.
+ * @param shift2 The number of bits to shift byte 2
+ * @param shift3 The number of bits to shift byte 2
+ * @param shift4 The number of bits to shift byte 2
+ * @see #readDataChunk
+ * @see #rawReadBuffer
+ * @see #readBuffer
+ */
+ private void copyUcs4ReadBuffer(int count, int shift1, int shift2,
+ int shift3, int shift4)
throws SAXException
- {
- int j = readBufferPos;
-
- if (count > 0 && (count % 4) != 0) {
- encodingError (
- "number of bytes in UCS-4 encoding not divisible by 4",
- -1, count);
- }
- for (int i = 0; i < count; i += 4) {
- int value = (((rawReadBuffer [i] & 0xff) << shift1) |
- ((rawReadBuffer [i + 1] & 0xff) << shift2) |
- ((rawReadBuffer [i + 2] & 0xff) << shift3) |
- ((rawReadBuffer [i + 3] & 0xff) << shift4));
- if (value < 0x0000ffff) {
- readBuffer [j++] = (char) value;
- if (value == (int) '\r') {
- sawCR = true;
- }
- } else if (value < 0x0010ffff) {
- value -= 0x010000;
- readBuffer [j++] = (char) (0xd8 | ((value >> 10) & 0x03ff));
- readBuffer [j++] = (char) (0xdc | (value & 0x03ff));
- } else {
- encodingError ("UCS-4 value out of range for Unicode",
- value, i);
- }
- }
- readBufferLength = j;
- }
-
+ {
+ int j = readBufferPos;
+
+ if (count > 0 && (count % 4) != 0)
+ {
+ encodingError("number of bytes in UCS-4 encoding " +
+ "not divisible by 4",
+ -1, count);
+ }
+ for (int i = 0; i < count; i += 4)
+ {
+ int value = (((rawReadBuffer [i] & 0xff) << shift1) |
+ ((rawReadBuffer [i + 1] & 0xff) << shift2) |
+ ((rawReadBuffer [i + 2] & 0xff) << shift3) |
+ ((rawReadBuffer [i + 3] & 0xff) << shift4));
+ if (value < 0x0000ffff)
+ {
+ readBuffer [j++] = (char) value;
+ if (value == (int) '\r')
+ {
+ sawCR = true;
+ }
+ }
+ else if (value < 0x0010ffff)
+ {
+ value -= 0x010000;
+ readBuffer[j++] = (char) (0xd8 | ((value >> 10) & 0x03ff));
+ readBuffer[j++] = (char) (0xdc | (value & 0x03ff));
+ }
+ else
+ {
+ encodingError("UCS-4 value out of range for Unicode",
+ value, i);
+ }
+ }
+ readBufferLength = j;
+ }
- /**
- * Report a character encoding error.
- */
- private void encodingError (String message, int value, int offset)
+ /**
+ * Report a character encoding error.
+ */
+ private void encodingError(String message, int value, int offset)
throws SAXException
- {
- if (value != -1)
- message = message + " (character code: 0x" +
- Integer.toHexString (value) + ')';
- error (message);
- }
+ {
+ if (value != -1)
+ {
+ message = message + " (character code: 0x" +
+ Integer.toHexString(value) + ')';
+ error(message);
+ }
+ }
+
+ //////////////////////////////////////////////////////////////////////
+ // Local Variables.
+ //////////////////////////////////////////////////////////////////////
+
+ /**
+ * Re-initialize the variables for each parse.
+ */
+ private void initializeVariables()
+ {
+ // First line
+ line = 1;
+ column = 0;
+
+ // Set up the buffers for data and names
+ dataBufferPos = 0;
+ dataBuffer = new char[DATA_BUFFER_INITIAL];
+ nameBufferPos = 0;
+ nameBuffer = new char[NAME_BUFFER_INITIAL];
+
+ // Set up the DTD hash tables
+ elementInfo = new HashMap();
+ entityInfo = new HashMap();
+ notationInfo = new HashMap();
+ skippedPE = false;
+
+ // Set up the variables for the current
+ // element context.
+ currentElement = null;
+ currentElementContent = CONTENT_UNDECLARED;
+
+ // Set up the input variables
+ sourceType = INPUT_NONE;
+ inputStack = new LinkedList();
+ entityStack = new LinkedList();
+ externalEntity = null;
+ tagAttributePos = 0;
+ tagAttributes = new String[100];
+ rawReadBuffer = new byte[READ_BUFFER_MAX];
+ readBufferOverflow = -1;
+
+ scratch = new InputSource();
+
+ inLiteral = false;
+ expandPE = false;
+ peIsError = false;
+
+ doReport = false;
+
+ inCDATA = false;
+
+ symbolTable = new Object[SYMBOL_TABLE_LENGTH][];
+ }
+ static class ExternalIdentifiers
+ {
- //////////////////////////////////////////////////////////////////////
- // Local Variables.
- //////////////////////////////////////////////////////////////////////
+ String publicId;
+ String systemId;
+ String baseUri;
- /**
- * Re-initialize the variables for each parse.
- */
- private void initializeVariables ()
+ ExternalIdentifiers()
{
- // First line
- line = 1;
- column = 0;
-
- // Set up the buffers for data and names
- dataBufferPos = 0;
- dataBuffer = new char [DATA_BUFFER_INITIAL];
- nameBufferPos = 0;
- nameBuffer = new char [NAME_BUFFER_INITIAL];
-
- // Set up the DTD hash tables
- elementInfo = new Hashtable ();
- entityInfo = new Hashtable ();
- notationInfo = new Hashtable ();
- skippedPE = false;
-
- // Set up the variables for the current
- // element context.
- currentElement = null;
- currentElementContent = CONTENT_UNDECLARED;
-
- // Set up the input variables
- sourceType = INPUT_NONE;
- inputStack = new Stack ();
- entityStack = new Stack ();
- externalEntity = null;
- tagAttributePos = 0;
- tagAttributes = new String [100];
- rawReadBuffer = new byte [READ_BUFFER_MAX];
- readBufferOverflow = -1;
-
- scratch = new InputSource ();
-
- inLiteral = false;
- expandPE = false;
- peIsError = false;
-
- doReport = false;
-
- inCDATA = false;
-
- symbolTable = new Object [SYMBOL_TABLE_LENGTH][];
}
+ ExternalIdentifiers(String publicId, String systemId, String baseUri)
+ {
+ this.publicId = publicId;
+ this.systemId = systemId;
+ this.baseUri = baseUri;
+ }
+
+ }
- //
- // The current XML handler interface.
- //
- private SAXDriver handler;
-
- //
- // I/O information.
- //
- private Reader reader; // current reader
- private InputStream is; // current input stream
- private int line; // current line number
- private int column; // current column number
- private int sourceType; // type of input source
- private Stack inputStack; // stack of input soruces
- private URLConnection externalEntity; // current external entity
- private int encoding; // current character encoding
- private int currentByteCount; // bytes read from current source
- private InputSource scratch; // temporary
-
- //
- // Buffers for decoded but unparsed character input.
- //
- private char readBuffer [];
- private int readBufferPos;
- private int readBufferLength;
- private int readBufferOverflow; // overflow from last data chunk.
-
-
- //
- // Buffer for undecoded raw byte input.
- //
- private final static int READ_BUFFER_MAX = 16384;
- private byte rawReadBuffer [];
-
-
- //
- // Buffer for attribute values, char refs, DTD stuff.
- //
- private static int DATA_BUFFER_INITIAL = 4096;
- private char dataBuffer [];
- private int dataBufferPos;
-
- //
- // Buffer for parsed names.
- //
- private static int NAME_BUFFER_INITIAL = 1024;
- private char nameBuffer [];
- private int nameBufferPos;
-
- //
- // Save any standalone flag
- //
- private boolean docIsStandalone;
-
- //
- // Hashtables for DTD information on elements, entities, and notations.
- // Populated until we start ignoring decls (because of skipping a PE)
- //
- private Hashtable elementInfo;
- private Hashtable entityInfo;
- private Hashtable notationInfo;
- private boolean skippedPE;
-
-
- //
- // Element type currently in force.
- //
- private String currentElement;
- private int currentElementContent;
-
- //
- // Stack of entity names, to detect recursion.
- //
- private Stack entityStack;
-
- //
- // PE expansion is enabled in most chunks of the DTD, not all.
- // When it's enabled, literals are treated differently.
- //
- private boolean inLiteral;
- private boolean expandPE;
- private boolean peIsError;
-
- //
- // can't report entity expansion inside two constructs:
- // - attribute expansions (internal entities only)
- // - markup declarations (parameter entities only)
- //
- private boolean doReport;
-
- //
- // Symbol table, for caching interned names.
- //
- // These show up wherever XML names or nmtokens are used: naming elements,
- // attributes, PIs, notations, entities, and enumerated attribute values.
- //
- // NOTE: This hashtable doesn't grow. The default size is intended to be
- // rather large for most documents. Example: one snapshot of the DocBook
- // XML 4.1 DTD used only about 350 such names. As a rule, only pathological
- // documents (ones that don't reuse names) should ever see much collision.
- //
- // Be sure that SYMBOL_TABLE_LENGTH always stays prime, for best hashing.
- // "2039" keeps the hash table size at about two memory pages on typical
- // 32 bit hardware.
- //
- private final static int SYMBOL_TABLE_LENGTH = 2039;
+ static class EntityInfo
+ {
- private Object symbolTable [][];
+ int type;
+ ExternalIdentifiers ids;
+ String value;
+ String notationName;
+
+ }
- //
- // Hash table of attributes found in current start tag.
- //
- private String tagAttributes [];
- private int tagAttributePos;
+ static class AttributeDecl
+ {
+
+ String type;
+ String value;
+ int valueType;
+ String enumeration;
+ String defaultValue;
- //
- // Utility flag: have we noticed a CR while reading the last
- // data chunk? If so, we will have to go back and normalise
- // CR or CR/LF line ends.
- //
- private boolean sawCR;
+ }
- //
- // Utility flag: are we in CDATA? If so, whitespace isn't ignorable.
- //
- private boolean inCDATA;
+ static class ElementDecl
+ {
- //
- // Xml version.
- //
- private static final int XML_10 = 0;
- private static final int XML_11 = 1;
- private int xmlVersion = XML_10;
+ int contentType;
+ String contentModel;
+ HashMap attributes;
+
+ }
+
+ static class Input
+ {
+
+ int sourceType;
+ URLConnection externalEntity;
+ char[] readBuffer;
+ int readBufferPos;
+ int readBufferLength;
+ int line;
+ int encoding;
+ int readBufferOverflow;
+ InputStream is;
+ int currentByteCount;
+ int column;
+ Reader reader;
+
+ }
+
}
+
diff --git a/libjava/gnu/xml/aelfred2/XmlReader.java b/libjava/gnu/xml/aelfred2/XmlReader.java
index 96c9c723fb6..dacf8b103d1 100644
--- a/libjava/gnu/xml/aelfred2/XmlReader.java
+++ b/libjava/gnu/xml/aelfred2/XmlReader.java
@@ -70,246 +70,305 @@ import gnu.xml.pipeline.ValidationConsumer;
*
* @author David Brownell
*/
-public final class XmlReader implements XMLReader
+public final class XmlReader
+ implements XMLReader
{
- private SAXDriver aelfred2 = new SAXDriver ();
- private EventFilter filter = new EventFilter ();
- private boolean isValidating;
- private boolean active;
-
- /** Constructs a SAX Parser. */
- public XmlReader ()
- { }
-
- /**
- * Constructs a SAX Parser, optionally treating validity errors
- * as if they were fatal errors.
- */
- public XmlReader (boolean invalidIsFatal)
- {
- if (invalidIsFatal)
- setErrorHandler (new DefaultHandler2 () {
- public void error (SAXParseException e)
- throws SAXException
- { throw e; }
- });
- }
-
- /**
- * <b>SAX2</b>: Returns the object used to report the logical
- * content of an XML document.
- */
- public ContentHandler getContentHandler ()
- { return filter.getContentHandler (); }
-
- /**
- * <b>SAX2</b>: Assigns the object used to report the logical
- * content of an XML document.
- * @exception IllegalStateException if called mid-parse
- */
- public void setContentHandler (ContentHandler handler)
+ static class FatalErrorHandler
+ extends DefaultHandler2
+ {
+
+ public void error(SAXParseException e)
+ throws SAXException
{
- if (active)
- throw new IllegalStateException ("already parsing");
- filter.setContentHandler (handler);
+ throw e;
}
-
- /**
- * <b>SAX2</b>: Returns the object used to process declarations related
- * to notations and unparsed entities.
- */
- public DTDHandler getDTDHandler ()
- { return filter.getDTDHandler (); }
-
- /**
- * <b>SAX1</b> Assigns DTD handler
- * @exception IllegalStateException if called mid-parse
- */
- public void setDTDHandler (DTDHandler handler)
- {
- if (active)
- throw new IllegalStateException ("already parsing");
- filter.setDTDHandler (handler);
- }
-
- /**
- * <b>SAX2</b>: Returns the object used when resolving external
- * entities during parsing (both general and parameter entities).
- */
- public EntityResolver getEntityResolver ()
- { return aelfred2.getEntityResolver (); }
-
- /** <b>SAX1</b> Assigns parser's entity resolver */
- public void setEntityResolver (EntityResolver handler)
- { aelfred2.setEntityResolver (handler); }
-
- /**
- * <b>SAX2</b>: Returns the object used to receive callbacks for XML
- * errors of all levels (fatal, nonfatal, warning); this is never null;
- */
- public ErrorHandler getErrorHandler ()
- { return aelfred2.getErrorHandler (); }
-
- /**
- * <b>SAX1</b> Assigns error handler
- * @exception IllegalStateException if called mid-parse
- */
- public void setErrorHandler (ErrorHandler handler)
- {
- if (active)
- throw new IllegalStateException ("already parsing");
- aelfred2.setErrorHandler (handler);
- }
-
- /**
- * <b>SAX2</b>: Assigns the specified property.
- * @exception IllegalStateException if called mid-parse
- */
- public void setProperty (String propertyId, Object value)
+
+ }
+
+ private SAXDriver aelfred2 = new SAXDriver();
+ private EventFilter filter = new EventFilter();
+ private boolean isValidating;
+ private boolean active;
+
+ /**
+ * Constructs a SAX Parser.
+ */
+ public XmlReader()
+ {
+ }
+
+ /**
+ * Constructs a SAX Parser, optionally treating validity errors
+ * as if they were fatal errors.
+ */
+ public XmlReader(boolean invalidIsFatal)
+ {
+ if (invalidIsFatal)
+ {
+ setErrorHandler(new FatalErrorHandler());
+ }
+ }
+
+ /**
+ * <b>SAX2</b>: Returns the object used to report the logical
+ * content of an XML document.
+ */
+ public ContentHandler getContentHandler()
+ {
+ return filter.getContentHandler();
+ }
+
+ /**
+ * <b>SAX2</b>: Assigns the object used to report the logical
+ * content of an XML document.
+ * @exception IllegalStateException if called mid-parse
+ */
+ public void setContentHandler(ContentHandler handler)
+ {
+ if (active)
+ {
+ throw new IllegalStateException("already parsing");
+ }
+ filter.setContentHandler(handler);
+ }
+
+ /**
+ * <b>SAX2</b>: Returns the object used to process declarations related
+ * to notations and unparsed entities.
+ */
+ public DTDHandler getDTDHandler()
+ {
+ return filter.getDTDHandler();
+ }
+
+ /**
+ * <b>SAX1</b> Assigns DTD handler
+ * @exception IllegalStateException if called mid-parse
+ */
+ public void setDTDHandler(DTDHandler handler)
+ {
+ if (active)
+ {
+ throw new IllegalStateException("already parsing");
+ }
+ filter.setDTDHandler(handler);
+ }
+
+ /**
+ * <b>SAX2</b>: Returns the object used when resolving external
+ * entities during parsing (both general and parameter entities).
+ */
+ public EntityResolver getEntityResolver()
+ {
+ return aelfred2.getEntityResolver();
+ }
+
+ /**
+ * <b>SAX1</b> Assigns parser's entity resolver
+ */
+ public void setEntityResolver(EntityResolver handler)
+ {
+ aelfred2.setEntityResolver(handler);
+ }
+
+ /**
+ * <b>SAX2</b>: Returns the object used to receive callbacks for XML
+ * errors of all levels (fatal, nonfatal, warning); this is never null;
+ */
+ public ErrorHandler getErrorHandler()
+ {
+ return aelfred2.getErrorHandler();
+ }
+
+ /**
+ * <b>SAX1</b> Assigns error handler
+ * @exception IllegalStateException if called mid-parse
+ */
+ public void setErrorHandler(ErrorHandler handler)
+ {
+ if (active)
+ {
+ throw new IllegalStateException("already parsing");
+ }
+ aelfred2.setErrorHandler(handler);
+ }
+
+ /**
+ * <b>SAX2</b>: Assigns the specified property.
+ * @exception IllegalStateException if called mid-parse
+ */
+ public void setProperty(String propertyId, Object value)
throws SAXNotRecognizedException, SAXNotSupportedException
- {
- if (active)
- throw new IllegalStateException ("already parsing");
- if (getProperty (propertyId) != value)
- filter.setProperty (propertyId, value);
- }
-
- /**
- * <b>SAX2</b>: Returns the specified property.
- */
- public Object getProperty (String propertyId)
+ {
+ if (active)
+ {
+ throw new IllegalStateException("already parsing");
+ }
+ if (getProperty(propertyId) != value)
+ {
+ filter.setProperty(propertyId, value);
+ }
+ }
+
+ /**
+ * <b>SAX2</b>: Returns the specified property.
+ */
+ public Object getProperty(String propertyId)
throws SAXNotRecognizedException
- {
- if ((SAXDriver.PROPERTY + "declaration-handler")
- .equals (propertyId)
- || (SAXDriver.PROPERTY + "lexical-handler")
- .equals (propertyId))
- return filter.getProperty (propertyId);
- throw new SAXNotRecognizedException (propertyId);
- }
-
- private void forceValidating ()
+ {
+ if ((SAXDriver.PROPERTY + "declaration-handler").equals(propertyId)
+ || (SAXDriver.PROPERTY + "lexical-handler").equals(propertyId))
+ {
+ return filter.getProperty(propertyId);
+ }
+ throw new SAXNotRecognizedException(propertyId);
+ }
+
+ private void forceValidating()
throws SAXNotRecognizedException, SAXNotSupportedException
- {
- aelfred2.setFeature (
- SAXDriver.FEATURE + "namespace-prefixes",
- true);
- aelfred2.setFeature (
- SAXDriver.FEATURE + "external-general-entities",
- true);
- aelfred2.setFeature (
- SAXDriver.FEATURE + "external-parameter-entities",
- true);
- }
-
- /**
- * <b>SAX2</b>: Sets the state of features supported in this parser.
- * Note that this parser requires reporting of namespace prefixes when
- * validating.
- */
- public void setFeature (String featureId, boolean state)
+ {
+ aelfred2.setFeature(SAXDriver.FEATURE + "namespace-prefixes",
+ true);
+ aelfred2.setFeature(SAXDriver.FEATURE + "external-general-entities",
+ true);
+ aelfred2.setFeature(SAXDriver.FEATURE + "external-parameter-entities",
+ true);
+ }
+
+ /**
+ * <b>SAX2</b>: Sets the state of features supported in this parser.
+ * Note that this parser requires reporting of namespace prefixes when
+ * validating.
+ */
+ public void setFeature(String featureId, boolean state)
throws SAXNotRecognizedException, SAXNotSupportedException
- {
- boolean value = getFeature (featureId);
-
- if (state == value)
- return;
-
- if ((SAXDriver.FEATURE + "validation").equals (featureId)) {
- if (active)
- throw new SAXNotSupportedException ("already parsing");
- if (state)
- forceValidating ();
- isValidating = state;
- } else
- aelfred2.setFeature (featureId, state);
- }
-
- /**
- * <b>SAX2</b>: Tells whether this parser supports the specified feature.
- * At this time, this directly parallels the underlying SAXDriver,
- * except that validation is optionally supported.
- *
- * @see SAXDriver
- */
- public boolean getFeature (String featureId)
+ {
+ boolean value = getFeature(featureId);
+
+ if (state == value)
+ {
+ return;
+ }
+
+ if ((SAXDriver.FEATURE + "validation").equals(featureId))
+ {
+ if (active)
+ {
+ throw new SAXNotSupportedException("already parsing");
+ }
+ if (state)
+ {
+ forceValidating();
+ }
+ isValidating = state;
+ }
+ else
+ {
+ aelfred2.setFeature(featureId, state);
+ }
+ }
+
+ /**
+ * <b>SAX2</b>: Tells whether this parser supports the specified feature.
+ * At this time, this directly parallels the underlying SAXDriver,
+ * except that validation is optionally supported.
+ *
+ * @see SAXDriver
+ */
+ public boolean getFeature(String featureId)
throws SAXNotRecognizedException, SAXNotSupportedException
- {
- if ((SAXDriver.FEATURE + "validation").equals (featureId))
- return isValidating;
-
- return aelfred2.getFeature (featureId);
- }
-
- /**
- * <b>SAX1</b>: Sets the locale used for diagnostics; currently,
- * only locales using the English language are supported.
- * @param locale The locale for which diagnostics will be generated
- */
- public void setLocale (Locale locale)
+ {
+ if ((SAXDriver.FEATURE + "validation").equals(featureId))
+ {
+ return isValidating;
+ }
+
+ return aelfred2.getFeature(featureId);
+ }
+
+ /**
+ * <b>SAX1</b>: Sets the locale used for diagnostics; currently,
+ * only locales using the English language are supported.
+ * @param locale The locale for which diagnostics will be generated
+ */
+ public void setLocale(Locale locale)
throws SAXException
- { aelfred2.setLocale (locale); }
+ {
+ aelfred2.setLocale(locale);
+ }
- /**
- * <b>SAX1</b>: Preferred API to parse an XML document, using a
- * system identifier (URI).
+ /**
+ * <b>SAX1</b>: Preferred API to parse an XML document, using a
+ * system identifier (URI).
*/
- public void parse (String systemId)
+ public void parse(String systemId)
throws SAXException, IOException
- {
- parse (new InputSource (systemId));
- }
-
- /**
- * <b>SAX1</b>: Underlying API to parse an XML document, used
- * directly when no URI is available. When this is invoked,
- * and the parser is set to validate, some features will be
- * automatically reset to appropriate values: for reporting
- * namespace prefixes, and incorporating external entities.
- *
- * @param source The XML input source.
- *
- * @exception IllegalStateException if called mid-parse
- * @exception SAXException The handlers may throw any SAXException,
- * and the parser normally throws SAXParseException objects.
- * @exception IOException IOExceptions are normally through through
- * the parser if there are problems reading the source document.
- */
- public void parse (InputSource source)
+ {
+ parse(new InputSource(systemId));
+ }
+
+ /**
+ * <b>SAX1</b>: Underlying API to parse an XML document, used
+ * directly when no URI is available. When this is invoked,
+ * and the parser is set to validate, some features will be
+ * automatically reset to appropriate values: for reporting
+ * namespace prefixes, and incorporating external entities.
+ *
+ * @param source The XML input source.
+ *
+ * @exception IllegalStateException if called mid-parse
+ * @exception SAXException The handlers may throw any SAXException,
+ * and the parser normally throws SAXParseException objects.
+ * @exception IOException IOExceptions are normally through through
+ * the parser if there are problems reading the source document.
+ */
+ public void parse(InputSource source)
throws SAXException, IOException
- {
- EventFilter next;
- boolean nsdecls;
-
- synchronized (aelfred2) {
- if (active)
- throw new IllegalStateException ("already parsing");
- active = true;
- }
-
- // set up the output pipeline
- if (isValidating) {
- forceValidating ();
- next = new ValidationConsumer (filter);
- } else
- next = filter;
-
- // connect pipeline and error handler
- // don't let _this_ call to bind() affect xmlns* attributes
- nsdecls = aelfred2.getFeature (
- SAXDriver.FEATURE + "namespace-prefixes");
- EventFilter.bind (aelfred2, next);
- if (!nsdecls)
- aelfred2.setFeature (
- SAXDriver.FEATURE + "namespace-prefixes",
- false);
-
- // parse, clean up
- try {
- aelfred2.parse (source);
- } finally {
- active = false;
- }
- }
+ {
+ EventFilter next;
+ boolean nsdecls;
+
+ synchronized (aelfred2)
+ {
+ if (active)
+ {
+ throw new IllegalStateException("already parsing");
+ }
+ active = true;
+ }
+
+ // set up the output pipeline
+ if (isValidating)
+ {
+ forceValidating();
+ next = new ValidationConsumer(filter);
+ }
+ else
+ {
+ next = filter;
+ }
+
+ // connect pipeline and error handler
+ // don't let _this_ call to bind() affect xmlns* attributes
+ nsdecls = aelfred2.getFeature(SAXDriver.FEATURE + "namespace-prefixes");
+ EventFilter.bind(aelfred2, next);
+ if (!nsdecls)
+ {
+ aelfred2.setFeature(SAXDriver.FEATURE + "namespace-prefixes",
+ false);
+ }
+
+ // parse, clean up
+ try
+ {
+ aelfred2.parse(source);
+ }
+ finally
+ {
+ active = false;
+ }
+ }
+
}
+
diff --git a/libjava/gnu/xml/dom/DomNode.java b/libjava/gnu/xml/dom/DomNode.java
index 20a62c53ba5..f763adf995a 100644
--- a/libjava/gnu/xml/dom/DomNode.java
+++ b/libjava/gnu/xml/dom/DomNode.java
@@ -1686,13 +1686,16 @@ public abstract class DomNode
{
continue;
}
- if (count < notificationSet.length)
+ if (count >= notificationSet.length)
{
- notificationSet[count++] = rec;
+ // very simple growth algorithm
+ int len = Math.max(notificationSet.length, 1);
+ ListenerRecord[] tmp = new ListenerRecord[len * 2];
+ System.arraycopy(notificationSet, 0, tmp, 0,
+ notificationSet.length);
+ notificationSet = tmp;
}
- else
- // XXX fire up some cheap growth algorithm
- throw new RuntimeException("Event notification set size exceeded");
+ notificationSet[count++] = rec;
}
// Notify just those listeners
diff --git a/libjava/include/Makefile.in b/libjava/include/Makefile.in
index 56280f3761c..e31c5437351 100644
--- a/libjava/include/Makefile.in
+++ b/libjava/include/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# Makefile.in generated by automake 1.9.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/libjava/include/jvm.h b/libjava/include/jvm.h
index 62347880bb6..7a5a4eaa28e 100644
--- a/libjava/include/jvm.h
+++ b/libjava/include/jvm.h
@@ -562,14 +562,17 @@ extern void _Jv_RegisterBootstrapPackages ();
#define GCJ_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 10)
#define GCJ_BINARYCOMPAT_ADDITION 5
+// At present we know we are compatible with the BC ABI as used in GCC
+// 4.0.
+#define GCJ_40_BC_ABI_VERSION (4 * 10000 + 0 * 10 + GCJ_BINARYCOMPAT_ADDITION)
+
inline bool
_Jv_CheckABIVersion (unsigned long value)
{
- // For this release, recognize just our defined C++ ABI and our
- // defined BC ABI. (In the future we may recognize past BC ABIs as
- // well.)
+ // Recognize our defined C++ ABI.
return (value == GCJ_VERSION
- || value == (GCJ_VERSION + GCJ_BINARYCOMPAT_ADDITION));
+ // At the moment this is the only BC ABI we recognize.
+ || value == GCJ_40_BC_ABI_VERSION);
}
// It makes the source cleaner if we simply always define this
diff --git a/libjava/include/posix.h b/libjava/include/posix.h
index c8cd5e25e28..28ac243e7c1 100644
--- a/libjava/include/posix.h
+++ b/libjava/include/posix.h
@@ -42,7 +42,7 @@ details. */
// Prefix and suffix for shared libraries.
#define _Jv_platform_solib_prefix "lib"
-#if defined(__APPLE__) && defined(__MACH__) && defined(__ppc__)
+#if defined(__APPLE__) && defined(__MACH__)
#define _Jv_platform_solib_suffix ".dylib"
#else
#define _Jv_platform_solib_suffix ".so"
diff --git a/libjava/java/lang/VMClassLoader.java b/libjava/java/lang/VMClassLoader.java
index c0739ba7e7c..dfbfba4ceb3 100644
--- a/libjava/java/lang/VMClassLoader.java
+++ b/libjava/java/lang/VMClassLoader.java
@@ -53,6 +53,7 @@ import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;
import java.util.StringTokenizer;
+import gnu.gcj.runtime.BootClassLoader;
/**
* java.lang.VMClassLoader is a package-private helper for VMs to implement
@@ -82,6 +83,10 @@ final class VMClassLoader
static final HashMap definedPackages = new HashMap();
+ // This is a helper for handling java.endorsed.dirs. It is null
+ // until we've initialized the system, at which point it is created.
+ static BootClassLoader bootLoader;
+
/**
* Helper to define a class using a string of bytes. This assumes that
* the security checks have already been performed, if necessary.
@@ -153,6 +158,8 @@ final class VMClassLoader
*/
static URL getResource(String name)
{
+ if (bootLoader != null)
+ return bootLoader.bootGetResource(name);
return null;
}
@@ -168,6 +175,8 @@ final class VMClassLoader
*/
static Enumeration getResources(String name) throws IOException
{
+ if (bootLoader != null)
+ return bootLoader.bootGetResources(name);
return EmptyEnumeration.getInstance();
}
@@ -287,6 +296,8 @@ final class VMClassLoader
static native ClassLoader getSystemClassLoaderInternal();
+ static native void initBootLoader(String libdir);
+
static ClassLoader getSystemClassLoader()
{
// This method is called as the initialization of systemClassLoader,
@@ -310,6 +321,7 @@ final class VMClassLoader
+ loader, ex);
}
}
+
return default_sys;
}
}
diff --git a/libjava/java/lang/ieeefp.h b/libjava/java/lang/ieeefp.h
index 58547267628..3638d546eab 100644
--- a/libjava/java/lang/ieeefp.h
+++ b/libjava/java/lang/ieeefp.h
@@ -120,7 +120,7 @@
#define __IEEE_LITTLE_ENDIAN
#endif
-#if defined (__PPC__) || defined (__ppc__)
+#if defined (__PPC__) || defined (__ppc__) || defined (__ppc64__)
#if (defined(_BIG_ENDIAN) && _BIG_ENDIAN) || (defined(_AIX) && _AIX) \
|| defined (__APPLE__)
#define __IEEE_BIG_ENDIAN
diff --git a/libjava/java/lang/natClass.cc b/libjava/java/lang/natClass.cc
index f48a6fd77ed..b93694790bb 100644
--- a/libjava/java/lang/natClass.cc
+++ b/libjava/java/lang/natClass.cc
@@ -126,16 +126,16 @@ java::lang::Class::getClassLoader (void)
s->checkPermission (new RuntimePermission (JvNewStringLatin1 ("getClassLoader")));
}
- // The spec requires us to return `null' for primitive classes. In
- // other cases we have the option of returning `null' for classes
- // loaded with the bootstrap loader. All gcj-compiled classes which
- // are linked into the application used to return `null' here, but
- // that confuses some poorly-written applications. It is a useful
- // and apparently harmless compatibility hack to simply never return
- // `null' instead.
- if (isPrimitive ())
- return NULL;
- return loader ? loader : ClassLoader::systemClassLoader;
+ // This particular 'return' has been changed a couple of times over
+ // libgcj's history. This particular approach is a little weird,
+ // because it means that all classes linked into the application
+ // will see NULL for their class loader. This may confuse some
+ // applications that aren't expecting this; the solution is to use a
+ // different linking model for these applications. In the past we
+ // returned the system class loader in this case, but that is
+ // incorrect. Also, back then we didn't have other linkage models
+ // to fall back on.
+ return loader;
}
java::lang::reflect::Constructor *
diff --git a/libjava/java/lang/natClassLoader.cc b/libjava/java/lang/natClassLoader.cc
index dfb976a2954..c3b1f7e998f 100644
--- a/libjava/java/lang/natClassLoader.cc
+++ b/libjava/java/lang/natClassLoader.cc
@@ -43,6 +43,7 @@ details. */
#include <java/io/Serializable.h>
#include <java/lang/Cloneable.h>
#include <java/util/HashMap.h>
+#include <gnu/gcj/runtime/BootClassLoader.h>
// Size of local hash table.
#define HASH_LEN 1013
@@ -106,7 +107,7 @@ void
_Jv_RegisterInitiatingLoader (jclass klass, java::lang::ClassLoader *loader)
{
if (! loader)
- loader = java::lang::ClassLoader::systemClassLoader;
+ loader = java::lang::VMClassLoader::bootLoader;
loader->loadedClasses->put(klass->name->toString(), klass);
}
@@ -116,7 +117,7 @@ void
_Jv_UnregisterInitiatingLoader (jclass klass, java::lang::ClassLoader *loader)
{
if (! loader)
- loader = java::lang::ClassLoader::systemClassLoader;
+ loader = java::lang::VMClassLoader::bootLoader;
loader->loadedClasses->remove(klass->name->toString());
}
@@ -211,13 +212,14 @@ _Jv_FindClass (_Jv_Utf8Const *name, java::lang::ClassLoader *loader)
// See if the class was already loaded by this loader. This handles
// initiating loader checks, as we register classes with their
// initiating loaders.
- java::lang::ClassLoader *sys = java::lang::ClassLoader::systemClassLoader;
+
+ java::lang::ClassLoader *boot = java::lang::VMClassLoader::bootLoader;
java::lang::ClassLoader *real = loader;
if (! real)
- real = sys;
+ real = boot;
jstring sname = name->toString();
// We might still be bootstrapping the VM, in which case there
- // won't be a system class loader yet.
+ // won't be a bootstrap class loader yet.
jclass klass = real ? real->findLoadedClass (sname) : NULL;
if (! klass)
@@ -230,16 +232,16 @@ _Jv_FindClass (_Jv_Utf8Const *name, java::lang::ClassLoader *loader)
// If "loader" delegated the loadClass operation to another
// loader, explicitly register that it is also an initiating
// loader of the given class.
- java::lang::ClassLoader *delegate = (loader == sys
+ java::lang::ClassLoader *delegate = (loader == boot
? NULL
: loader);
if (klass && klass->getClassLoaderInternal () != delegate)
_Jv_RegisterInitiatingLoader (klass, loader);
}
- else if (sys)
+ else if (boot)
{
// Load using the bootstrap loader jvmspec 5.3.1.
- klass = sys->loadClass (sname, false);
+ klass = java::lang::VMClassLoader::loadClass (sname, false);
// Register that we're an initiating loader.
if (klass)
@@ -250,9 +252,21 @@ _Jv_FindClass (_Jv_Utf8Const *name, java::lang::ClassLoader *loader)
// Not even a bootstrap loader, try the built-in cache.
klass = _Jv_FindClassInCache (name);
- if (bootstrap_index == BOOTSTRAP_CLASS_LIST_SIZE)
- abort ();
- bootstrap_class_list[bootstrap_index++] = klass;
+ bool found = false;
+ for (int i = 0; i < bootstrap_index; ++i)
+ {
+ if (bootstrap_class_list[i] == klass)
+ {
+ found = true;
+ break;
+ }
+ }
+ if (! found)
+ {
+ if (bootstrap_index == BOOTSTRAP_CLASS_LIST_SIZE)
+ abort ();
+ bootstrap_class_list[bootstrap_index++] = klass;
+ }
}
}
else
diff --git a/libjava/java/lang/natRuntime.cc b/libjava/java/lang/natRuntime.cc
index 56385442da4..248bf44b89c 100644
--- a/libjava/java/lang/natRuntime.cc
+++ b/libjava/java/lang/natRuntime.cc
@@ -528,6 +528,11 @@ java::lang::Runtime::insertSystemProperties (java::util::Properties *newprops)
// The java extensions directory.
SET ("java.ext.dirs", JAVA_EXT_DIRS);
+ // The endorsed directories that libgcj knows about by default.
+ // This is a way to get other jars into the boot class loader
+ // without overriding java.endorsed.dirs.
+ SET ("gnu.gcj.runtime.endorsed.dirs", GCJ_ENDORSED_DIRS);
+
// The path to libgcj's boot classes
SET ("sun.boot.class.path", BOOT_CLASS_PATH);
diff --git a/libjava/java/lang/natVMClassLoader.cc b/libjava/java/lang/natVMClassLoader.cc
index 9a539d7e5c3..c59e1d67f04 100644
--- a/libjava/java/lang/natVMClassLoader.cc
+++ b/libjava/java/lang/natVMClassLoader.cc
@@ -25,6 +25,7 @@ details. */
#include <java/lang/VMCompiler.h>
#include <gnu/gcj/runtime/VMClassLoader.h>
#include <gnu/gcj/runtime/SystemClassLoader.h>
+#include <gnu/gcj/runtime/BootClassLoader.h>
#include <java/lang/ClassLoader.h>
#include <java/lang/Class.h>
#include <java/lang/Throwable.h>
@@ -66,9 +67,9 @@ java::lang::VMClassLoader::defineClass (java::lang::ClassLoader *loader,
// until we're done loading.
JvSynchronize sync (klass);
- // Record the defining loader. For the system class loader, we
- // record NULL.
- if (loader != java::lang::ClassLoader::systemClassLoader)
+ // Record the defining loader. For the bootstrap class loader,
+ // we record NULL.
+ if (loader != bootLoader)
klass->loader = loader;
if (name != 0)
@@ -122,11 +123,25 @@ java::lang::VMClassLoader::getPrimitiveClass (jchar type)
return _Jv_FindClassFromSignature (sig, NULL);
}
+void
+java::lang::VMClassLoader::initBootLoader(jstring libdir)
+{
+ bootLoader = new gnu::gcj::runtime::BootClassLoader(libdir);
+}
+
jclass
java::lang::VMClassLoader::loadClass(jstring name, jboolean resolve)
{
- _Jv_Utf8Const *utf = _Jv_makeUtf8Const (name);
- jclass klass = _Jv_FindClassInCache (utf);
+ // We try the boot loader first, so that the endorsed directory
+ // overrides compiled-in classes.
+ jclass klass = NULL;
+ if (bootLoader)
+ klass = bootLoader->bootLoadClass(name);
+ if (! klass)
+ {
+ _Jv_Utf8Const *utf = _Jv_makeUtf8Const (name);
+ klass = _Jv_FindClassInCache (utf);
+ }
if (klass)
{
// We never want to return a class without its supers linked.
diff --git a/libjava/java/text/SimpleDateFormat.java b/libjava/java/text/SimpleDateFormat.java
index c1eb3cd3a70..190b4d624f4 100644
--- a/libjava/java/text/SimpleDateFormat.java
+++ b/libjava/java/text/SimpleDateFormat.java
@@ -916,6 +916,8 @@ public class SimpleDateFormat extends DateFormat
boolean is_numeric = true;
int offset = 0;
boolean maybe2DigitYear = false;
+ boolean oneBasedHour = false;
+ boolean oneBasedHourOfDay = false;
Integer simpleOffset;
String[] set1 = null;
String[] set2 = null;
@@ -964,12 +966,14 @@ public class SimpleDateFormat extends DateFormat
break;
case 'h':
calendar_field = Calendar.HOUR;
+ oneBasedHour = true;
break;
case 'H':
calendar_field = Calendar.HOUR_OF_DAY;
break;
case 'k':
calendar_field = Calendar.HOUR_OF_DAY;
+ oneBasedHourOfDay = true;
break;
case 'm':
calendar_field = Calendar.MINUTE;
@@ -1108,6 +1112,14 @@ public class SimpleDateFormat extends DateFormat
}
}
+ // Calendar uses 0-based hours.
+ // I.e. 00:00 AM is midnight, not 12 AM or 24:00
+ if (oneBasedHour && value == 12)
+ value = 0;
+
+ if (oneBasedHourOfDay && value == 24)
+ value = 0;
+
// Assign the value and move on.
calendar.set(calendar_field, value);
}
diff --git a/libjava/java/util/Calendar.java b/libjava/java/util/Calendar.java
index 0e9284c7c21..7faaeee43bc 100644
--- a/libjava/java/util/Calendar.java
+++ b/libjava/java/util/Calendar.java
@@ -706,6 +706,8 @@ public abstract class Calendar implements Serializable, Cloneable
isSet[WEEK_OF_YEAR] = false;
break;
case WEEK_OF_MONTH: // pattern 2
+ if (! isSet[DAY_OF_WEEK])
+ fields[DAY_OF_WEEK] = getFirstDayOfWeek();
isSet[YEAR] = true;
isSet[MONTH] = true;
isSet[DAY_OF_WEEK] = true;
@@ -715,6 +717,8 @@ public abstract class Calendar implements Serializable, Cloneable
isSet[WEEK_OF_YEAR] = false;
break;
case DAY_OF_WEEK_IN_MONTH: // pattern 3
+ if (! isSet[DAY_OF_WEEK])
+ fields[DAY_OF_WEEK] = getFirstDayOfWeek();
isSet[YEAR] = true;
isSet[MONTH] = true;
isSet[DAY_OF_WEEK] = true;
@@ -733,6 +737,8 @@ public abstract class Calendar implements Serializable, Cloneable
isSet[DAY_OF_WEEK_IN_MONTH] = false;
break;
case WEEK_OF_YEAR: // pattern 5
+ if (! isSet[DAY_OF_WEEK])
+ fields[DAY_OF_WEEK] = getFirstDayOfWeek();
isSet[YEAR] = true;
isSet[DAY_OF_WEEK] = true;
isSet[MONTH] = false;
diff --git a/libjava/java/util/GregorianCalendar.java b/libjava/java/util/GregorianCalendar.java
index 710dd56f58b..d036cd620e8 100644
--- a/libjava/java/util/GregorianCalendar.java
+++ b/libjava/java/util/GregorianCalendar.java
@@ -275,7 +275,6 @@ public class GregorianCalendar extends Calendar
* Constructs a new GregorianCalendar representing midnight on the
* given date with the default time zone and locale.
*
- *
* @param year corresponds to the YEAR time field.
* @param month corresponds to the MONTH time field.
* @param day corresponds to the DAY time field.
@@ -478,7 +477,7 @@ public class GregorianCalendar extends Calendar
if (isSet[AM_PM] && fields[AM_PM] != AM && fields[AM_PM] != PM)
throw new IllegalArgumentException("Illegal AM_PM.");
- if (isSet[HOUR] && (fields[HOUR] < 0 || fields[HOUR] > 12))
+ if (isSet[HOUR] && (fields[HOUR] < 0 || fields[HOUR] > 11))
throw new IllegalArgumentException("Illegal HOUR.");
if (isSet[HOUR_OF_DAY]
&& (fields[HOUR_OF_DAY] < 0 || fields[HOUR_OF_DAY] > 23))
@@ -564,10 +563,18 @@ public class GregorianCalendar extends Calendar
// 3: YEAR + MONTH + DAY_OF_WEEK_IN_MONTH + DAY_OF_WEEK
if (isSet[DAY_OF_WEEK_IN_MONTH])
{
+ if (fields[DAY_OF_WEEK_IN_MONTH] < 0)
+ {
+ month++;
+ first = getFirstDayOfMonth(year, month);
+ day = 1 + 7 * (fields[DAY_OF_WEEK_IN_MONTH]);
+ }
+ else
+ day = 1 + 7 * (fields[DAY_OF_WEEK_IN_MONTH] - 1);
+
int offs = fields[DAY_OF_WEEK] - first;
if (offs < 0)
offs += 7;
- day = 1 + 7 * (fields[DAY_OF_WEEK_IN_MONTH] - 1);
day += offs;
}
else
@@ -584,7 +591,7 @@ public class GregorianCalendar extends Calendar
day = offs + 7 * (fields[WEEK_OF_MONTH] - 1);
offs = fields[DAY_OF_WEEK] - getFirstDayOfWeek();
- if (offs < 0)
+ if (offs <= 0)
offs += 7;
day += offs;
}
@@ -602,11 +609,7 @@ public class GregorianCalendar extends Calendar
{
hour = fields[HOUR];
if (fields[AM_PM] == PM)
- if (hour != 12) /* not Noon */
- hour += 12;
- /* Fix the problem of the status of 12:00 AM (midnight). */
- if (fields[AM_PM] == AM && hour == 12)
- hour = 0;
+ hour += 12;
}
else
hour = fields[HOUR_OF_DAY];
@@ -709,15 +712,15 @@ public class GregorianCalendar extends Calendar
* @param gregorian <code>true</code>, if we should use the Gregorian rules.
* @return the days since the epoch, may be negative.
*/
- public long getLinearDay(int year, int dayOfYear, boolean gregorian)
- {
- // The 13 is the number of days, that were omitted in the Gregorian
- // Calender until the epoch.
- // We shift right by 2 instead of dividing by 4, to get correct
- // results for negative years (and this is even more efficient).
- long julianDay = (year - 1) * 365L + ((year - 1) >> 2) + (dayOfYear - 1)
- - EPOCH_DAYS; // gregorian days from 1 to epoch.
-
+ private long getLinearDay(int year, int dayOfYear, boolean gregorian)
+ {
+ // The 13 is the number of days, that were omitted in the Gregorian
+ // Calender until the epoch.
+ // We shift right by 2 instead of dividing by 4, to get correct
+ // results for negative years (and this is even more efficient).
+ long julianDay = (year - 1) * 365L + ((year - 1) >> 2) + (dayOfYear - 1)
+ - EPOCH_DAYS; // gregorian days from 1 to epoch.
+
if (gregorian)
{
// subtract the days that are missing in gregorian calendar
@@ -858,7 +861,7 @@ public class GregorianCalendar extends Calendar
int hourOfDay = millisInDay / (60 * 60 * 1000);
fields[AM_PM] = (hourOfDay < 12) ? AM : PM;
int hour = hourOfDay % 12;
- fields[HOUR] = (hour == 0) ? 12 : hour;
+ fields[HOUR] = hour;
fields[HOUR_OF_DAY] = hourOfDay;
millisInDay %= (60 * 60 * 1000);
fields[MINUTE] = millisInDay / (60 * 1000);
@@ -925,9 +928,7 @@ public class GregorianCalendar extends Calendar
}
int maxDay = getActualMaximum(DAY_OF_MONTH);
if (fields[DAY_OF_MONTH] > maxDay)
- {
- fields[DAY_OF_MONTH] = maxDay;
- }
+ fields[DAY_OF_MONTH] = maxDay;
set(YEAR, fields[YEAR]);
set(MONTH, fields[MONTH]);
break;
diff --git a/libjava/prims.cc b/libjava/prims.cc
index 9281711ae89..a916edd7a12 100644
--- a/libjava/prims.cc
+++ b/libjava/prims.cc
@@ -55,6 +55,7 @@ details. */
#include <java/lang/OutOfMemoryError.h>
#include <java/lang/System.h>
#include <java/lang/VMThrowable.h>
+#include <java/lang/VMClassLoader.h>
#include <java/lang/reflect/Modifier.h>
#include <java/io/PrintStream.h>
#include <java/lang/UnsatisfiedLinkError.h>
@@ -1130,8 +1131,9 @@ _Jv_CreateJavaVM (JvVMInitArgs* vm_args)
// of VMClassLoader.
_Jv_InitClass (&java::lang::ClassLoader::class$);
- // Set up the system class loader.
+ // Set up the system class loader and the bootstrap class loader.
gnu::gcj::runtime::VMClassLoader::initialize();
+ java::lang::VMClassLoader::initBootLoader(JvNewStringLatin1(TOOLEXECLIBDIR));
_Jv_RegisterBootstrapPackages();
@@ -1209,7 +1211,10 @@ _Jv_RunMain (jclass klass, const char *name, int argc, const char **argv,
java::lang::System::err->println (JvNewStringLatin1
("Exception during runtime initialization"));
t->printStackTrace();
- runtime->exit (1);
+ if (runtime)
+ runtime->exit (1);
+ // In case the runtime creation failed.
+ ::exit (1);
}
_Jv_AttachCurrentThread (main_thread);
diff --git a/libjava/stacktrace.cc b/libjava/stacktrace.cc
index 583b11a796c..f4388aa6f3a 100644
--- a/libjava/stacktrace.cc
+++ b/libjava/stacktrace.cc
@@ -35,11 +35,6 @@ using namespace java::lang::reflect;
using namespace java::util;
using namespace gnu::gcj::runtime;
-struct _Jv_FindCallingClassState: _Jv_UnwindState
-{
- jclass result;
-};
-
// Maps ncode values to their containing native class.
// NOTE: Currently this Map contradicts class GC for native classes. This map
// (and the "new class stack") will need to use WeakReferences in order to
@@ -500,7 +495,7 @@ _Jv_StackTrace::non_system_trace_fn (_Jv_UnwindState *state)
{
classLoader = frame->klass->getClassLoaderInternal();
#ifdef INTERPRETER
- if (classLoader != NULL && classLoader != ClassLoader::systemClassLoader)
+ if (classLoader != NULL)
{
state->trace_data = (void *) classLoader;
return _URC_NORMAL_STOP;
diff --git a/libjava/testsuite/Makefile.in b/libjava/testsuite/Makefile.in
index 3336bcbe8d7..66b60af1e3a 100644
--- a/libjava/testsuite/Makefile.in
+++ b/libjava/testsuite/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# Makefile.in generated by automake 1.9.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/libjava/testsuite/libjava.jni/jni.exp b/libjava/testsuite/libjava.jni/jni.exp
index b2df3126983..201daaca713 100644
--- a/libjava/testsuite/libjava.jni/jni.exp
+++ b/libjava/testsuite/libjava.jni/jni.exp
@@ -251,6 +251,10 @@ proc gcj_jni_invocation_test_one {file} {
set cxxflags "-L../.libs -lgcj"
}
+ if { [istarget "*-*-solaris*"] } {
+ lappend cxxflags "-lsocket"
+ }
+
if {! [gcj_jni_invocation_compile_c_to_binary $cfile $cxxflags]} {
# FIXME
return 0
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index fe273acaff1..8424ae59015 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,79 @@
+2005-03-25 Mark Mitchell <mark@codesourcery.com>
+
+ * testsuite/lib/libstdc++.exp (libstdc++_init): Define LOCALEDIR
+ when testing an installed compiler.
+
+ * testsuite/lib/libstdc++.exp (v3-build_support): Pass -w when
+ compiling support objects.
+
+2005-03-24 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/tr1/memory: Forward to...
+ * include/tr1/boost_shared_ptr.h: ...here. Add Boost Software License.
+ * include/Makefile.am (tr1_headers): Add boost_shared_ptr.h.
+ * include/Makefile.in: Regenerate.
+ * testsuite/tr1/2_general_utilities/memory/shared_ptr/cons/
+ auto_ptr_neg.cc: Adjust line numbers.
+
+2005-03-23 Mark Mitchell <mark@codesourcery.com>
+
+ * testsuite/Makefile.am (all-local): Do not build testsuite_files.
+ * testsuite/Makefile.in: Regenerated.
+
+2005-03-23 Benjamin Kosnik <bkoz@redhat.com>
+
+ * acinclude.m4: Adjust so that _GLIBCXX_USE_C99 implies
+ using _GLIBCXX_USE_C99_COMPLEX, _GLIBCXX_USE_C99_MATH, and
+ _GLIBCXX_USE_C99_WCHAR.
+ Remove GLIBCXX_ENABLE_C_MBCHAR, consolidate in GLIBCXX_ENABLE_C99
+ and GLIBCXX_ENABLE_WCHAR_T.
+ Take C99 bits from GLIBCXX_CHECK_WCHAR_T_SUPPORT and put in
+ GLIBCXX_ENABLE_C99.
+ Change remaining parts of GLIBCXX_CHECK_WCHAR_T_SUPPORT to
+ GLIBCXX_CHECK_ICONV_SUPPORT.
+ * configure.ac: Remove GLIBCXX_ENABLE_C_MBCHAR, use
+ GLIBCXX_CHECK_ICONV_SUPPORT and GLIBCXX_ENABLE_WCHAR_T.
+ * crossconfig.m4: Same.
+ * acconfig.h: Same, adjust comments.
+ * config.h.in: Regenerate.
+ * configure: Regenerate.
+ * docs/html/configopts.html: Change --enable-c-mbchar to
+ --enable-wchar_t.
+
+ * config/locale/gnu/c++locale_internal.h: Guard wide functions
+ with _GLIBCXX_USE_WCHAR_T.
+ * include/c_std/std_cwctype.h: Alphabetize, remove duplicates.
+ * include/c_std/std_cstdio.h: Spacing.
+
+ * config/locale/gnu/c_locale.h: Tweaks for unused warnings.
+ * src/debug.cc: Same.
+
+2005-03-23 Mark Mitchell <mark@codesourcery.com>
+
+ * testsuite/libstdc++-dg/normal.exp: Read testsuite_files, if it
+ exists.
+
+ * testsuite/lib/libstdc++.exp (libstdc++_wchar_t): Rename to ...
+ (v3-wchar_t): ... this.
+ (libstdc++_threads): Rename to ...
+ (v3-threads): ... this.
+ (libstdc++_test_objs): Rename to ...
+ (v3-test_objs): ... this.
+ (libstdc++_build_support): Rename to ...
+ (v3-build_support): ... this.
+ * testsuite/libstdc++-dg/normal.exp: Adjust to use new names.
+
+ * testsuite/lib/libstdc++.exp (libstdc++_init): Improve handling
+ of compilers not in the build directory.
+ (libstdc++_wchar_t): New variable.
+ (libstdc++_threads): Likewise.
+ (libstdc++_test_objs): Likewise.
+ (v3_target_compile): Use libstdc++_test_objs.
+ (v3-list-tests): Remove.
+ (listdc++_build_support): New function.
+ * testsuite/libstdc++-dg/normal.exp: Rework to dynamically
+ generate list of tests.
+
2005-03-21 Chris Jefferson <chris@bubblescope.net>
PR libstdc++/20577
diff --git a/libstdc++-v3/acconfig.h b/libstdc++-v3/acconfig.h
index 51d588430a3..f4cb96abaaf 100644
--- a/libstdc++-v3/acconfig.h
+++ b/libstdc++-v3/acconfig.h
@@ -1,4 +1,4 @@
-// acconfig.h symbols and macros for libstdc++ v3 -*- C++ -*-
+// Symbols and macros for libstdc++ -*- C++ -*-
// Defines libstdc++ version.
#undef PACKAGE
@@ -10,21 +10,25 @@
#undef HAVE_GETTEXT
#undef HAVE_STPCPY
-// Include I/O support for 'long long' and 'unsigned long long'.
+// Define if code specialized for long long should be used.
#undef _GLIBCXX_USE_LONG_LONG
-// Define if C99 features such as lldiv_t, llabs, lldiv should be exposed.
+// Define if code specialized for wchar_t should be used.
+#undef _GLIBCXX_USE_WCHAR_T
+
+// Define if C99 functions or macros from <wchar.h>, <math.h>,
+// <complex.h>, <stdio.h>, and <stdlib.h> can be used or exposed.
#undef _GLIBCXX_USE_C99
-// Define if C99 math functions (like fpclassify) should be exposed.
+// Define if C99 functions or macros in <math.h> should be imported in
+// <cmath> in namespace std.
#undef _GLIBCXX_USE_C99_MATH
-// Define if C99 complex math functions should be used in std::complex.
+// Define if C99 functions in <complex.h> should be used in
+// <complex>. Using compiler builtins for these functions requires
+// corresponding C99 library functions to be present.
#undef _GLIBCXX_USE_C99_COMPLEX
-// Define if code specialized for wchar_t should be used.
-#undef _GLIBCXX_USE_WCHAR_T
-
// Define if using setrlimit to set resource limits during 'make check'.
#undef _GLIBCXX_RES_LIMITS
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index 737507ce967..92ce9a238ec 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -124,14 +124,6 @@ AC_DEFUN([GLIBCXX_CONFIGURE], [
## (Right now, this only matters for enable_wchar_t, but nothing prevents
## other macros from doing the same. This should be automated.) -pme
need_libmath=no
- enable_wchar_t=no
- #enable_libstdcxx_debug=no
- #enable_libstdcxx_pch=no
- #enable_cheaders=c
- #c_compatibility=no
- #enable_abi_check=no
- #enable_symvers=no
- #enable_hosted_libstdcxx=yes
# Find platform-specific directories containing configuration info.
# Also possibly modify flags used elsewhere, as needed by the platform.
@@ -290,85 +282,21 @@ AC_DEFUN([GLIBCXX_CHECK_LINKER_FEATURES], [
dnl
-dnl Check to see if this target can enable the wchar_t parts.
-dnl If --disable-c-mbchar was given, no wchar_t stuff is enabled. (This
-dnl must have been previously checked.) By default, wide characters are
-dnl disabled.
+dnl Check to see if this target can enable the iconv specializations.
+dnl If --disable-c-mbchar was given, no wchar_t specialization is enabled.
+dnl (This must have been previously checked, along with the rest of C99
+dnl support.) By default, iconv support is disabled.
dnl
dnl Defines:
-dnl HAVE_MBSTATE_T if mbstate_t is not in wchar.h
-dnl _GLIBCXX_USE_WCHAR_T if all the bits are found.
+dnl _GLIBCXX_USE_ICONV if all the bits are found.
dnl Substs:
dnl LIBICONV to a -l string containing the iconv library, if needed.
dnl
-AC_DEFUN([GLIBCXX_CHECK_WCHAR_T_SUPPORT], [
- # Test wchar.h for mbstate_t, which is needed for char_traits and
- # others even if wchar_t support is not on.
- AC_MSG_CHECKING([for mbstate_t])
- AC_TRY_COMPILE([#include <wchar.h>],
- [mbstate_t teststate;],
- have_mbstate_t=yes, have_mbstate_t=no)
- AC_MSG_RESULT($have_mbstate_t)
- if test x"$have_mbstate_t" = xyes; then
- AC_DEFINE(HAVE_MBSTATE_T)
- fi
-
- # Sanity check for existence of ISO C99 headers for extended encoding.
- AC_CHECK_HEADERS(wchar.h, ac_has_wchar_h=yes, ac_has_wchar_h=no)
- AC_CHECK_HEADERS(wctype.h, ac_has_wctype_h=yes, ac_has_wctype_h=no)
+AC_DEFUN([GLIBCXX_CHECK_ICONV_SUPPORT], [
+ enable_iconv=no
# Only continue checking if the ISO C99 headers exist and support is on.
- if test x"$ac_has_wchar_h" = xyes &&
- test x"$ac_has_wctype_h" = xyes &&
- test x"$enable_c_mbchar" != xno; then
-
- # Test wchar.h for WCHAR_MIN, WCHAR_MAX, which is needed before
- # numeric_limits can instantiate type_traits<wchar_t>
- AC_MSG_CHECKING([for WCHAR_MIN and WCHAR_MAX])
- AC_TRY_COMPILE([#include <wchar.h>],
- [int i = WCHAR_MIN; int j = WCHAR_MAX;],
- has_wchar_minmax=yes, has_wchar_minmax=no)
- AC_MSG_RESULT($has_wchar_minmax)
-
- # Test wchar.h for WEOF, which is what we use to determine whether
- # to specialize for char_traits<wchar_t> or not.
- AC_MSG_CHECKING([for WEOF])
- AC_TRY_COMPILE([
- #include <wchar.h>
- #include <stddef.h>],
- [wint_t i = WEOF;],
- has_weof=yes, has_weof=no)
- AC_MSG_RESULT($has_weof)
-
- # Tests for wide character functions used in char_traits<wchar_t>.
- ac_wfuncs=yes
- AC_CHECK_FUNCS([wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset],
- [],[ac_wfuncs=no])
-
- # Checks for names injected into std:: by the c_std headers.
- AC_CHECK_FUNCS([btowc wctob fgetwc fgetws fputwc fputws fwide \
- fwprintf fwscanf swprintf swscanf vfwprintf vswprintf \
- vwprintf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
- mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstol \
- wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
- wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr],
- [],[ac_wfuncs=no])
-
- # Checks for wide character functions that are not required
- # for basic wchar_t support. Don't disable support if they are missing.
- # Injection of these is wrapped with guard macros.
- AC_CHECK_FUNCS([vfwscanf vswscanf vwscanf wcstof iswblank],[],[])
-
- AC_MSG_CHECKING([for ISO C99 wchar_t support])
- if test x"$has_weof" = xyes &&
- test x"$has_wchar_minmax" = xyes &&
- test x"$ac_wfuncs" = xyes;
- then
- ac_isoC99_wchar_t=yes
- else
- ac_isoC99_wchar_t=no
- fi
- AC_MSG_RESULT($ac_isoC99_wchar_t)
+ if test x"$enable_wchar_t" = xyes; then
# Use iconv for wchar_t to char conversions. As such, check for
# X/Open Portability Guide, version 2 features (XPG2).
@@ -386,28 +314,17 @@ AC_DEFUN([GLIBCXX_CHECK_WCHAR_T_SUPPORT], [
LIBS="$ac_save_LIBS"
- AC_MSG_CHECKING([for XPG2 wchar_t support])
if test x"$ac_has_iconv_h" = xyes &&
test x"$ac_has_langinfo_h" = xyes &&
test x"$ac_XPG2funcs" = xyes;
then
- ac_XPG2_wchar_t=yes
- else
- ac_XPG2_wchar_t=no
- fi
- AC_MSG_RESULT($ac_XPG2_wchar_t)
-
- # At the moment, only enable wchar_t specializations if all the
- # above support is present.
- if test x"$ac_isoC99_wchar_t" = xyes &&
- test x"$ac_XPG2_wchar_t" = xyes;
- then
- AC_DEFINE(_GLIBCXX_USE_WCHAR_T)
- enable_wchar_t=yes
+ AC_DEFINE([_GLIBCXX_USE_ICONV],1,
+ [Define if iconv and related functions exist and are usable.])
+ enable_iconv=yes
fi
fi
- AC_MSG_CHECKING([for enabled wchar_t specializations])
- AC_MSG_RESULT($enable_wchar_t)
+ AC_MSG_CHECKING([for enabled iconv specializations])
+ AC_MSG_RESULT($enable_iconv)
])
@@ -838,29 +755,43 @@ dnl
AC_DEFUN([GLIBCXX_ENABLE_C99], [
GLIBCXX_ENABLE(c99,$1,,[turns on ISO/IEC 9899:1999 support])
+ # Test wchar.h for mbstate_t, which is needed for char_traits and fpos
+ # even if C99 support is turned off.
+ AC_CHECK_HEADERS(wchar.h, ac_has_wchar_h=yes, ac_has_wchar_h=no)
+ AC_MSG_CHECKING([for mbstate_t])
+ AC_TRY_COMPILE([#include <wchar.h>],
+ [mbstate_t teststate;],
+ have_mbstate_t=yes, have_mbstate_t=no)
+ AC_MSG_RESULT($have_mbstate_t)
+ if test x"$have_mbstate_t" = xyes; then
+ AC_DEFINE(HAVE_MBSTATE_T)
+ fi
+
+ if test x"$enable_c99" = x"yes"; then
+
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
# Check for the existence of <math.h> functions used if C99 is enabled.
- ac_c99_math=yes;
AC_MSG_CHECKING([for ISO C99 support in <math.h>])
- AC_TRY_COMPILE([#include <math.h>],[fpclassify(0.0);],, [ac_c99_math=no])
- AC_TRY_COMPILE([#include <math.h>],[isfinite(0.0);],, [ac_c99_math=no])
- AC_TRY_COMPILE([#include <math.h>],[isinf(0.0);],, [ac_c99_math=no])
- AC_TRY_COMPILE([#include <math.h>],[isnan(0.0);],, [ac_c99_math=no])
- AC_TRY_COMPILE([#include <math.h>],[isnormal(0.0);],, [ac_c99_math=no])
- AC_TRY_COMPILE([#include <math.h>],[signbit(0.0);],, [ac_c99_math=no])
- AC_TRY_COMPILE([#include <math.h>],[isgreater(0.0,0.0);],, [ac_c99_math=no])
- AC_TRY_COMPILE([#include <math.h>],
- [isgreaterequal(0.0,0.0);],, [ac_c99_math=no])
- AC_TRY_COMPILE([#include <math.h>],[isless(0.0,0.0);],, [ac_c99_math=no])
- AC_TRY_COMPILE([#include <math.h>],[islessequal(0.0,0.0);],,[ac_c99_math=no])
+ AC_CACHE_VAL(ac_c99_math, [
AC_TRY_COMPILE([#include <math.h>],
- [islessgreater(0.0,0.0);],, [ac_c99_math=no])
- AC_TRY_COMPILE([#include <math.h>],
- [isunordered(0.0,0.0);],, [ac_c99_math=no])
+ [fpclassify(0.0);
+ isfinite(0.0);
+ isinf(0.0);
+ isnan(0.0);
+ isnormal(0.0);
+ signbit(0.0);
+ isgreater(0.0,0.0);
+ isgreaterequal(0.0,0.0);
+ isless(0.0,0.0);
+ islessequal(0.0,0.0);
+ islessgreater(0.0,0.0);
+ islessgreater(0.0,0.0);
+ isunordered(0.0,0.0);
+ ],[ac_c99_math=yes], [ac_c99_math=no])
+ ])
AC_MSG_RESULT($ac_c99_math)
-
if test x"$ac_c99_math" = x"yes"; then
AC_DEFINE(_GLIBCXX_USE_C99_MATH)
fi
@@ -869,200 +800,210 @@ AC_DEFUN([GLIBCXX_ENABLE_C99], [
# This is necessary even though libstdc++ uses the builtin versions
# of these functions, because if the builtin cannot be used, a reference
# to the library function is emitted.
+ # In addition, need to explicitly specify "C" compilation for this
+ # one, or else the backwards C++ <complex.h> include will be selected.
+ save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -x c"
AC_CHECK_HEADERS(complex.h, ac_has_complex_h=yes, ac_has_complex_h=no)
ac_c99_complex=no;
if test x"$ac_has_complex_h" = x"yes"; then
- ac_c99_complex=yes;
AC_MSG_CHECKING([for ISO C99 support in <complex.h>])
AC_TRY_COMPILE([#include <complex.h>],
- [typedef __complex__ float _ComplexT; _ComplexT tmp;
- cabsf(tmp);],, [ac_c99_complex=no])
- AC_TRY_COMPILE([#include <complex.h>],
- [typedef __complex__ double _ComplexT; _ComplexT tmp;
- cabs(tmp);],, [ac_c99_complex=no])
- AC_TRY_COMPILE([#include <complex.h>],
- [typedef __complex__ long double _ComplexT; _ComplexT tmp;
- cabsl(tmp);],, [ac_c99_complex=no])
- AC_TRY_COMPILE([#include <complex.h>],
- [typedef __complex__ float _ComplexT; _ComplexT tmp;
- cargf(tmp);],, [ac_c99_complex=no])
- AC_TRY_COMPILE([#include <complex.h>],
- [typedef __complex__ double _ComplexT; _ComplexT tmp;
- carg(tmp);],, [ac_c99_complex=no])
- AC_TRY_COMPILE([#include <complex.h>],
- [typedef __complex__ long double _ComplexT; _ComplexT tmp;
- cargl(tmp);],, [ac_c99_complex=no])
- AC_TRY_COMPILE([#include <complex.h>],
- [typedef __complex__ float _ComplexT; _ComplexT tmp;
- ccosf(tmp);],, [ac_c99_complex=no])
- AC_TRY_COMPILE([#include <complex.h>],
- [typedef __complex__ double _ComplexT; _ComplexT tmp;
- ccos(tmp);],, [ac_c99_complex=no])
- AC_TRY_COMPILE([#include <complex.h>],
- [typedef __complex__ long double _ComplexT; _ComplexT tmp;
- ccosl(tmp);],, [ac_c99_complex=no])
- AC_TRY_COMPILE([#include <complex.h>],
- [typedef __complex__ float _ComplexT; _ComplexT tmp;
- ccoshf(tmp);],, [ac_c99_complex=no])
- AC_TRY_COMPILE([#include <complex.h>],
- [typedef __complex__ double _ComplexT; _ComplexT tmp;
- ccosh(tmp);],, [ac_c99_complex=no])
- AC_TRY_COMPILE([#include <complex.h>],
- [typedef __complex__ long double _ComplexT; _ComplexT tmp;
- ccoshl(tmp);],, [ac_c99_complex=no])
- AC_TRY_COMPILE([#include <complex.h>],
- [typedef __complex__ float _ComplexT; _ComplexT tmp;
- cexpf(tmp);],, [ac_c99_complex=no])
- AC_TRY_COMPILE([#include <complex.h>],
- [typedef __complex__ double _ComplexT; _ComplexT tmp;
- cexp(tmp);],, [ac_c99_complex=no])
- AC_TRY_COMPILE([#include <complex.h>],
- [typedef __complex__ long double _ComplexT; _ComplexT tmp;
- cexpl(tmp);],, [ac_c99_complex=no])
- AC_TRY_COMPILE([#include <complex.h>],
- [typedef __complex__ float _ComplexT; _ComplexT tmp;
- csinf(tmp);],, [ac_c99_complex=no])
- AC_TRY_COMPILE([#include <complex.h>],
- [typedef __complex__ double _ComplexT; _ComplexT tmp;
- csin(tmp);],, [ac_c99_complex=no])
- AC_TRY_COMPILE([#include <complex.h>],
- [typedef __complex__ long double _ComplexT; _ComplexT tmp;
- csinl(tmp);],, [ac_c99_complex=no])
- AC_TRY_COMPILE([#include <complex.h>],
- [typedef __complex__ float _ComplexT; _ComplexT tmp;
- csinhf(tmp);],, [ac_c99_complex=no])
- AC_TRY_COMPILE([#include <complex.h>],
- [typedef __complex__ double _ComplexT; _ComplexT tmp;
- csinh(tmp);],, [ac_c99_complex=no])
- AC_TRY_COMPILE([#include <complex.h>],
- [typedef __complex__ long double _ComplexT; _ComplexT tmp;
- csinhl(tmp);],, [ac_c99_complex=no])
- AC_TRY_COMPILE([#include <complex.h>],
- [typedef __complex__ float _ComplexT; _ComplexT tmp;
- csqrtf(tmp);],, [ac_c99_complex=no])
- AC_TRY_COMPILE([#include <complex.h>],
- [typedef __complex__ double _ComplexT; _ComplexT tmp;
- csqrt(tmp);],, [ac_c99_complex=no])
- AC_TRY_COMPILE([#include <complex.h>],
- [typedef __complex__ long double _ComplexT; _ComplexT tmp;
- csqrtl(tmp);],, [ac_c99_complex=no])
- AC_TRY_COMPILE([#include <complex.h>],
- [typedef __complex__ float _ComplexT; _ComplexT tmp;
- ctanf(tmp);],, [ac_c99_complex=no])
- AC_TRY_COMPILE([#include <complex.h>],
- [typedef __complex__ double _ComplexT; _ComplexT tmp;
- ctan(tmp);],, [ac_c99_complex=no])
- AC_TRY_COMPILE([#include <complex.h>],
- [typedef __complex__ long double _ComplexT; _ComplexT tmp;
- ctanl(tmp);],, [ac_c99_complex=no])
- AC_TRY_COMPILE([#include <complex.h>],
- [typedef __complex__ float _ComplexT; _ComplexT tmp;
- ctanhf(tmp);],, [ac_c99_complex=no])
- AC_TRY_COMPILE([#include <complex.h>],
- [typedef __complex__ double _ComplexT; _ComplexT tmp;
- ctanh(tmp);],, [ac_c99_complex=no])
- AC_TRY_COMPILE([#include <complex.h>],
- [typedef __complex__ long double _ComplexT; _ComplexT tmp;
- ctanhl(tmp);],, [ac_c99_complex=no])
- AC_TRY_COMPILE([#include <complex.h>],
- [typedef __complex__ float _ComplexT; _ComplexT tmp;
- cpowf(tmp, tmp);],, [ac_c99_complex=no])
- AC_TRY_COMPILE([#include <complex.h>],
- [typedef __complex__ double _ComplexT; _ComplexT tmp;
- cpow(tmp, tmp);],, [ac_c99_complex=no])
- AC_TRY_COMPILE([#include <complex.h>],
- [typedef __complex__ long double _ComplexT; _ComplexT tmp;
- cpowl(tmp, tmp);],, [ac_c99_complex=no])
+ [typedef __complex__ float float_type; float_type tmpf;
+ cabsf(tmpf);
+ cargf(tmpf);
+ ccosf(tmpf);
+ ccoshf(tmpf);
+ cexpf(tmpf);
+ csinf(tmpf);
+ csinhf(tmpf);
+ csqrtf(tmpf);
+ ctanf(tmpf);
+ ctanhf(tmpf);
+ cpowf(tmpf, tmpf);
+ typedef __complex__ double double_type; double_type tmpd;
+ cabs(tmpd);
+ carg(tmpd);
+ ccos(tmpd);
+ ccosh(tmpd);
+ cexp(tmpd);
+ csin(tmpd);
+ csinh(tmpd);
+ csqrt(tmpd);
+ ctan(tmpd);
+ ctanh(tmpd);
+ cpow(tmpd, tmpd);
+ typedef __complex__ long double ld_type; ld_type tmpld;
+ cabsl(tmpld);
+ cargl(tmpld);
+ ccosl(tmpld);
+ ccoshl(tmpld);
+ cexpl(tmpld);
+ csinl(tmpld);
+ csinhl(tmpld);
+ csqrtl(tmpld);
+ ctanl(tmpld);
+ ctanhl(tmpld);
+ cpowl(tmpld, tmpld);
+ ],[ac_c99_complex=yes], [ac_c99_complex=no])
fi
+ CXXFLAGS="$save_CXXFLAGS"
AC_MSG_RESULT($ac_c99_complex)
-
if test x"$ac_c99_complex" = x"yes"; then
AC_DEFINE(_GLIBCXX_USE_C99_COMPLEX)
fi
# Check for the existence in <stdio.h> of vscanf, et. al.
- ac_c99_stdio=yes;
AC_MSG_CHECKING([for ISO C99 support in <stdio.h>])
- AC_TRY_COMPILE([#include <stdio.h>],
- [snprintf("12", 0, "%i");],, [ac_c99_stdio=no])
+ AC_CACHE_VAL(ac_c99_stdio, [
AC_TRY_COMPILE([#include <stdio.h>
- #include <stdarg.h>
+ #include <stdarg.h>
void foo(char* fmt, ...)
- {va_list args; va_start(args, fmt);
- vfscanf(stderr, "%i", args);}],
- [],, [ac_c99_stdio=no])
- AC_TRY_COMPILE([#include <stdio.h>
- #include <stdarg.h>
- void foo(char* fmt, ...)
- {va_list args; va_start(args, fmt);
- vscanf("%i", args);}],
- [],, [ac_c99_stdio=no])
- AC_TRY_COMPILE([#include <stdio.h>
- #include <stdarg.h>
- void foo(char* fmt, ...)
- {va_list args; va_start(args, fmt);
- vsnprintf(fmt, 0, "%i", args);}],
- [],, [ac_c99_stdio=no])
- AC_TRY_COMPILE([#include <stdio.h>
- #include <stdarg.h>
- void foo(char* fmt, ...)
- {va_list args; va_start(args, fmt);
- vsscanf(fmt, "%i", args);}],
- [],, [ac_c99_stdio=no])
+ {
+ va_list args; va_start(args, fmt);
+ vfscanf(stderr, "%i", args);
+ vscanf("%i", args);
+ vsnprintf(fmt, 0, "%i", args);
+ vsscanf(fmt, "%i", args);
+ }],
+ [snprintf("12", 0, "%i");],
+ [ac_c99_stdio=yes], [ac_c99_stdio=no])
+ ])
AC_MSG_RESULT($ac_c99_stdio)
# Check for the existence in <stdlib.h> of lldiv_t, et. al.
- ac_c99_stdlib=yes;
- AC_MSG_CHECKING([for lldiv_t declaration])
- AC_CACHE_VAL(ac_c99_lldiv_t, [
- AC_TRY_COMPILE([#include <stdlib.h>],
- [ lldiv_t mydivt;],
- [ac_c99_lldiv_t=yes], [ac_c99_lldiv_t=no])
- ])
- AC_MSG_RESULT($ac_c99_lldiv_t)
-
AC_MSG_CHECKING([for ISO C99 support in <stdlib.h>])
+ AC_CACHE_VAL(ac_c99_stdlib, [
AC_TRY_COMPILE([#include <stdlib.h>],
- [char* tmp; strtof("gnu", &tmp);],, [ac_c99_stdlib=no])
- AC_TRY_COMPILE([#include <stdlib.h>],
- [char* tmp; strtold("gnu", &tmp);],, [ac_c99_stdlib=no])
- AC_TRY_COMPILE([#include <stdlib.h>], [llabs(10);],, [ac_c99_stdlib=no])
- AC_TRY_COMPILE([#include <stdlib.h>], [lldiv(10,1);],, [ac_c99_stdlib=no])
- AC_TRY_COMPILE([#include <stdlib.h>], [atoll("10");],, [ac_c99_stdlib=no])
- AC_TRY_COMPILE([#include <stdlib.h>], [_Exit(0);],, [ac_c99_stdlib=no])
- if test x"$ac_c99_lldiv_t" = x"no"; then
- ac_c99_stdlib=no;
- fi;
+ [char* tmp;
+ strtof("gnu", &tmp);
+ strtold("gnu", &tmp);
+ llabs(10);
+ lldiv(10,1);
+ atoll("10");
+ _Exit(0);
+ lldiv_t mydivt;],[ac_c99_stdlib=yes], [ac_c99_stdlib=no])
+ ])
AC_MSG_RESULT($ac_c99_stdlib)
- # Check for the existence of <wchar.h> functions used if C99 is enabled.
- # XXX the wchar.h checks should be rolled into the general C99 bits.
- ac_c99_wchar=yes;
- AC_MSG_CHECKING([for additional ISO C99 support in <wchar.h>])
- AC_TRY_COMPILE([#include <wchar.h>],
- [wcstold(L"10.0", NULL);],, [ac_c99_wchar=no])
- AC_TRY_COMPILE([#include <wchar.h>],
- [wcstoll(L"10", NULL, 10);],, [ac_c99_wchar=no])
- AC_TRY_COMPILE([#include <wchar.h>],
- [wcstoull(L"10", NULL, 10);],, [ac_c99_wchar=no])
- AC_MSG_RESULT($ac_c99_wchar)
+ # Check for the existence in <wchar.h> of wcstoull, WEOF, etc.
+ AC_CHECK_HEADERS(wctype.h, ac_has_wctype_h=yes, ac_has_wctype_h=no)
+ ac_c99_wchar=no;
+ if test x"$ac_has_wchar_h" = xyes &&
+ test x"$ac_has_wctype_h" = xyes; then
+ AC_TRY_COMPILE([#include <wchar.h>
+ #include <stddef.h>
+ wint_t i;
+ long l = WEOF;
+ long j = WCHAR_MIN;
+ long k = WCHAR_MAX;
+ namespace test
+ {
+ using ::btowc;
+ using ::fgetwc;
+ using ::fgetws;
+ using ::fputwc;
+ using ::fputws;
+ using ::fwide;
+ using ::fwprintf;
+ using ::fwscanf;
+ using ::getwc;
+ using ::getwchar;
+ using ::mbrlen;
+ using ::mbrtowc;
+ using ::mbsinit;
+ using ::mbsrtowcs;
+ using ::putwc;
+ using ::putwchar;
+ using ::swprintf;
+ using ::swscanf;
+ using ::ungetwc;
+ using ::vfwprintf;
+ using ::vswprintf;
+ using ::vwprintf;
+ using ::wcrtomb;
+ using ::wcscat;
+ using ::wcschr;
+ using ::wcscmp;
+ using ::wcscoll;
+ using ::wcscpy;
+ using ::wcscspn;
+ using ::wcsftime;
+ using ::wcslen;
+ using ::wcsncat;
+ using ::wcsncmp;
+ using ::wcsncpy;
+ using ::wcspbrk;
+ using ::wcsrchr;
+ using ::wcsrtombs;
+ using ::wcsspn;
+ using ::wcsstr;
+ using ::wcstod;
+ using ::wcstok;
+ using ::wcstol;
+ using ::wcstold;
+ using ::wcstoll;
+ using ::wcstoul;
+ using ::wcstoull;
+ using ::wcsxfrm;
+ using ::wctob;
+ using ::wmemchr;
+ using ::wmemcmp;
+ using ::wmemcpy;
+ using ::wmemmove;
+ using ::wmemset;
+ using ::wprintf;
+ using ::wscanf;
+ }
+ ],[],[ac_c99_wchar=yes], [ac_c99_wchar=no])
+
+ # Checks for wide character functions that may not be present.
+ # Injection of these is wrapped with guard macros.
+ # NB: only put functions here, instead of immediately above, if
+ # absolutely necessary.
+ AC_TRY_COMPILE([#include <wchar.h>
+ namespace test { using ::vfwscanf; } ], [],
+ [AC_DEFINE(HAVE_VFWSCANF,1,
+ [Defined if vfwscanf exists.])],[])
+
+ AC_TRY_COMPILE([#include <wchar.h>
+ namespace test { using ::vswscanf; } ], [],
+ [AC_DEFINE(HAVE_VSWSCANF,1,
+ [Defined if vswscanf exists.])],[])
+
+ AC_TRY_COMPILE([#include <wchar.h>
+ namespace test { using ::vwscanf; } ], [],
+ [AC_DEFINE(HAVE_VWSCANF,1,[Defined if vwscanf exists.])],[])
+
+ AC_TRY_COMPILE([#include <wchar.h>
+ namespace test { using ::wcstof; } ], [],
+ [AC_DEFINE(HAVE_WCSTOF,1,[Defined if wcstof exists.])],[])
+
+ AC_TRY_COMPILE([#include <wctype.h>],
+ [ wint_t t; int i = iswblank(t);],
+ [AC_DEFINE(HAVE_ISWBLANK,1,
+ [Defined if iswblank exists.])],[])
+
+ AC_MSG_CHECKING([for ISO C99 support in <wchar.h>])
+ AC_MSG_RESULT($ac_c99_wchar)
+ fi
- AC_MSG_CHECKING([for enabled ISO C99 support])
+ # Option parsed, now set things appropriately.
if test x"$ac_c99_math" = x"no" ||
test x"$ac_c99_complex" = x"no" ||
test x"$ac_c99_stdio" = x"no" ||
test x"$ac_c99_stdlib" = x"no" ||
test x"$ac_c99_wchar" = x"no"; then
enable_c99=no;
- fi;
- AC_MSG_RESULT($enable_c99)
-
- # Option parsed, now set things appropriately
- if test x"$enable_c99" = x"yes"; then
+ else
AC_DEFINE(_GLIBCXX_USE_C99)
fi
AC_LANG_RESTORE
+ fi
+
+ AC_MSG_CHECKING([for fully enabled ISO C99 support])
+ AC_MSG_RESULT($enable_c99)
])
@@ -1296,7 +1237,7 @@ dnl
dnl Default is new.
dnl
AC_DEFUN([GLIBCXX_ENABLE_ALLOCATOR], [
- AC_MSG_CHECKING([for std::allocator base class to use])
+ AC_MSG_CHECKING([for std::allocator base class])
GLIBCXX_ENABLE(libstdcxx-allocator,auto,[=KIND],
[use KIND for target std::allocator base],
[permit new|malloc|mt|bitmap|pool|yes|no|auto])
@@ -1445,21 +1386,6 @@ AC_DEFUN([GLIBCXX_ENABLE_CXX_FLAGS], [dnl
dnl
-dnl Check for wide character support. Has the same effect as the option
-dnl in gcc's configure, but in a form that autoconf can mess with.
-dnl
-dnl --enable-c-mbchar requests all the wchar_t stuff.
-dnl --disable-c-mbchar doesn't.
-dnl + Usage: GLIBCXX_ENABLE_C_MBCHAR[(DEFAULT)]
-dnl Where DEFAULT is either `yes' or `no'.
-dnl
-AC_DEFUN([GLIBCXX_ENABLE_C_MBCHAR], [
- GLIBCXX_ENABLE(c-mbchar,$1,,[enable multibyte (wide) characters])
- # Option parsed, now other scripts can test enable_c_mbchar for yes/no.
-])
-
-
-dnl
dnl Check to see if debugging libraries are to be built.
dnl
dnl --enable-libstdcxx-debug
@@ -1555,7 +1481,7 @@ AC_DEFUN([GLIBCXX_ENABLE_HOSTED], [
dnl
-dnl Check for template specializations for the 'long long' type extension.
+dnl Check for template specializations for the 'long long' type.
dnl The result determines only whether 'long long' I/O is enabled; things
dnl like numeric_limits<> specializations are always available.
dnl
@@ -1565,10 +1491,32 @@ dnl + Usage: GLIBCXX_ENABLE_LONG_LONG[(DEFAULT)]
dnl Where DEFAULT is either `yes' or `no'.
dnl
AC_DEFUN([GLIBCXX_ENABLE_LONG_LONG], [
- GLIBCXX_ENABLE(long-long,$1,,[enables I/O support for 'long long'])
+ GLIBCXX_ENABLE(long-long,$1,,[enable template specializations for 'long long'])
if test $enable_long_long = yes; then
AC_DEFINE(_GLIBCXX_USE_LONG_LONG)
fi
+ AC_MSG_CHECKING([for enabled long long specializations])
+ AC_MSG_RESULT([$enable_long_long])
+])
+
+
+dnl
+dnl Check for template specializations for the 'wchar_t' type.
+dnl
+dnl --enable-wchar_t defines _GLIBCXX_USE_WCHAR_T
+dnl --disable-wchar_t leaves _GLIBCXX_USE_WCHAR_T undefined
+dnl + Usage: GLIBCXX_ENABLE_WCHAR_T[(DEFAULT)]
+dnl Where DEFAULT is either `yes' or `no'.
+dnl
+dnl Necessary support (probed along with C99 support) must also be present.
+dnl
+AC_DEFUN([GLIBCXX_ENABLE_WCHAR_T], [
+ GLIBCXX_ENABLE(wchar_t,$1,,[enable template specializations for 'wchar_t'])
+ if test x"$ac_c99_wchar" = x"yes" && test x"$enable_wchar_t" = x"yes"; then
+ AC_DEFINE(_GLIBCXX_USE_WCHAR_T)
+ fi
+ AC_MSG_CHECKING([for enabled wchar_t specializations])
+ AC_MSG_RESULT([$enable_wchar_t])
])
diff --git a/libstdc++-v3/config.h.in b/libstdc++-v3/config.h.in
index 76d32d1630f..01229cc5244 100644
--- a/libstdc++-v3/config.h.in
+++ b/libstdc++-v3/config.h.in
@@ -1,5 +1,5 @@
/* config.h.in. Generated from configure.ac by autoheader. */
-// acconfig.h symbols and macros for libstdc++ v3 -*- C++ -*-
+// Symbols and macros for libstdc++ -*- C++ -*-
// Defines libstdc++ version.
#undef PACKAGE
@@ -11,21 +11,25 @@
#undef HAVE_GETTEXT
#undef HAVE_STPCPY
-// Include I/O support for 'long long' and 'unsigned long long'.
+// Define if code specialized for long long should be used.
#undef _GLIBCXX_USE_LONG_LONG
-// Define if C99 features such as lldiv_t, llabs, lldiv should be exposed.
+// Define if code specialized for wchar_t should be used.
+#undef _GLIBCXX_USE_WCHAR_T
+
+// Define if C99 functions or macros from <wchar.h>, <math.h>,
+// <complex.h>, <stdio.h>, and <stdlib.h> can be used or exposed.
#undef _GLIBCXX_USE_C99
-// Define if C99 math functions (like fpclassify) should be exposed.
+// Define if C99 functions or macros in <math.h> should be imported in
+// <cmath> in namespace std.
#undef _GLIBCXX_USE_C99_MATH
-// Define if C99 complex math functions should be used in std::complex.
+// Define if C99 functions in <complex.h> should be used in
+// <complex>. Using compiler builtins for these functions requires
+// corresponding C99 library functions to be present.
#undef _GLIBCXX_USE_C99_COMPLEX
-// Define if code specialized for wchar_t should be used.
-#undef _GLIBCXX_USE_WCHAR_T
-
// Define if using setrlimit to set resource limits during 'make check'.
#undef _GLIBCXX_RES_LIMITS
@@ -194,9 +198,6 @@
/* Define to 1 if you have the `atanl' function. */
#undef HAVE_ATANL
-/* Define to 1 if you have the `btowc' function. */
-#undef HAVE_BTOWC
-
/* Define to 1 if you have the `ceilf' function. */
#undef HAVE_CEILF
@@ -242,12 +243,6 @@
/* Define to 1 if you have the `fabsl' function. */
#undef HAVE_FABSL
-/* Define to 1 if you have the `fgetwc' function. */
-#undef HAVE_FGETWC
-
-/* Define to 1 if you have the `fgetws' function. */
-#undef HAVE_FGETWS
-
/* Define to 1 if you have the `finite' function. */
#undef HAVE_FINITE
@@ -275,12 +270,6 @@
/* Define to 1 if you have the `fpclass' function. */
#undef HAVE_FPCLASS
-/* Define to 1 if you have the `fputwc' function. */
-#undef HAVE_FPUTWC
-
-/* Define to 1 if you have the `fputws' function. */
-#undef HAVE_FPUTWS
-
/* Define to 1 if you have the <fp.h> header file. */
#undef HAVE_FP_H
@@ -290,27 +279,12 @@
/* Define to 1 if you have the `frexpl' function. */
#undef HAVE_FREXPL
-/* Define to 1 if you have the `fwide' function. */
-#undef HAVE_FWIDE
-
-/* Define to 1 if you have the `fwprintf' function. */
-#undef HAVE_FWPRINTF
-
-/* Define to 1 if you have the `fwscanf' function. */
-#undef HAVE_FWSCANF
-
/* Define to 1 if you have the <gconv.h> header file. */
#undef HAVE_GCONV_H
/* Define to 1 if you have the `getpagesize' function. */
#undef HAVE_GETPAGESIZE
-/* Define to 1 if you have the `getwc' function. */
-#undef HAVE_GETWC
-
-/* Define to 1 if you have the `getwchar' function. */
-#undef HAVE_GETWCHAR
-
/* Define to 1 if you have the `hypot' function. */
#undef HAVE_HYPOT
@@ -353,7 +327,7 @@
/* Define to 1 if you have the `isnanl' function. */
#undef HAVE_ISNANL
-/* Define to 1 if you have the `iswblank' function. */
+/* Defined if iswblank exists. */
#undef HAVE_ISWBLANK
/* Define to 1 if you have the `ldexpf' function. */
@@ -404,18 +378,6 @@
/* Define to 1 if you have the <machine/param.h> header file. */
#undef HAVE_MACHINE_PARAM_H
-/* Define to 1 if you have the `mbrlen' function. */
-#undef HAVE_MBRLEN
-
-/* Define to 1 if you have the `mbrtowc' function. */
-#undef HAVE_MBRTOWC
-
-/* Define to 1 if you have the `mbsinit' function. */
-#undef HAVE_MBSINIT
-
-/* Define to 1 if you have the `mbsrtowcs' function. */
-#undef HAVE_MBSRTOWCS
-
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
@@ -440,12 +402,6 @@
/* Define to 1 if you have the `powl' function. */
#undef HAVE_POWL
-/* Define to 1 if you have the `putwc' function. */
-#undef HAVE_PUTWC
-
-/* Define to 1 if you have the `putwchar' function. */
-#undef HAVE_PUTWCHAR
-
/* Define to 1 if you have the `qfpclass' function. */
#undef HAVE_QFPCLASS
@@ -500,12 +456,6 @@
/* Define to 1 if you have the `strtold' function. */
#undef HAVE_STRTOLD
-/* Define to 1 if you have the `swprintf' function. */
-#undef HAVE_SWPRINTF
-
-/* Define to 1 if you have the `swscanf' function. */
-#undef HAVE_SWSCANF
-
/* Define to 1 if you have the <sys/filio.h> header file. */
#undef HAVE_SYS_FILIO_H
@@ -554,129 +504,27 @@
/* Define to 1 if you have the `tanl' function. */
#undef HAVE_TANL
-/* Define to 1 if you have the `ungetwc' function. */
-#undef HAVE_UNGETWC
-
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
-/* Define to 1 if you have the `vfwprintf' function. */
-#undef HAVE_VFWPRINTF
-
-/* Define to 1 if you have the `vfwscanf' function. */
+/* Defined if vfwscanf exists. */
#undef HAVE_VFWSCANF
-/* Define to 1 if you have the `vswprintf' function. */
-#undef HAVE_VSWPRINTF
-
-/* Define to 1 if you have the `vswscanf' function. */
+/* Defined if vswscanf exists. */
#undef HAVE_VSWSCANF
-/* Define to 1 if you have the `vwprintf' function. */
-#undef HAVE_VWPRINTF
-
-/* Define to 1 if you have the `vwscanf' function. */
+/* Defined if vwscanf exists. */
#undef HAVE_VWSCANF
/* Define to 1 if you have the <wchar.h> header file. */
#undef HAVE_WCHAR_H
-/* Define to 1 if you have the `wcrtomb' function. */
-#undef HAVE_WCRTOMB
-
-/* Define to 1 if you have the `wcscat' function. */
-#undef HAVE_WCSCAT
-
-/* Define to 1 if you have the `wcschr' function. */
-#undef HAVE_WCSCHR
-
-/* Define to 1 if you have the `wcscmp' function. */
-#undef HAVE_WCSCMP
-
-/* Define to 1 if you have the `wcscoll' function. */
-#undef HAVE_WCSCOLL
-
-/* Define to 1 if you have the `wcscpy' function. */
-#undef HAVE_WCSCPY
-
-/* Define to 1 if you have the `wcscspn' function. */
-#undef HAVE_WCSCSPN
-
-/* Define to 1 if you have the `wcsftime' function. */
-#undef HAVE_WCSFTIME
-
-/* Define to 1 if you have the `wcslen' function. */
-#undef HAVE_WCSLEN
-
-/* Define to 1 if you have the `wcsncat' function. */
-#undef HAVE_WCSNCAT
-
-/* Define to 1 if you have the `wcsncmp' function. */
-#undef HAVE_WCSNCMP
-
-/* Define to 1 if you have the `wcsncpy' function. */
-#undef HAVE_WCSNCPY
-
-/* Define to 1 if you have the `wcspbrk' function. */
-#undef HAVE_WCSPBRK
-
-/* Define to 1 if you have the `wcsrchr' function. */
-#undef HAVE_WCSRCHR
-
-/* Define to 1 if you have the `wcsrtombs' function. */
-#undef HAVE_WCSRTOMBS
-
-/* Define to 1 if you have the `wcsspn' function. */
-#undef HAVE_WCSSPN
-
-/* Define to 1 if you have the `wcsstr' function. */
-#undef HAVE_WCSSTR
-
-/* Define to 1 if you have the `wcstod' function. */
-#undef HAVE_WCSTOD
-
-/* Define to 1 if you have the `wcstof' function. */
+/* Defined if wcstof exists. */
#undef HAVE_WCSTOF
-/* Define to 1 if you have the `wcstok' function. */
-#undef HAVE_WCSTOK
-
-/* Define to 1 if you have the `wcstol' function. */
-#undef HAVE_WCSTOL
-
-/* Define to 1 if you have the `wcstoul' function. */
-#undef HAVE_WCSTOUL
-
-/* Define to 1 if you have the `wcsxfrm' function. */
-#undef HAVE_WCSXFRM
-
-/* Define to 1 if you have the `wctob' function. */
-#undef HAVE_WCTOB
-
/* Define to 1 if you have the <wctype.h> header file. */
#undef HAVE_WCTYPE_H
-/* Define to 1 if you have the `wmemchr' function. */
-#undef HAVE_WMEMCHR
-
-/* Define to 1 if you have the `wmemcmp' function. */
-#undef HAVE_WMEMCMP
-
-/* Define to 1 if you have the `wmemcpy' function. */
-#undef HAVE_WMEMCPY
-
-/* Define to 1 if you have the `wmemmove' function. */
-#undef HAVE_WMEMMOVE
-
-/* Define to 1 if you have the `wmemset' function. */
-#undef HAVE_WMEMSET
-
-/* Define to 1 if you have the `wprintf' function. */
-#undef HAVE_WPRINTF
-
-/* Define to 1 if you have the `wscanf' function. */
-#undef HAVE_WSCANF
-
/* Define to 1 if you have the `_acosf' function. */
#undef HAVE__ACOSF
@@ -898,6 +746,9 @@
/* Define if the compiler is configured for setjmp/longjmp exceptions. */
#undef _GLIBCXX_SJLJ_EXCEPTIONS
+
+/* Define if iconv and related functions exist and are usable. */
+#undef _GLIBCXX_USE_ICONV
//
// Systems that have certain non-standard functions prefixed with an
// underscore, we'll handle those here. Must come after config.h.in.
diff --git a/libstdc++-v3/config/locale/gnu/c++locale_internal.h b/libstdc++-v3/config/locale/gnu/c++locale_internal.h
index 8aa5b569594..dc049effe47 100644
--- a/libstdc++-v3/config/locale/gnu/c++locale_internal.h
+++ b/libstdc++-v3/config/locale/gnu/c++locale_internal.h
@@ -1,6 +1,6 @@
// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*-
-// Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+// Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -29,11 +29,11 @@
// Written by Jakub Jelinek <jakub@redhat.com>
+#include <bits/c++config.h>
#include <clocale>
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
-extern "C" __typeof(iswctype_l) __iswctype_l;
extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l;
extern "C" __typeof(strcoll_l) __strcoll_l;
extern "C" __typeof(strftime_l) __strftime_l;
@@ -41,15 +41,19 @@ extern "C" __typeof(strtod_l) __strtod_l;
extern "C" __typeof(strtof_l) __strtof_l;
extern "C" __typeof(strtold_l) __strtold_l;
extern "C" __typeof(strxfrm_l) __strxfrm_l;
+extern "C" __typeof(newlocale) __newlocale;
+extern "C" __typeof(freelocale) __freelocale;
+extern "C" __typeof(duplocale) __duplocale;
+extern "C" __typeof(uselocale) __uselocale;
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+extern "C" __typeof(iswctype_l) __iswctype_l;
extern "C" __typeof(towlower_l) __towlower_l;
extern "C" __typeof(towupper_l) __towupper_l;
extern "C" __typeof(wcscoll_l) __wcscoll_l;
extern "C" __typeof(wcsftime_l) __wcsftime_l;
extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l;
extern "C" __typeof(wctype_l) __wctype_l;
-extern "C" __typeof(newlocale) __newlocale;
-extern "C" __typeof(freelocale) __freelocale;
-extern "C" __typeof(duplocale) __duplocale;
-extern "C" __typeof(uselocale) __uselocale;
+#endif
#endif // GLIBC 2.3 and later
diff --git a/libstdc++-v3/config/locale/gnu/c_locale.h b/libstdc++-v3/config/locale/gnu/c_locale.h
index b6082a2e3fc..c9955062353 100644
--- a/libstdc++-v3/config/locale/gnu/c_locale.h
+++ b/libstdc++-v3/config/locale/gnu/c_locale.h
@@ -1,6 +1,6 @@
// Wrapper for underlying C-language localization -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -66,7 +66,9 @@ namespace std
// be avoided.
template<typename _Tv>
int
- __convert_from_v(char* __out, const int __size, const char* __fmt,
+ __convert_from_v(char* __out,
+ const int __size __attribute__ ((__unused__)),
+ const char* __fmt,
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
_Tv __v, const __c_locale& __cloc, int __prec)
{
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 738cae13796..cae1c106237 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -309,7 +309,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS libtool_VERSION multi_basedir build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar glibcxx_builddir glibcxx_srcdir toplevel_srcdir CC ac_ct_CC EXEEXT OBJEXT CXX ac_ct_CXX CFLAGS CXXFLAGS LN_S AS ac_ct_AS AR ac_ct_AR RANLIB ac_ct_RANLIB MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBTOOL CXXCPP CPPFLAGS enable_shared enable_static GLIBCXX_HOSTED_TRUE GLIBCXX_HOSTED_FALSE GLIBCXX_BUILD_PCH_TRUE GLIBCXX_BUILD_PCH_FALSE glibcxx_PCHFLAGS CSTDIO_H BASIC_FILE_H BASIC_FILE_CC CPP EGREP check_msgfmt glibcxx_MOFILES glibcxx_POFILES glibcxx_localedir USE_NLS CLOCALE_H CMESSAGES_H CCODECVT_CC CCOLLATE_CC CCTYPE_CC CMESSAGES_CC CMONEY_CC CNUMERIC_CC CTIME_H CTIME_CC CLOCALE_CC CLOCALE_INTERNAL_H ALLOCATOR_H ALLOCATOR_NAME C_INCLUDE_DIR GLIBCXX_C_HEADERS_C_TRUE GLIBCXX_C_HEADERS_C_FALSE GLIBCXX_C_HEADERS_C_STD_TRUE GLIBCXX_C_HEADERS_C_STD_FALSE GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE glibcxx_thread_h DEBUG_FLAGS GLIBCXX_BUILD_DEBUG_TRUE GLIBCXX_BUILD_DEBUG_FALSE EXTRA_CXX_FLAGS WERROR SECTION_FLAGS SECTION_LDFLAGS OPT_LDFLAGS LIBMATHOBJS LIBICONV SYMVER_MAP port_specific_symbol_files GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE GLIBCXX_BUILD_VERSIONED_SHLIB_FALSE baseline_dir GLIBCXX_TEST_WCHAR_T_TRUE GLIBCXX_TEST_WCHAR_T_FALSE GLIBCXX_TEST_THREAD_TRUE GLIBCXX_TEST_THREAD_FALSE GLIBCXX_TEST_ABI_TRUE GLIBCXX_TEST_ABI_FALSE ATOMICITY_SRCDIR ATOMIC_WORD_SRCDIR ABI_TWEAKS_SRCDIR OS_INC_SRCDIR glibcxx_prefixdir gxx_include_dir glibcxx_toolexecdir glibcxx_toolexeclibdir GLIBCXX_INCLUDES TOPLEVEL_INCLUDES OPTIMIZE_CXXFLAGS WARN_FLAGS LIBSUPCXX_PICFLAGS LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS libtool_VERSION multi_basedir build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar glibcxx_builddir glibcxx_srcdir toplevel_srcdir CC ac_ct_CC EXEEXT OBJEXT CXX ac_ct_CXX CFLAGS CXXFLAGS LN_S AS ac_ct_AS AR ac_ct_AR RANLIB ac_ct_RANLIB MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBTOOL CXXCPP CPPFLAGS enable_shared enable_static GLIBCXX_HOSTED_TRUE GLIBCXX_HOSTED_FALSE GLIBCXX_BUILD_PCH_TRUE GLIBCXX_BUILD_PCH_FALSE glibcxx_PCHFLAGS CSTDIO_H BASIC_FILE_H BASIC_FILE_CC CPP EGREP check_msgfmt glibcxx_MOFILES glibcxx_POFILES glibcxx_localedir USE_NLS CLOCALE_H CMESSAGES_H CCODECVT_CC CCOLLATE_CC CCTYPE_CC CMESSAGES_CC CMONEY_CC CNUMERIC_CC CTIME_H CTIME_CC CLOCALE_CC CLOCALE_INTERNAL_H ALLOCATOR_H ALLOCATOR_NAME C_INCLUDE_DIR GLIBCXX_C_HEADERS_C_TRUE GLIBCXX_C_HEADERS_C_FALSE GLIBCXX_C_HEADERS_C_STD_TRUE GLIBCXX_C_HEADERS_C_STD_FALSE GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE DEBUG_FLAGS GLIBCXX_BUILD_DEBUG_TRUE GLIBCXX_BUILD_DEBUG_FALSE EXTRA_CXX_FLAGS glibcxx_thread_h WERROR SECTION_FLAGS SECTION_LDFLAGS OPT_LDFLAGS LIBMATHOBJS LIBICONV SYMVER_MAP port_specific_symbol_files GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE GLIBCXX_BUILD_VERSIONED_SHLIB_FALSE baseline_dir GLIBCXX_TEST_WCHAR_T_TRUE GLIBCXX_TEST_WCHAR_T_FALSE GLIBCXX_TEST_THREAD_TRUE GLIBCXX_TEST_THREAD_FALSE GLIBCXX_TEST_ABI_TRUE GLIBCXX_TEST_ABI_FALSE ATOMICITY_SRCDIR ATOMIC_WORD_SRCDIR ABI_TWEAKS_SRCDIR OS_INC_SRCDIR glibcxx_prefixdir gxx_include_dir glibcxx_toolexecdir glibcxx_toolexeclibdir GLIBCXX_INCLUDES TOPLEVEL_INCLUDES OPTIMIZE_CXXFLAGS WARN_FLAGS LIBSUPCXX_PICFLAGS LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -869,11 +869,11 @@ Optional Features:
[default=auto]
--enable-cheaders=KIND construct "C" headers for g++
[default=$c_model]
- --enable-c-mbchar enable multibyte (wide) characters
- [default=yes]
--enable-c99 turns on ISO/IEC 9899:1999 support
[default=yes]
- --enable-long-long enables I/O support for 'long long'
+ --enable-long-long enable template specializations for 'long long'
+ [default=yes]
+ --enable-wchar_t enable template specializations for 'wchar_t'
[default=yes]
--enable-concept-checks use Boost-derived template checks [default=no]
--enable-libstdcxx-debug-flags=FLAGS
@@ -3637,14 +3637,6 @@ fi
## (Right now, this only matters for enable_wchar_t, but nothing prevents
## other macros from doing the same. This should be automated.) -pme
need_libmath=no
- enable_wchar_t=no
- #enable_libstdcxx_debug=no
- #enable_libstdcxx_pch=no
- #enable_cheaders=c
- #c_compatibility=no
- #enable_abi_check=no
- #enable_symvers=no
- #enable_hosted_libstdcxx=yes
# Find platform-specific directories containing configuration info.
# Also possibly modify flags used elsewhere, as needed by the platform.
@@ -3657,7 +3649,6 @@ echo "$as_me: OS config directory is $os_include_dir" >&6;}
-#AC_MSG_NOTICE([====== Starting libtool configuration])
# Check whether --enable-shared or --disable-shared was given.
if test "${enable_shared+set}" = set; then
@@ -4383,7 +4374,7 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
case $host in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 4386 "configure"' > conftest.$ac_ext
+ echo '#line 4377 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -4930,10 +4921,9 @@ exec 5>>./config.log
-#AC_MSG_NOTICE([====== Finished libtool configuration]) ; sleep 10
# Possibly disable most of the library.
-## XXX Consider skipping unncessary tests altogether in this case, rather
+## TODO: Consider skipping unncessary tests altogether in this case, rather
## than just ignoring the results. Faster /and/ more correct, win win.
# Check whether --enable-hosted-libstdcxx or --disable-hosted-libstdcxx was given.
@@ -4969,7 +4959,7 @@ _ACEOF
-# Check for support bits and g++ features that don't require linking.
+# Check for compiler support that doesn't require linking.
echo "$as_me:$LINENO: checking for exception model to use" >&5
echo $ECHO_N "checking for exception model to use... $ECHO_C" >&6
@@ -5004,7 +4994,7 @@ fi;
#
# Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style.
cat > conftest.$ac_ext << EOF
-#line 5007 "configure"
+#line 4997 "configure"
struct S { ~S(); };
void bar();
void foo()
@@ -5132,7 +5122,6 @@ echo "${ECHO_T}$glibcxx_cv_prog_CXX_pch" >&6
# Enable all the variable C++ runtime options.
-# NB: C_MBCHAR must come early.
echo "$as_me:$LINENO: checking for underlying I/O to use" >&5
echo $ECHO_N "checking for underlying I/O to use... $ECHO_C" >&6
@@ -6242,8 +6231,8 @@ _ACEOF
- echo "$as_me:$LINENO: checking for std::allocator base class to use" >&5
-echo $ECHO_N "checking for std::allocator base class to use... $ECHO_C" >&6
+ echo "$as_me:$LINENO: checking for std::allocator base class" >&5
+echo $ECHO_N "checking for std::allocator base class... $ECHO_C" >&6
# Check whether --enable-libstdcxx-allocator or --disable-libstdcxx-allocator was given.
if test "${enable_libstdcxx_allocator+set}" = set; then
enableval="$enable_libstdcxx_allocator"
@@ -6342,24 +6331,6 @@ echo "$as_me: \"C\" header strategy set to $enable_cheaders" >&6;}
- # Check whether --enable-c-mbchar or --disable-c-mbchar was given.
-if test "${enable_c_mbchar+set}" = set; then
- enableval="$enable_c_mbchar"
-
- case "$enableval" in
- yes|no) ;;
- *) { { echo "$as_me:$LINENO: error: Argument to enable/disable c-mbchar must be yes or no" >&5
-echo "$as_me: error: Argument to enable/disable c-mbchar must be yes or no" >&2;}
- { (exit 1); exit 1; }; } ;;
- esac
-
-else
- enable_c_mbchar=yes
-fi;
-
- # Option parsed, now other scripts can test enable_c_mbchar for yes/no.
-
-
# Check whether --enable-c99 or --disable-c99 was given.
@@ -6378,123 +6349,32 @@ else
fi;
+ # Test wchar.h for mbstate_t, which is needed for char_traits and fpos
+ # even if C99 support is turned off.
-
- ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
- # Check for the existence of <math.h> functions used if C99 is enabled.
- ac_c99_math=yes;
- echo "$as_me:$LINENO: checking for ISO C99 support in <math.h>" >&5
-echo $ECHO_N "checking for ISO C99 support in <math.h>... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <math.h>
-int
-main ()
-{
-fpclassify(0.0);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_c99_math=no
+for ac_header in wchar.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <math.h>
-int
-main ()
-{
-isfinite(0.0);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_c99_math=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <math.h>
-int
-main ()
-{
-isinf(0.0);
- ;
- return 0;
-}
+$ac_includes_default
+#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -6505,7 +6385,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
+ { ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
@@ -6518,250 +6398,124 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- :
+ ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_c99_math=no
+ac_header_compiler=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <math.h>
-int
-main ()
-{
-isnan(0.0);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
-ac_c99_math=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <math.h>
-int
-main ()
-{
-isnormal(0.0);
- ;
- return 0;
-}
+#include <$ac_header>
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_c99_math=no
+ ac_cpp_err=yes
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <math.h>
-int
-main ()
-{
-signbit(0.0);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_c99_math=no
+ ac_header_preproc=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <math.h>
-int
-main ()
-{
-isgreater(0.0,0.0);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ----------------------------------------- ##
+## Report this to the package-unused lists. ##
+## ----------------------------------------- ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-ac_c99_math=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <math.h>
-int
-main ()
-{
-isgreaterequal(0.0,0.0);
- ;
- return 0;
-}
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
+ ac_has_wchar_h=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_c99_math=no
+ ac_has_wchar_h=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+done
+
+ echo "$as_me:$LINENO: checking for mbstate_t" >&5
+echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <math.h>
+#include <wchar.h>
int
main ()
{
-isless(0.0,0.0);
+mbstate_t teststate;
;
return 0;
}
@@ -6775,7 +6529,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
+ { ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
@@ -6788,59 +6542,41 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- :
+ have_mbstate_t=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_c99_math=no
+have_mbstate_t=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <math.h>
-int
-main ()
-{
-islessequal(0.0,0.0);
- ;
- return 0;
-}
+ echo "$as_me:$LINENO: result: $have_mbstate_t" >&5
+echo "${ECHO_T}$have_mbstate_t" >&6
+ if test x"$have_mbstate_t" = xyes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_MBSTATE_T 1
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
+
+ fi
+
+ if test x"$enable_c99" = x"yes"; then
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+ # Check for the existence of <math.h> functions used if C99 is enabled.
+ echo "$as_me:$LINENO: checking for ISO C99 support in <math.h>" >&5
+echo $ECHO_N "checking for ISO C99 support in <math.h>... $ECHO_C" >&6
+ if test "${ac_c99_math+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-ac_c99_math=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -6851,7 +6587,20 @@ cat >>conftest.$ac_ext <<_ACEOF
int
main ()
{
-islessgreater(0.0,0.0);
+fpclassify(0.0);
+ isfinite(0.0);
+ isinf(0.0);
+ isnan(0.0);
+ isnormal(0.0);
+ signbit(0.0);
+ isgreater(0.0,0.0);
+ isgreaterequal(0.0,0.0);
+ isless(0.0,0.0);
+ islessequal(0.0,0.0);
+ islessgreater(0.0,0.0);
+ islessgreater(0.0,0.0);
+ isunordered(0.0,0.0);
+
;
return 0;
}
@@ -6878,7 +6627,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- :
+ ac_c99_math=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -6886,54 +6635,11 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_c99_math=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <math.h>
-int
-main ()
-{
-isunordered(0.0,0.0);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-ac_c99_math=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
echo "$as_me:$LINENO: result: $ac_c99_math" >&5
echo "${ECHO_T}$ac_c99_math" >&6
-
if test x"$ac_c99_math" = x"yes"; then
cat >>confdefs.h <<\_ACEOF
#define _GLIBCXX_USE_C99_MATH 1
@@ -6945,6 +6651,10 @@ _ACEOF
# This is necessary even though libstdc++ uses the builtin versions
# of these functions, because if the builtin cannot be used, a reference
# to the library function is emitted.
+ # In addition, need to explicitly specify "C" compilation for this
+ # one, or else the backwards C++ <complex.h> include will be selected.
+ save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -x c"
for ac_header in complex.h
do
@@ -7099,7 +6809,6 @@ done
ac_c99_complex=no;
if test x"$ac_has_complex_h" = x"yes"; then
- ac_c99_complex=yes;
echo "$as_me:$LINENO: checking for ISO C99 support in <complex.h>" >&5
echo $ECHO_N "checking for ISO C99 support in <complex.h>... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
@@ -7112,54 +6821,43 @@ cat >>conftest.$ac_ext <<_ACEOF
int
main ()
{
-typedef __complex__ float _ComplexT; _ComplexT tmp;
- cabsf(tmp);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+typedef __complex__ float float_type; float_type tmpf;
+ cabsf(tmpf);
+ cargf(tmpf);
+ ccosf(tmpf);
+ ccoshf(tmpf);
+ cexpf(tmpf);
+ csinf(tmpf);
+ csinhf(tmpf);
+ csqrtf(tmpf);
+ ctanf(tmpf);
+ ctanhf(tmpf);
+ cpowf(tmpf, tmpf);
+ typedef __complex__ double double_type; double_type tmpd;
+ cabs(tmpd);
+ carg(tmpd);
+ ccos(tmpd);
+ ccosh(tmpd);
+ cexp(tmpd);
+ csin(tmpd);
+ csinh(tmpd);
+ csqrt(tmpd);
+ ctan(tmpd);
+ ctanh(tmpd);
+ cpow(tmpd, tmpd);
+ typedef __complex__ long double ld_type; ld_type tmpld;
+ cabsl(tmpld);
+ cargl(tmpld);
+ ccosl(tmpld);
+ ccoshl(tmpld);
+ cexpl(tmpld);
+ csinl(tmpld);
+ csinhl(tmpld);
+ csqrtl(tmpld);
+ ctanl(tmpld);
+ ctanhl(tmpld);
+ cpowl(tmpld, tmpld);
-ac_c99_complex=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <complex.h>
-int
-main ()
-{
-typedef __complex__ double _ComplexT; _ComplexT tmp;
- cabs(tmp);
;
return 0;
}
@@ -7186,7 +6884,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- :
+ ac_c99_complex=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -7194,156 +6892,44 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_c99_complex=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <complex.h>
-int
-main ()
-{
-typedef __complex__ long double _ComplexT; _ComplexT tmp;
- cabsl(tmp);
- ;
- return 0;
-}
+ fi
+ CXXFLAGS="$save_CXXFLAGS"
+ echo "$as_me:$LINENO: result: $ac_c99_complex" >&5
+echo "${ECHO_T}$ac_c99_complex" >&6
+ if test x"$ac_c99_complex" = x"yes"; then
+ cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_USE_C99_COMPLEX 1
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-ac_c99_complex=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <complex.h>
-int
-main ()
-{
-typedef __complex__ float _ComplexT; _ComplexT tmp;
- cargf(tmp);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ fi
-ac_c99_complex=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <complex.h>
-int
-main ()
-{
-typedef __complex__ double _ComplexT; _ComplexT tmp;
- carg(tmp);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
+ # Check for the existence in <stdio.h> of vscanf, et. al.
+ echo "$as_me:$LINENO: checking for ISO C99 support in <stdio.h>" >&5
+echo $ECHO_N "checking for ISO C99 support in <stdio.h>... $ECHO_C" >&6
+ if test "${ac_c99_stdio+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-ac_c99_complex=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <complex.h>
+#include <stdio.h>
+ #include <stdarg.h>
+ void foo(char* fmt, ...)
+ {
+ va_list args; va_start(args, fmt);
+ vfscanf(stderr, "%i", args);
+ vscanf("%i", args);
+ vsnprintf(fmt, 0, "%i", args);
+ vsscanf(fmt, "%i", args);
+ }
int
main ()
{
-typedef __complex__ long double _ComplexT; _ComplexT tmp;
- cargl(tmp);
+snprintf("12", 0, "%i");
;
return 0;
}
@@ -7370,210 +6956,45 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- :
+ ac_c99_stdio=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_c99_complex=no
+ac_c99_stdio=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <complex.h>
-int
-main ()
-{
-typedef __complex__ float _ComplexT; _ComplexT tmp;
- ccosf(tmp);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-ac_c99_complex=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <complex.h>
-int
-main ()
-{
-typedef __complex__ double _ComplexT; _ComplexT tmp;
- ccos(tmp);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-ac_c99_complex=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <complex.h>
-int
-main ()
-{
-typedef __complex__ long double _ComplexT; _ComplexT tmp;
- ccosl(tmp);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ echo "$as_me:$LINENO: result: $ac_c99_stdio" >&5
+echo "${ECHO_T}$ac_c99_stdio" >&6
-ac_c99_complex=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <complex.h>
-int
-main ()
-{
-typedef __complex__ float _ComplexT; _ComplexT tmp;
- ccoshf(tmp);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
+ # Check for the existence in <stdlib.h> of lldiv_t, et. al.
+ echo "$as_me:$LINENO: checking for ISO C99 support in <stdlib.h>" >&5
+echo $ECHO_N "checking for ISO C99 support in <stdlib.h>... $ECHO_C" >&6
+ if test "${ac_c99_stdlib+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-ac_c99_complex=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <complex.h>
+#include <stdlib.h>
int
main ()
{
-typedef __complex__ double _ComplexT; _ComplexT tmp;
- ccosh(tmp);
+char* tmp;
+ strtof("gnu", &tmp);
+ strtold("gnu", &tmp);
+ llabs(10);
+ lldiv(10,1);
+ atoll("10");
+ _Exit(0);
+ lldiv_t mydivt;
;
return 0;
}
@@ -7600,259 +7021,45 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- :
+ ac_c99_stdlib=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_c99_complex=no
+ac_c99_stdlib=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <complex.h>
-int
-main ()
-{
-typedef __complex__ long double _ComplexT; _ComplexT tmp;
- ccoshl(tmp);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-ac_c99_complex=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <complex.h>
-int
-main ()
-{
-typedef __complex__ float _ComplexT; _ComplexT tmp;
- cexpf(tmp);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-ac_c99_complex=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <complex.h>
-int
-main ()
-{
-typedef __complex__ double _ComplexT; _ComplexT tmp;
- cexp(tmp);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ echo "$as_me:$LINENO: result: $ac_c99_stdlib" >&5
+echo "${ECHO_T}$ac_c99_stdlib" >&6
-ac_c99_complex=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <complex.h>
-int
-main ()
-{
-typedef __complex__ long double _ComplexT; _ComplexT tmp;
- cexpl(tmp);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ # Check for the existence in <wchar.h> of wcstoull, WEOF, etc.
-ac_c99_complex=no
+for ac_header in wctype.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <complex.h>
-int
-main ()
-{
-typedef __complex__ float _ComplexT; _ComplexT tmp;
- csinf(tmp);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_c99_complex=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <complex.h>
-int
-main ()
-{
-typedef __complex__ double _ComplexT; _ComplexT tmp;
- csin(tmp);
- ;
- return 0;
-}
+$ac_includes_default
+#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -7876,532 +7083,189 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- :
+ ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_c99_complex=no
+ac_header_compiler=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <complex.h>
-int
-main ()
-{
-typedef __complex__ long double _ComplexT; _ComplexT tmp;
- csinl(tmp);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
-ac_c99_complex=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <complex.h>
-int
-main ()
-{
-typedef __complex__ float _ComplexT; _ComplexT tmp;
- csinhf(tmp);
- ;
- return 0;
-}
+#include <$ac_header>
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_cxx_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+ else
+ ac_cpp_err=
+ fi
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_c99_complex=no
+ ac_cpp_err=yes
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <complex.h>
-int
-main ()
-{
-typedef __complex__ double _ComplexT; _ComplexT tmp;
- csinh(tmp);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_c99_complex=no
+ ac_header_preproc=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <complex.h>
-int
-main ()
-{
-typedef __complex__ long double _ComplexT; _ComplexT tmp;
- csinhl(tmp);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
-ac_c99_complex=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <complex.h>
-int
-main ()
-{
-typedef __complex__ float _ComplexT; _ComplexT tmp;
- csqrtf(tmp);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ----------------------------------------- ##
+## Report this to the package-unused lists. ##
+## ----------------------------------------- ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_c99_complex=no
+ eval "$as_ac_Header=\$ac_header_preproc"
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <complex.h>
-int
-main ()
-{
-typedef __complex__ double _ComplexT; _ComplexT tmp;
- csqrt(tmp);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-ac_c99_complex=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <complex.h>
-int
-main ()
-{
-typedef __complex__ long double _ComplexT; _ComplexT tmp;
- csqrtl(tmp);
- ;
- return 0;
-}
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
+ ac_has_wctype_h=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_c99_complex=no
+ ac_has_wctype_h=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <complex.h>
-int
-main ()
-{
-typedef __complex__ float _ComplexT; _ComplexT tmp;
- ctanf(tmp);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-ac_c99_complex=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <complex.h>
-int
-main ()
-{
-typedef __complex__ double _ComplexT; _ComplexT tmp;
- ctan(tmp);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+done
-ac_c99_complex=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c99_wchar=no;
+ if test x"$ac_has_wchar_h" = xyes &&
+ test x"$ac_has_wctype_h" = xyes; then
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <complex.h>
-int
-main ()
-{
-typedef __complex__ long double _ComplexT; _ComplexT tmp;
- ctanl(tmp);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+#include <wchar.h>
+ #include <stddef.h>
+ wint_t i;
+ long l = WEOF;
+ long j = WCHAR_MIN;
+ long k = WCHAR_MAX;
+ namespace test
+ {
+ using ::btowc;
+ using ::fgetwc;
+ using ::fgetws;
+ using ::fputwc;
+ using ::fputws;
+ using ::fwide;
+ using ::fwprintf;
+ using ::fwscanf;
+ using ::getwc;
+ using ::getwchar;
+ using ::mbrlen;
+ using ::mbrtowc;
+ using ::mbsinit;
+ using ::mbsrtowcs;
+ using ::putwc;
+ using ::putwchar;
+ using ::swprintf;
+ using ::swscanf;
+ using ::ungetwc;
+ using ::vfwprintf;
+ using ::vswprintf;
+ using ::vwprintf;
+ using ::wcrtomb;
+ using ::wcscat;
+ using ::wcschr;
+ using ::wcscmp;
+ using ::wcscoll;
+ using ::wcscpy;
+ using ::wcscspn;
+ using ::wcsftime;
+ using ::wcslen;
+ using ::wcsncat;
+ using ::wcsncmp;
+ using ::wcsncpy;
+ using ::wcspbrk;
+ using ::wcsrchr;
+ using ::wcsrtombs;
+ using ::wcsspn;
+ using ::wcsstr;
+ using ::wcstod;
+ using ::wcstok;
+ using ::wcstol;
+ using ::wcstold;
+ using ::wcstoll;
+ using ::wcstoul;
+ using ::wcstoull;
+ using ::wcsxfrm;
+ using ::wctob;
+ using ::wmemchr;
+ using ::wmemcmp;
+ using ::wmemcpy;
+ using ::wmemmove;
+ using ::wmemset;
+ using ::wprintf;
+ using ::wscanf;
+ }
-ac_c99_complex=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <complex.h>
int
main ()
{
-typedef __complex__ float _ComplexT; _ComplexT tmp;
- ctanhf(tmp);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-ac_c99_complex=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <complex.h>
-int
-main ()
-{
-typedef __complex__ double _ComplexT; _ComplexT tmp;
- ctanh(tmp);
;
return 0;
}
@@ -8428,118 +7292,31 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- :
+ ac_c99_wchar=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_c99_complex=no
+ac_c99_wchar=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <complex.h>
-int
-main ()
-{
-typedef __complex__ long double _ComplexT; _ComplexT tmp;
- ctanhl(tmp);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-ac_c99_complex=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ # Checks for wide character functions that may not be present.
+ # Injection of these is wrapped with guard macros.
+ # NB: only put functions here, instead of immediately above, if
+ # absolutely necessary.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <complex.h>
+#include <wchar.h>
+ namespace test { using ::vfwscanf; }
int
main ()
{
-typedef __complex__ float _ComplexT; _ComplexT tmp;
- cpowf(tmp, tmp);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-ac_c99_complex=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <complex.h>
-int
-main ()
-{
-typedef __complex__ double _ComplexT; _ComplexT tmp;
- cpow(tmp, tmp);
;
return 0;
}
@@ -8566,180 +7343,26 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-ac_c99_complex=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <complex.h>
-int
-main ()
-{
-typedef __complex__ long double _ComplexT; _ComplexT tmp;
- cpowl(tmp, tmp);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_c99_complex=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- echo "$as_me:$LINENO: result: $ac_c99_complex" >&5
-echo "${ECHO_T}$ac_c99_complex" >&6
-
- if test x"$ac_c99_complex" = x"yes"; then
- cat >>confdefs.h <<\_ACEOF
-#define _GLIBCXX_USE_C99_COMPLEX 1
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_VFWSCANF 1
_ACEOF
- fi
-
- # Check for the existence in <stdio.h> of vscanf, et. al.
- ac_c99_stdio=yes;
- echo "$as_me:$LINENO: checking for ISO C99 support in <stdio.h>" >&5
-echo $ECHO_N "checking for ISO C99 support in <stdio.h>... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdio.h>
-int
-main ()
-{
-snprintf("12", 0, "%i");
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_c99_stdio=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdio.h>
- #include <stdarg.h>
- void foo(char* fmt, ...)
- {va_list args; va_start(args, fmt);
- vfscanf(stderr, "%i", args);}
-int
-main ()
-{
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_c99_stdio=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <stdio.h>
- #include <stdarg.h>
- void foo(char* fmt, ...)
- {va_list args; va_start(args, fmt);
- vscanf("%i", args);}
+#include <wchar.h>
+ namespace test { using ::vswscanf; }
int
main ()
{
@@ -8770,74 +7393,26 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-ac_c99_stdio=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_VSWSCANF 1
_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdio.h>
- #include <stdarg.h>
- void foo(char* fmt, ...)
- {va_list args; va_start(args, fmt);
- vsnprintf(fmt, 0, "%i", args);}
-int
-main ()
-{
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_c99_stdio=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
+
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <stdio.h>
- #include <stdarg.h>
- void foo(char* fmt, ...)
- {va_list args; va_start(args, fmt);
- vsscanf(fmt, "%i", args);}
+#include <wchar.h>
+ namespace test { using ::vwscanf; }
int
main ()
{
@@ -8868,224 +7443,30 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_c99_stdio=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $ac_c99_stdio" >&5
-echo "${ECHO_T}$ac_c99_stdio" >&6
- # Check for the existence in <stdlib.h> of lldiv_t, et. al.
- ac_c99_stdlib=yes;
- echo "$as_me:$LINENO: checking for lldiv_t declaration" >&5
-echo $ECHO_N "checking for lldiv_t declaration... $ECHO_C" >&6
- if test "${ac_c99_lldiv_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdlib.h>
-int
-main ()
-{
- lldiv_t mydivt;
- ;
- return 0;
-}
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_VWSCANF 1
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_c99_lldiv_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-ac_c99_lldiv_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-
- echo "$as_me:$LINENO: result: $ac_c99_lldiv_t" >&5
-echo "${ECHO_T}$ac_c99_lldiv_t" >&6
-
- echo "$as_me:$LINENO: checking for ISO C99 support in <stdlib.h>" >&5
-echo $ECHO_N "checking for ISO C99 support in <stdlib.h>... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdlib.h>
-int
-main ()
-{
-char* tmp; strtof("gnu", &tmp);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_c99_stdlib=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdlib.h>
-int
-main ()
-{
-char* tmp; strtold("gnu", &tmp);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-ac_c99_stdlib=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <stdlib.h>
+#include <wchar.h>
+ namespace test { using ::wcstof; }
int
main ()
{
-llabs(10);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-ac_c99_stdlib=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdlib.h>
-int
-main ()
-{
-lldiv(10,1);
;
return 0;
}
@@ -9112,126 +7493,29 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-ac_c99_stdlib=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdlib.h>
-int
-main ()
-{
-atoll("10");
- ;
- return 0;
-}
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_WCSTOF 1
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-ac_c99_stdlib=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdlib.h>
-int
-main ()
-{
-_Exit(0);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_c99_stdlib=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- if test x"$ac_c99_lldiv_t" = x"no"; then
- ac_c99_stdlib=no;
- fi;
- echo "$as_me:$LINENO: result: $ac_c99_stdlib" >&5
-echo "${ECHO_T}$ac_c99_stdlib" >&6
- # Check for the existence of <wchar.h> functions used if C99 is enabled.
- # XXX the wchar.h checks should be rolled into the general C99 bits.
- ac_c99_wchar=yes;
- echo "$as_me:$LINENO: checking for additional ISO C99 support in <wchar.h>" >&5
-echo $ECHO_N "checking for additional ISO C99 support in <wchar.h>... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <wchar.h>
+#include <wctype.h>
int
main ()
{
-wcstold(L"10.0", NULL);
+ wint_t t; int i = iswblank(t);
;
return 0;
}
@@ -9258,121 +7542,32 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-ac_c99_wchar=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <wchar.h>
-int
-main ()
-{
-wcstoll(L"10", NULL, 10);
- ;
- return 0;
-}
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISWBLANK 1
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-ac_c99_wchar=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <wchar.h>
-int
-main ()
-{
-wcstoull(L"10", NULL, 10);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_c99_wchar=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $ac_c99_wchar" >&5
+
+ echo "$as_me:$LINENO: checking for ISO C99 support in <wchar.h>" >&5
+echo $ECHO_N "checking for ISO C99 support in <wchar.h>... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $ac_c99_wchar" >&5
echo "${ECHO_T}$ac_c99_wchar" >&6
+ fi
- echo "$as_me:$LINENO: checking for enabled ISO C99 support" >&5
-echo $ECHO_N "checking for enabled ISO C99 support... $ECHO_C" >&6
+ # Option parsed, now set things appropriately.
if test x"$ac_c99_math" = x"no" ||
test x"$ac_c99_complex" = x"no" ||
test x"$ac_c99_stdio" = x"no" ||
test x"$ac_c99_stdlib" = x"no" ||
test x"$ac_c99_wchar" = x"no"; then
enable_c99=no;
- fi;
- echo "$as_me:$LINENO: result: $enable_c99" >&5
-echo "${ECHO_T}$enable_c99" >&6
-
- # Option parsed, now set things appropriately
- if test x"$enable_c99" = x"yes"; then
+ else
cat >>confdefs.h <<\_ACEOF
#define _GLIBCXX_USE_C99 1
_ACEOF
@@ -9385,6 +7580,12 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ fi
+
+ echo "$as_me:$LINENO: checking for fully enabled ISO C99 support" >&5
+echo $ECHO_N "checking for fully enabled ISO C99 support... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $enable_c99" >&5
+echo "${ECHO_T}$enable_c99" >&6
# Check whether --enable-long-long or --disable-long-long was given.
@@ -9408,31 +7609,37 @@ fi;
_ACEOF
fi
+ echo "$as_me:$LINENO: checking for enabled long long specializations" >&5
+echo $ECHO_N "checking for enabled long long specializations... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $enable_long_long" >&5
+echo "${ECHO_T}$enable_long_long" >&6
- echo "$as_me:$LINENO: checking for thread model used by GCC" >&5
-echo $ECHO_N "checking for thread model used by GCC... $ECHO_C" >&6
- target_thread_file=`$CXX -v 2>&1 | sed -n 's/^Thread model: //p'`
- echo "$as_me:$LINENO: result: $target_thread_file" >&5
-echo "${ECHO_T}$target_thread_file" >&6
+ # Check whether --enable-wchar_t or --disable-wchar_t was given.
+if test "${enable_wchar_t+set}" = set; then
+ enableval="$enable_wchar_t"
- if test $target_thread_file != single; then
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_GTHR_DEFAULT 1
-_ACEOF
+ case "$enableval" in
+ yes|no) ;;
+ *) { { echo "$as_me:$LINENO: error: Argument to enable/disable wchar_t must be yes or no" >&5
+echo "$as_me: error: Argument to enable/disable wchar_t must be yes or no" >&2;}
+ { (exit 1); exit 1; }; } ;;
+ esac
- fi
+else
+ enable_wchar_t=yes
+fi;
- glibcxx_thread_h=gthr-$target_thread_file.h
+ if test x"$ac_c99_wchar" = x"yes" && test x"$enable_wchar_t" = x"yes"; then
+ cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_USE_WCHAR_T 1
+_ACEOF
- gthread_file=${toplevel_srcdir}/gcc/${glibcxx_thread_h}
- if grep __GTHREADS $gthread_file >/dev/null 2>&1 ; then
- enable_thread=yes
- else
- enable_thread=no
fi
-
-
+ echo "$as_me:$LINENO: checking for enabled wchar_t specializations" >&5
+echo $ECHO_N "checking for enabled wchar_t specializations... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $enable_wchar_t" >&5
+echo "${ECHO_T}$enable_wchar_t" >&6
# Check whether --enable-concept-checks or --disable-concept-checks was given.
@@ -9564,6 +7771,31 @@ _ACEOF
# No surprises, no surprises...
+
+ echo "$as_me:$LINENO: checking for thread model used by GCC" >&5
+echo $ECHO_N "checking for thread model used by GCC... $ECHO_C" >&6
+ target_thread_file=`$CXX -v 2>&1 | sed -n 's/^Thread model: //p'`
+ echo "$as_me:$LINENO: result: $target_thread_file" >&5
+echo "${ECHO_T}$target_thread_file" >&6
+
+ if test $target_thread_file != single; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_GTHR_DEFAULT 1
+_ACEOF
+
+ fi
+
+ glibcxx_thread_h=gthr-$target_thread_file.h
+
+ gthread_file=${toplevel_srcdir}/gcc/${glibcxx_thread_h}
+ if grep __GTHREADS $gthread_file >/dev/null 2>&1 ; then
+ enable_thread=yes
+ else
+ enable_thread=no
+ fi
+
+
+
if test $atomicity_dir = cpu/generic ; then
{ echo "$as_me:$LINENO: WARNING: No native atomic operations are provided for this platform." >&5
echo "$as_me: WARNING: No native atomic operations are provided for this platform." >&2;}
@@ -29438,886 +27670,10 @@ done
- # Test wchar.h for mbstate_t, which is needed for char_traits and
- # others even if wchar_t support is not on.
- echo "$as_me:$LINENO: checking for mbstate_t" >&5
-echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <wchar.h>
-int
-main ()
-{
-mbstate_t teststate;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- have_mbstate_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-have_mbstate_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $have_mbstate_t" >&5
-echo "${ECHO_T}$have_mbstate_t" >&6
- if test x"$have_mbstate_t" = xyes; then
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_MBSTATE_T 1
-_ACEOF
-
- fi
-
- # Sanity check for existence of ISO C99 headers for extended encoding.
-
-for ac_header in wchar.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ----------------------------------------- ##
-## Report this to the package-unused lists. ##
-## ----------------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
- ac_has_wchar_h=yes
-else
- ac_has_wchar_h=no
-fi
-
-done
-
-
-for ac_header in wctype.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ----------------------------------------- ##
-## Report this to the package-unused lists. ##
-## ----------------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
- ac_has_wctype_h=yes
-else
- ac_has_wctype_h=no
-fi
-
-done
-
+ enable_iconv=no
# Only continue checking if the ISO C99 headers exist and support is on.
- if test x"$ac_has_wchar_h" = xyes &&
- test x"$ac_has_wctype_h" = xyes &&
- test x"$enable_c_mbchar" != xno; then
-
- # Test wchar.h for WCHAR_MIN, WCHAR_MAX, which is needed before
- # numeric_limits can instantiate type_traits<wchar_t>
- echo "$as_me:$LINENO: checking for WCHAR_MIN and WCHAR_MAX" >&5
-echo $ECHO_N "checking for WCHAR_MIN and WCHAR_MAX... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <wchar.h>
-int
-main ()
-{
-int i = WCHAR_MIN; int j = WCHAR_MAX;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- has_wchar_minmax=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-has_wchar_minmax=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $has_wchar_minmax" >&5
-echo "${ECHO_T}$has_wchar_minmax" >&6
-
- # Test wchar.h for WEOF, which is what we use to determine whether
- # to specialize for char_traits<wchar_t> or not.
- echo "$as_me:$LINENO: checking for WEOF" >&5
-echo $ECHO_N "checking for WEOF... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
- #include <wchar.h>
- #include <stddef.h>
-int
-main ()
-{
-wint_t i = WEOF;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- has_weof=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-has_weof=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $has_weof" >&5
-echo "${ECHO_T}$has_weof" >&6
-
- # Tests for wide character functions used in char_traits<wchar_t>.
- ac_wfuncs=yes
-
-
-
-
-
-
-for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
- ac_wfuncs=no
-fi
-done
-
-
- # Checks for names injected into std:: by the c_std headers.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-for ac_func in btowc wctob fgetwc fgetws fputwc fputws fwide \
- fwprintf fwscanf swprintf swscanf vfwprintf vswprintf \
- vwprintf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
- mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstol \
- wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
- wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
- ac_wfuncs=no
-fi
-done
-
-
- # Checks for wide character functions that are not required
- # for basic wchar_t support. Don't disable support if they are missing.
- # Injection of these is wrapped with guard macros.
-
-
-
-
-
-for ac_func in vfwscanf vswscanf vwscanf wcstof iswblank
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
- echo "$as_me:$LINENO: checking for ISO C99 wchar_t support" >&5
-echo $ECHO_N "checking for ISO C99 wchar_t support... $ECHO_C" >&6
- if test x"$has_weof" = xyes &&
- test x"$has_wchar_minmax" = xyes &&
- test x"$ac_wfuncs" = xyes;
- then
- ac_isoC99_wchar_t=yes
- else
- ac_isoC99_wchar_t=no
- fi
- echo "$as_me:$LINENO: result: $ac_isoC99_wchar_t" >&5
-echo "${ECHO_T}$ac_isoC99_wchar_t" >&6
+ if test x"$enable_wchar_t" = xyes; then
# Use iconv for wchar_t to char conversions. As such, check for
# X/Open Portability Guide, version 2 features (XPG2).
@@ -30803,35 +28159,22 @@ done
LIBS="$ac_save_LIBS"
- echo "$as_me:$LINENO: checking for XPG2 wchar_t support" >&5
-echo $ECHO_N "checking for XPG2 wchar_t support... $ECHO_C" >&6
if test x"$ac_has_iconv_h" = xyes &&
test x"$ac_has_langinfo_h" = xyes &&
test x"$ac_XPG2funcs" = xyes;
then
- ac_XPG2_wchar_t=yes
- else
- ac_XPG2_wchar_t=no
- fi
- echo "$as_me:$LINENO: result: $ac_XPG2_wchar_t" >&5
-echo "${ECHO_T}$ac_XPG2_wchar_t" >&6
- # At the moment, only enable wchar_t specializations if all the
- # above support is present.
- if test x"$ac_isoC99_wchar_t" = xyes &&
- test x"$ac_XPG2_wchar_t" = xyes;
- then
- cat >>confdefs.h <<\_ACEOF
-#define _GLIBCXX_USE_WCHAR_T 1
+cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_USE_ICONV 1
_ACEOF
- enable_wchar_t=yes
+ enable_iconv=yes
fi
fi
- echo "$as_me:$LINENO: checking for enabled wchar_t specializations" >&5
-echo $ECHO_N "checking for enabled wchar_t specializations... $ECHO_C" >&6
- echo "$as_me:$LINENO: result: $enable_wchar_t" >&5
-echo "${ECHO_T}$enable_wchar_t" >&6
+ echo "$as_me:$LINENO: checking for enabled iconv specializations" >&5
+echo $ECHO_N "checking for enabled iconv specializations... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $enable_iconv" >&5
+echo "${ECHO_T}$enable_iconv" >&6
ac_test_CXXFLAGS="${CXXFLAGS+set}"
@@ -52547,886 +49890,10 @@ done
- # Test wchar.h for mbstate_t, which is needed for char_traits and
- # others even if wchar_t support is not on.
- echo "$as_me:$LINENO: checking for mbstate_t" >&5
-echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <wchar.h>
-int
-main ()
-{
-mbstate_t teststate;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- have_mbstate_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-have_mbstate_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $have_mbstate_t" >&5
-echo "${ECHO_T}$have_mbstate_t" >&6
- if test x"$have_mbstate_t" = xyes; then
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_MBSTATE_T 1
-_ACEOF
-
- fi
-
- # Sanity check for existence of ISO C99 headers for extended encoding.
-
-for ac_header in wchar.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ----------------------------------------- ##
-## Report this to the package-unused lists. ##
-## ----------------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
- ac_has_wchar_h=yes
-else
- ac_has_wchar_h=no
-fi
-
-done
-
-
-for ac_header in wctype.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ----------------------------------------- ##
-## Report this to the package-unused lists. ##
-## ----------------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
- ac_has_wctype_h=yes
-else
- ac_has_wctype_h=no
-fi
-
-done
-
+ enable_iconv=no
# Only continue checking if the ISO C99 headers exist and support is on.
- if test x"$ac_has_wchar_h" = xyes &&
- test x"$ac_has_wctype_h" = xyes &&
- test x"$enable_c_mbchar" != xno; then
-
- # Test wchar.h for WCHAR_MIN, WCHAR_MAX, which is needed before
- # numeric_limits can instantiate type_traits<wchar_t>
- echo "$as_me:$LINENO: checking for WCHAR_MIN and WCHAR_MAX" >&5
-echo $ECHO_N "checking for WCHAR_MIN and WCHAR_MAX... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <wchar.h>
-int
-main ()
-{
-int i = WCHAR_MIN; int j = WCHAR_MAX;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- has_wchar_minmax=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-has_wchar_minmax=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $has_wchar_minmax" >&5
-echo "${ECHO_T}$has_wchar_minmax" >&6
-
- # Test wchar.h for WEOF, which is what we use to determine whether
- # to specialize for char_traits<wchar_t> or not.
- echo "$as_me:$LINENO: checking for WEOF" >&5
-echo $ECHO_N "checking for WEOF... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
- #include <wchar.h>
- #include <stddef.h>
-int
-main ()
-{
-wint_t i = WEOF;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- has_weof=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-has_weof=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $has_weof" >&5
-echo "${ECHO_T}$has_weof" >&6
-
- # Tests for wide character functions used in char_traits<wchar_t>.
- ac_wfuncs=yes
-
-
-
-
-
-
-for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
- ac_wfuncs=no
-fi
-done
-
-
- # Checks for names injected into std:: by the c_std headers.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-for ac_func in btowc wctob fgetwc fgetws fputwc fputws fwide \
- fwprintf fwscanf swprintf swscanf vfwprintf vswprintf \
- vwprintf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
- mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstol \
- wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
- wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
- ac_wfuncs=no
-fi
-done
-
-
- # Checks for wide character functions that are not required
- # for basic wchar_t support. Don't disable support if they are missing.
- # Injection of these is wrapped with guard macros.
-
-
-
-
-
-for ac_func in vfwscanf vswscanf vwscanf wcstof iswblank
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
- echo "$as_me:$LINENO: checking for ISO C99 wchar_t support" >&5
-echo $ECHO_N "checking for ISO C99 wchar_t support... $ECHO_C" >&6
- if test x"$has_weof" = xyes &&
- test x"$has_wchar_minmax" = xyes &&
- test x"$ac_wfuncs" = xyes;
- then
- ac_isoC99_wchar_t=yes
- else
- ac_isoC99_wchar_t=no
- fi
- echo "$as_me:$LINENO: result: $ac_isoC99_wchar_t" >&5
-echo "${ECHO_T}$ac_isoC99_wchar_t" >&6
+ if test x"$enable_wchar_t" = xyes; then
# Use iconv for wchar_t to char conversions. As such, check for
# X/Open Portability Guide, version 2 features (XPG2).
@@ -53912,35 +50379,22 @@ done
LIBS="$ac_save_LIBS"
- echo "$as_me:$LINENO: checking for XPG2 wchar_t support" >&5
-echo $ECHO_N "checking for XPG2 wchar_t support... $ECHO_C" >&6
if test x"$ac_has_iconv_h" = xyes &&
test x"$ac_has_langinfo_h" = xyes &&
test x"$ac_XPG2funcs" = xyes;
then
- ac_XPG2_wchar_t=yes
- else
- ac_XPG2_wchar_t=no
- fi
- echo "$as_me:$LINENO: result: $ac_XPG2_wchar_t" >&5
-echo "${ECHO_T}$ac_XPG2_wchar_t" >&6
- # At the moment, only enable wchar_t specializations if all the
- # above support is present.
- if test x"$ac_isoC99_wchar_t" = xyes &&
- test x"$ac_XPG2_wchar_t" = xyes;
- then
- cat >>confdefs.h <<\_ACEOF
-#define _GLIBCXX_USE_WCHAR_T 1
+cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_USE_ICONV 1
_ACEOF
- enable_wchar_t=yes
+ enable_iconv=yes
fi
fi
- echo "$as_me:$LINENO: checking for enabled wchar_t specializations" >&5
-echo $ECHO_N "checking for enabled wchar_t specializations... $ECHO_C" >&6
- echo "$as_me:$LINENO: result: $enable_wchar_t" >&5
-echo "${ECHO_T}$enable_wchar_t" >&6
+ echo "$as_me:$LINENO: checking for enabled iconv specializations" >&5
+echo $ECHO_N "checking for enabled iconv specializations... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $enable_iconv" >&5
+echo "${ECHO_T}$enable_iconv" >&6
ac_test_CXXFLAGS="${CXXFLAGS+set}"
@@ -74810,886 +71264,10 @@ done
- # Test wchar.h for mbstate_t, which is needed for char_traits and
- # others even if wchar_t support is not on.
- echo "$as_me:$LINENO: checking for mbstate_t" >&5
-echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <wchar.h>
-int
-main ()
-{
-mbstate_t teststate;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- have_mbstate_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-have_mbstate_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $have_mbstate_t" >&5
-echo "${ECHO_T}$have_mbstate_t" >&6
- if test x"$have_mbstate_t" = xyes; then
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_MBSTATE_T 1
-_ACEOF
-
- fi
-
- # Sanity check for existence of ISO C99 headers for extended encoding.
-
-for ac_header in wchar.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ----------------------------------------- ##
-## Report this to the package-unused lists. ##
-## ----------------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
- ac_has_wchar_h=yes
-else
- ac_has_wchar_h=no
-fi
-
-done
-
-
-for ac_header in wctype.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ----------------------------------------- ##
-## Report this to the package-unused lists. ##
-## ----------------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
- ac_has_wctype_h=yes
-else
- ac_has_wctype_h=no
-fi
-
-done
-
+ enable_iconv=no
# Only continue checking if the ISO C99 headers exist and support is on.
- if test x"$ac_has_wchar_h" = xyes &&
- test x"$ac_has_wctype_h" = xyes &&
- test x"$enable_c_mbchar" != xno; then
-
- # Test wchar.h for WCHAR_MIN, WCHAR_MAX, which is needed before
- # numeric_limits can instantiate type_traits<wchar_t>
- echo "$as_me:$LINENO: checking for WCHAR_MIN and WCHAR_MAX" >&5
-echo $ECHO_N "checking for WCHAR_MIN and WCHAR_MAX... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <wchar.h>
-int
-main ()
-{
-int i = WCHAR_MIN; int j = WCHAR_MAX;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- has_wchar_minmax=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-has_wchar_minmax=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $has_wchar_minmax" >&5
-echo "${ECHO_T}$has_wchar_minmax" >&6
-
- # Test wchar.h for WEOF, which is what we use to determine whether
- # to specialize for char_traits<wchar_t> or not.
- echo "$as_me:$LINENO: checking for WEOF" >&5
-echo $ECHO_N "checking for WEOF... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
- #include <wchar.h>
- #include <stddef.h>
-int
-main ()
-{
-wint_t i = WEOF;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- has_weof=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-has_weof=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $has_weof" >&5
-echo "${ECHO_T}$has_weof" >&6
-
- # Tests for wide character functions used in char_traits<wchar_t>.
- ac_wfuncs=yes
-
-
-
-
-
-
-for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
- ac_wfuncs=no
-fi
-done
-
-
- # Checks for names injected into std:: by the c_std headers.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-for ac_func in btowc wctob fgetwc fgetws fputwc fputws fwide \
- fwprintf fwscanf swprintf swscanf vfwprintf vswprintf \
- vwprintf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
- mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstol \
- wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
- wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
- ac_wfuncs=no
-fi
-done
-
-
- # Checks for wide character functions that are not required
- # for basic wchar_t support. Don't disable support if they are missing.
- # Injection of these is wrapped with guard macros.
-
-
-
-
-
-for ac_func in vfwscanf vswscanf vwscanf wcstof iswblank
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
- echo "$as_me:$LINENO: checking for ISO C99 wchar_t support" >&5
-echo $ECHO_N "checking for ISO C99 wchar_t support... $ECHO_C" >&6
- if test x"$has_weof" = xyes &&
- test x"$has_wchar_minmax" = xyes &&
- test x"$ac_wfuncs" = xyes;
- then
- ac_isoC99_wchar_t=yes
- else
- ac_isoC99_wchar_t=no
- fi
- echo "$as_me:$LINENO: result: $ac_isoC99_wchar_t" >&5
-echo "${ECHO_T}$ac_isoC99_wchar_t" >&6
+ if test x"$enable_wchar_t" = xyes; then
# Use iconv for wchar_t to char conversions. As such, check for
# X/Open Portability Guide, version 2 features (XPG2).
@@ -76175,35 +71753,22 @@ done
LIBS="$ac_save_LIBS"
- echo "$as_me:$LINENO: checking for XPG2 wchar_t support" >&5
-echo $ECHO_N "checking for XPG2 wchar_t support... $ECHO_C" >&6
if test x"$ac_has_iconv_h" = xyes &&
test x"$ac_has_langinfo_h" = xyes &&
test x"$ac_XPG2funcs" = xyes;
then
- ac_XPG2_wchar_t=yes
- else
- ac_XPG2_wchar_t=no
- fi
- echo "$as_me:$LINENO: result: $ac_XPG2_wchar_t" >&5
-echo "${ECHO_T}$ac_XPG2_wchar_t" >&6
- # At the moment, only enable wchar_t specializations if all the
- # above support is present.
- if test x"$ac_isoC99_wchar_t" = xyes &&
- test x"$ac_XPG2_wchar_t" = xyes;
- then
- cat >>confdefs.h <<\_ACEOF
-#define _GLIBCXX_USE_WCHAR_T 1
+cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_USE_ICONV 1
_ACEOF
- enable_wchar_t=yes
+ enable_iconv=yes
fi
fi
- echo "$as_me:$LINENO: checking for enabled wchar_t specializations" >&5
-echo $ECHO_N "checking for enabled wchar_t specializations... $ECHO_C" >&6
- echo "$as_me:$LINENO: result: $enable_wchar_t" >&5
-echo "${ECHO_T}$enable_wchar_t" >&6
+ echo "$as_me:$LINENO: checking for enabled iconv specializations" >&5
+echo $ECHO_N "checking for enabled iconv specializations... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $enable_iconv" >&5
+echo "${ECHO_T}$enable_iconv" >&6
ac_test_CXXFLAGS="${CXXFLAGS+set}"
@@ -77525,886 +73090,10 @@ done
- # Test wchar.h for mbstate_t, which is needed for char_traits and
- # others even if wchar_t support is not on.
- echo "$as_me:$LINENO: checking for mbstate_t" >&5
-echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <wchar.h>
-int
-main ()
-{
-mbstate_t teststate;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- have_mbstate_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-have_mbstate_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $have_mbstate_t" >&5
-echo "${ECHO_T}$have_mbstate_t" >&6
- if test x"$have_mbstate_t" = xyes; then
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_MBSTATE_T 1
-_ACEOF
-
- fi
-
- # Sanity check for existence of ISO C99 headers for extended encoding.
-
-for ac_header in wchar.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ----------------------------------------- ##
-## Report this to the package-unused lists. ##
-## ----------------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
- ac_has_wchar_h=yes
-else
- ac_has_wchar_h=no
-fi
-
-done
-
-
-for ac_header in wctype.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ----------------------------------------- ##
-## Report this to the package-unused lists. ##
-## ----------------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
- ac_has_wctype_h=yes
-else
- ac_has_wctype_h=no
-fi
-
-done
-
+ enable_iconv=no
# Only continue checking if the ISO C99 headers exist and support is on.
- if test x"$ac_has_wchar_h" = xyes &&
- test x"$ac_has_wctype_h" = xyes &&
- test x"$enable_c_mbchar" != xno; then
-
- # Test wchar.h for WCHAR_MIN, WCHAR_MAX, which is needed before
- # numeric_limits can instantiate type_traits<wchar_t>
- echo "$as_me:$LINENO: checking for WCHAR_MIN and WCHAR_MAX" >&5
-echo $ECHO_N "checking for WCHAR_MIN and WCHAR_MAX... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <wchar.h>
-int
-main ()
-{
-int i = WCHAR_MIN; int j = WCHAR_MAX;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- has_wchar_minmax=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-has_wchar_minmax=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $has_wchar_minmax" >&5
-echo "${ECHO_T}$has_wchar_minmax" >&6
-
- # Test wchar.h for WEOF, which is what we use to determine whether
- # to specialize for char_traits<wchar_t> or not.
- echo "$as_me:$LINENO: checking for WEOF" >&5
-echo $ECHO_N "checking for WEOF... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
- #include <wchar.h>
- #include <stddef.h>
-int
-main ()
-{
-wint_t i = WEOF;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- has_weof=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-has_weof=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $has_weof" >&5
-echo "${ECHO_T}$has_weof" >&6
-
- # Tests for wide character functions used in char_traits<wchar_t>.
- ac_wfuncs=yes
-
-
-
-
-
-
-for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
- ac_wfuncs=no
-fi
-done
-
-
- # Checks for names injected into std:: by the c_std headers.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-for ac_func in btowc wctob fgetwc fgetws fputwc fputws fwide \
- fwprintf fwscanf swprintf swscanf vfwprintf vswprintf \
- vwprintf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
- mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstol \
- wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
- wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
- ac_wfuncs=no
-fi
-done
-
-
- # Checks for wide character functions that are not required
- # for basic wchar_t support. Don't disable support if they are missing.
- # Injection of these is wrapped with guard macros.
-
-
-
-
-
-for ac_func in vfwscanf vswscanf vwscanf wcstof iswblank
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
- echo "$as_me:$LINENO: checking for ISO C99 wchar_t support" >&5
-echo $ECHO_N "checking for ISO C99 wchar_t support... $ECHO_C" >&6
- if test x"$has_weof" = xyes &&
- test x"$has_wchar_minmax" = xyes &&
- test x"$ac_wfuncs" = xyes;
- then
- ac_isoC99_wchar_t=yes
- else
- ac_isoC99_wchar_t=no
- fi
- echo "$as_me:$LINENO: result: $ac_isoC99_wchar_t" >&5
-echo "${ECHO_T}$ac_isoC99_wchar_t" >&6
+ if test x"$enable_wchar_t" = xyes; then
# Use iconv for wchar_t to char conversions. As such, check for
# X/Open Portability Guide, version 2 features (XPG2).
@@ -78890,35 +73579,22 @@ done
LIBS="$ac_save_LIBS"
- echo "$as_me:$LINENO: checking for XPG2 wchar_t support" >&5
-echo $ECHO_N "checking for XPG2 wchar_t support... $ECHO_C" >&6
if test x"$ac_has_iconv_h" = xyes &&
test x"$ac_has_langinfo_h" = xyes &&
test x"$ac_XPG2funcs" = xyes;
then
- ac_XPG2_wchar_t=yes
- else
- ac_XPG2_wchar_t=no
- fi
- echo "$as_me:$LINENO: result: $ac_XPG2_wchar_t" >&5
-echo "${ECHO_T}$ac_XPG2_wchar_t" >&6
- # At the moment, only enable wchar_t specializations if all the
- # above support is present.
- if test x"$ac_isoC99_wchar_t" = xyes &&
- test x"$ac_XPG2_wchar_t" = xyes;
- then
- cat >>confdefs.h <<\_ACEOF
-#define _GLIBCXX_USE_WCHAR_T 1
+cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_USE_ICONV 1
_ACEOF
- enable_wchar_t=yes
+ enable_iconv=yes
fi
fi
- echo "$as_me:$LINENO: checking for enabled wchar_t specializations" >&5
-echo $ECHO_N "checking for enabled wchar_t specializations... $ECHO_C" >&6
- echo "$as_me:$LINENO: result: $enable_wchar_t" >&5
-echo "${ECHO_T}$enable_wchar_t" >&6
+ echo "$as_me:$LINENO: checking for enabled iconv specializations" >&5
+echo $ECHO_N "checking for enabled iconv specializations... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $enable_iconv" >&5
+echo "${ECHO_T}$enable_iconv" >&6
cat >>confdefs.h <<\_ACEOF
#define HAVE_LC_MESSAGES 1
@@ -79894,886 +74570,10 @@ done
- # Test wchar.h for mbstate_t, which is needed for char_traits and
- # others even if wchar_t support is not on.
- echo "$as_me:$LINENO: checking for mbstate_t" >&5
-echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <wchar.h>
-int
-main ()
-{
-mbstate_t teststate;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- have_mbstate_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-have_mbstate_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $have_mbstate_t" >&5
-echo "${ECHO_T}$have_mbstate_t" >&6
- if test x"$have_mbstate_t" = xyes; then
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_MBSTATE_T 1
-_ACEOF
-
- fi
-
- # Sanity check for existence of ISO C99 headers for extended encoding.
-
-for ac_header in wchar.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ----------------------------------------- ##
-## Report this to the package-unused lists. ##
-## ----------------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
- ac_has_wchar_h=yes
-else
- ac_has_wchar_h=no
-fi
-
-done
-
-
-for ac_header in wctype.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ----------------------------------------- ##
-## Report this to the package-unused lists. ##
-## ----------------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
- ac_has_wctype_h=yes
-else
- ac_has_wctype_h=no
-fi
-
-done
-
+ enable_iconv=no
# Only continue checking if the ISO C99 headers exist and support is on.
- if test x"$ac_has_wchar_h" = xyes &&
- test x"$ac_has_wctype_h" = xyes &&
- test x"$enable_c_mbchar" != xno; then
-
- # Test wchar.h for WCHAR_MIN, WCHAR_MAX, which is needed before
- # numeric_limits can instantiate type_traits<wchar_t>
- echo "$as_me:$LINENO: checking for WCHAR_MIN and WCHAR_MAX" >&5
-echo $ECHO_N "checking for WCHAR_MIN and WCHAR_MAX... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <wchar.h>
-int
-main ()
-{
-int i = WCHAR_MIN; int j = WCHAR_MAX;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- has_wchar_minmax=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-has_wchar_minmax=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $has_wchar_minmax" >&5
-echo "${ECHO_T}$has_wchar_minmax" >&6
-
- # Test wchar.h for WEOF, which is what we use to determine whether
- # to specialize for char_traits<wchar_t> or not.
- echo "$as_me:$LINENO: checking for WEOF" >&5
-echo $ECHO_N "checking for WEOF... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
- #include <wchar.h>
- #include <stddef.h>
-int
-main ()
-{
-wint_t i = WEOF;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- has_weof=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-has_weof=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $has_weof" >&5
-echo "${ECHO_T}$has_weof" >&6
-
- # Tests for wide character functions used in char_traits<wchar_t>.
- ac_wfuncs=yes
-
-
-
-
-
-
-for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
- ac_wfuncs=no
-fi
-done
-
-
- # Checks for names injected into std:: by the c_std headers.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-for ac_func in btowc wctob fgetwc fgetws fputwc fputws fwide \
- fwprintf fwscanf swprintf swscanf vfwprintf vswprintf \
- vwprintf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
- mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstol \
- wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
- wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
- ac_wfuncs=no
-fi
-done
-
-
- # Checks for wide character functions that are not required
- # for basic wchar_t support. Don't disable support if they are missing.
- # Injection of these is wrapped with guard macros.
-
-
-
-
-
-for ac_func in vfwscanf vswscanf vwscanf wcstof iswblank
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
- echo "$as_me:$LINENO: checking for ISO C99 wchar_t support" >&5
-echo $ECHO_N "checking for ISO C99 wchar_t support... $ECHO_C" >&6
- if test x"$has_weof" = xyes &&
- test x"$has_wchar_minmax" = xyes &&
- test x"$ac_wfuncs" = xyes;
- then
- ac_isoC99_wchar_t=yes
- else
- ac_isoC99_wchar_t=no
- fi
- echo "$as_me:$LINENO: result: $ac_isoC99_wchar_t" >&5
-echo "${ECHO_T}$ac_isoC99_wchar_t" >&6
+ if test x"$enable_wchar_t" = xyes; then
# Use iconv for wchar_t to char conversions. As such, check for
# X/Open Portability Guide, version 2 features (XPG2).
@@ -81259,35 +75059,22 @@ done
LIBS="$ac_save_LIBS"
- echo "$as_me:$LINENO: checking for XPG2 wchar_t support" >&5
-echo $ECHO_N "checking for XPG2 wchar_t support... $ECHO_C" >&6
if test x"$ac_has_iconv_h" = xyes &&
test x"$ac_has_langinfo_h" = xyes &&
test x"$ac_XPG2funcs" = xyes;
then
- ac_XPG2_wchar_t=yes
- else
- ac_XPG2_wchar_t=no
- fi
- echo "$as_me:$LINENO: result: $ac_XPG2_wchar_t" >&5
-echo "${ECHO_T}$ac_XPG2_wchar_t" >&6
- # At the moment, only enable wchar_t specializations if all the
- # above support is present.
- if test x"$ac_isoC99_wchar_t" = xyes &&
- test x"$ac_XPG2_wchar_t" = xyes;
- then
- cat >>confdefs.h <<\_ACEOF
-#define _GLIBCXX_USE_WCHAR_T 1
+cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_USE_ICONV 1
_ACEOF
- enable_wchar_t=yes
+ enable_iconv=yes
fi
fi
- echo "$as_me:$LINENO: checking for enabled wchar_t specializations" >&5
-echo $ECHO_N "checking for enabled wchar_t specializations... $ECHO_C" >&6
- echo "$as_me:$LINENO: result: $enable_wchar_t" >&5
-echo "${ECHO_T}$enable_wchar_t" >&6
+ echo "$as_me:$LINENO: checking for enabled iconv specializations" >&5
+echo $ECHO_N "checking for enabled iconv specializations... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $enable_iconv" >&5
+echo "${ECHO_T}$enable_iconv" >&6
cat >>confdefs.h <<\_ACEOF
#define HAVE_COPYSIGN 1
@@ -82139,886 +75926,10 @@ done
- # Test wchar.h for mbstate_t, which is needed for char_traits and
- # others even if wchar_t support is not on.
- echo "$as_me:$LINENO: checking for mbstate_t" >&5
-echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <wchar.h>
-int
-main ()
-{
-mbstate_t teststate;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- have_mbstate_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-have_mbstate_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $have_mbstate_t" >&5
-echo "${ECHO_T}$have_mbstate_t" >&6
- if test x"$have_mbstate_t" = xyes; then
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_MBSTATE_T 1
-_ACEOF
-
- fi
-
- # Sanity check for existence of ISO C99 headers for extended encoding.
-
-for ac_header in wchar.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ----------------------------------------- ##
-## Report this to the package-unused lists. ##
-## ----------------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
- ac_has_wchar_h=yes
-else
- ac_has_wchar_h=no
-fi
-
-done
-
-
-for ac_header in wctype.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ----------------------------------------- ##
-## Report this to the package-unused lists. ##
-## ----------------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
- ac_has_wctype_h=yes
-else
- ac_has_wctype_h=no
-fi
-
-done
-
+ enable_iconv=no
# Only continue checking if the ISO C99 headers exist and support is on.
- if test x"$ac_has_wchar_h" = xyes &&
- test x"$ac_has_wctype_h" = xyes &&
- test x"$enable_c_mbchar" != xno; then
-
- # Test wchar.h for WCHAR_MIN, WCHAR_MAX, which is needed before
- # numeric_limits can instantiate type_traits<wchar_t>
- echo "$as_me:$LINENO: checking for WCHAR_MIN and WCHAR_MAX" >&5
-echo $ECHO_N "checking for WCHAR_MIN and WCHAR_MAX... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <wchar.h>
-int
-main ()
-{
-int i = WCHAR_MIN; int j = WCHAR_MAX;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- has_wchar_minmax=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-has_wchar_minmax=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $has_wchar_minmax" >&5
-echo "${ECHO_T}$has_wchar_minmax" >&6
-
- # Test wchar.h for WEOF, which is what we use to determine whether
- # to specialize for char_traits<wchar_t> or not.
- echo "$as_me:$LINENO: checking for WEOF" >&5
-echo $ECHO_N "checking for WEOF... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
- #include <wchar.h>
- #include <stddef.h>
-int
-main ()
-{
-wint_t i = WEOF;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- has_weof=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-has_weof=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $has_weof" >&5
-echo "${ECHO_T}$has_weof" >&6
-
- # Tests for wide character functions used in char_traits<wchar_t>.
- ac_wfuncs=yes
-
-
-
-
-
-
-for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
- ac_wfuncs=no
-fi
-done
-
-
- # Checks for names injected into std:: by the c_std headers.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-for ac_func in btowc wctob fgetwc fgetws fputwc fputws fwide \
- fwprintf fwscanf swprintf swscanf vfwprintf vswprintf \
- vwprintf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
- mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstol \
- wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
- wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
- ac_wfuncs=no
-fi
-done
-
-
- # Checks for wide character functions that are not required
- # for basic wchar_t support. Don't disable support if they are missing.
- # Injection of these is wrapped with guard macros.
-
-
-
-
-
-for ac_func in vfwscanf vswscanf vwscanf wcstof iswblank
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
- echo "$as_me:$LINENO: checking for ISO C99 wchar_t support" >&5
-echo $ECHO_N "checking for ISO C99 wchar_t support... $ECHO_C" >&6
- if test x"$has_weof" = xyes &&
- test x"$has_wchar_minmax" = xyes &&
- test x"$ac_wfuncs" = xyes;
- then
- ac_isoC99_wchar_t=yes
- else
- ac_isoC99_wchar_t=no
- fi
- echo "$as_me:$LINENO: result: $ac_isoC99_wchar_t" >&5
-echo "${ECHO_T}$ac_isoC99_wchar_t" >&6
+ if test x"$enable_wchar_t" = xyes; then
# Use iconv for wchar_t to char conversions. As such, check for
# X/Open Portability Guide, version 2 features (XPG2).
@@ -83504,35 +76415,22 @@ done
LIBS="$ac_save_LIBS"
- echo "$as_me:$LINENO: checking for XPG2 wchar_t support" >&5
-echo $ECHO_N "checking for XPG2 wchar_t support... $ECHO_C" >&6
if test x"$ac_has_iconv_h" = xyes &&
test x"$ac_has_langinfo_h" = xyes &&
test x"$ac_XPG2funcs" = xyes;
then
- ac_XPG2_wchar_t=yes
- else
- ac_XPG2_wchar_t=no
- fi
- echo "$as_me:$LINENO: result: $ac_XPG2_wchar_t" >&5
-echo "${ECHO_T}$ac_XPG2_wchar_t" >&6
- # At the moment, only enable wchar_t specializations if all the
- # above support is present.
- if test x"$ac_isoC99_wchar_t" = xyes &&
- test x"$ac_XPG2_wchar_t" = xyes;
- then
- cat >>confdefs.h <<\_ACEOF
-#define _GLIBCXX_USE_WCHAR_T 1
+cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_USE_ICONV 1
_ACEOF
- enable_wchar_t=yes
+ enable_iconv=yes
fi
fi
- echo "$as_me:$LINENO: checking for enabled wchar_t specializations" >&5
-echo $ECHO_N "checking for enabled wchar_t specializations... $ECHO_C" >&6
- echo "$as_me:$LINENO: result: $enable_wchar_t" >&5
-echo "${ECHO_T}$enable_wchar_t" >&6
+ echo "$as_me:$LINENO: checking for enabled iconv specializations" >&5
+echo $ECHO_N "checking for enabled iconv specializations... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $enable_iconv" >&5
+echo "${ECHO_T}$enable_iconv" >&6
# For LFS.
@@ -85152,886 +78050,10 @@ done
- # Test wchar.h for mbstate_t, which is needed for char_traits and
- # others even if wchar_t support is not on.
- echo "$as_me:$LINENO: checking for mbstate_t" >&5
-echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <wchar.h>
-int
-main ()
-{
-mbstate_t teststate;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- have_mbstate_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-have_mbstate_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $have_mbstate_t" >&5
-echo "${ECHO_T}$have_mbstate_t" >&6
- if test x"$have_mbstate_t" = xyes; then
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_MBSTATE_T 1
-_ACEOF
-
- fi
-
- # Sanity check for existence of ISO C99 headers for extended encoding.
-
-for ac_header in wchar.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ----------------------------------------- ##
-## Report this to the package-unused lists. ##
-## ----------------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
- ac_has_wchar_h=yes
-else
- ac_has_wchar_h=no
-fi
-
-done
-
-
-for ac_header in wctype.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ----------------------------------------- ##
-## Report this to the package-unused lists. ##
-## ----------------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
- ac_has_wctype_h=yes
-else
- ac_has_wctype_h=no
-fi
-
-done
-
+ enable_iconv=no
# Only continue checking if the ISO C99 headers exist and support is on.
- if test x"$ac_has_wchar_h" = xyes &&
- test x"$ac_has_wctype_h" = xyes &&
- test x"$enable_c_mbchar" != xno; then
-
- # Test wchar.h for WCHAR_MIN, WCHAR_MAX, which is needed before
- # numeric_limits can instantiate type_traits<wchar_t>
- echo "$as_me:$LINENO: checking for WCHAR_MIN and WCHAR_MAX" >&5
-echo $ECHO_N "checking for WCHAR_MIN and WCHAR_MAX... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <wchar.h>
-int
-main ()
-{
-int i = WCHAR_MIN; int j = WCHAR_MAX;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- has_wchar_minmax=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-has_wchar_minmax=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $has_wchar_minmax" >&5
-echo "${ECHO_T}$has_wchar_minmax" >&6
-
- # Test wchar.h for WEOF, which is what we use to determine whether
- # to specialize for char_traits<wchar_t> or not.
- echo "$as_me:$LINENO: checking for WEOF" >&5
-echo $ECHO_N "checking for WEOF... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
- #include <wchar.h>
- #include <stddef.h>
-int
-main ()
-{
-wint_t i = WEOF;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- has_weof=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-has_weof=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $has_weof" >&5
-echo "${ECHO_T}$has_weof" >&6
-
- # Tests for wide character functions used in char_traits<wchar_t>.
- ac_wfuncs=yes
-
-
-
-
-
-
-for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
- ac_wfuncs=no
-fi
-done
-
-
- # Checks for names injected into std:: by the c_std headers.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-for ac_func in btowc wctob fgetwc fgetws fputwc fputws fwide \
- fwprintf fwscanf swprintf swscanf vfwprintf vswprintf \
- vwprintf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
- mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstol \
- wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
- wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
- ac_wfuncs=no
-fi
-done
-
-
- # Checks for wide character functions that are not required
- # for basic wchar_t support. Don't disable support if they are missing.
- # Injection of these is wrapped with guard macros.
-
-
-
-
-
-for ac_func in vfwscanf vswscanf vwscanf wcstof iswblank
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
- echo "$as_me:$LINENO: checking for ISO C99 wchar_t support" >&5
-echo $ECHO_N "checking for ISO C99 wchar_t support... $ECHO_C" >&6
- if test x"$has_weof" = xyes &&
- test x"$has_wchar_minmax" = xyes &&
- test x"$ac_wfuncs" = xyes;
- then
- ac_isoC99_wchar_t=yes
- else
- ac_isoC99_wchar_t=no
- fi
- echo "$as_me:$LINENO: result: $ac_isoC99_wchar_t" >&5
-echo "${ECHO_T}$ac_isoC99_wchar_t" >&6
+ if test x"$enable_wchar_t" = xyes; then
# Use iconv for wchar_t to char conversions. As such, check for
# X/Open Portability Guide, version 2 features (XPG2).
@@ -86517,35 +78539,22 @@ done
LIBS="$ac_save_LIBS"
- echo "$as_me:$LINENO: checking for XPG2 wchar_t support" >&5
-echo $ECHO_N "checking for XPG2 wchar_t support... $ECHO_C" >&6
if test x"$ac_has_iconv_h" = xyes &&
test x"$ac_has_langinfo_h" = xyes &&
test x"$ac_XPG2funcs" = xyes;
then
- ac_XPG2_wchar_t=yes
- else
- ac_XPG2_wchar_t=no
- fi
- echo "$as_me:$LINENO: result: $ac_XPG2_wchar_t" >&5
-echo "${ECHO_T}$ac_XPG2_wchar_t" >&6
- # At the moment, only enable wchar_t specializations if all the
- # above support is present.
- if test x"$ac_isoC99_wchar_t" = xyes &&
- test x"$ac_XPG2_wchar_t" = xyes;
- then
- cat >>confdefs.h <<\_ACEOF
-#define _GLIBCXX_USE_WCHAR_T 1
+cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_USE_ICONV 1
_ACEOF
- enable_wchar_t=yes
+ enable_iconv=yes
fi
fi
- echo "$as_me:$LINENO: checking for enabled wchar_t specializations" >&5
-echo $ECHO_N "checking for enabled wchar_t specializations... $ECHO_C" >&6
- echo "$as_me:$LINENO: result: $enable_wchar_t" >&5
-echo "${ECHO_T}$enable_wchar_t" >&6
+ echo "$as_me:$LINENO: checking for enabled iconv specializations" >&5
+echo $ECHO_N "checking for enabled iconv specializations... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $enable_iconv" >&5
+echo "${ECHO_T}$enable_iconv" >&6
;;
*-netbsd*)
@@ -87350,886 +79359,10 @@ done
- # Test wchar.h for mbstate_t, which is needed for char_traits and
- # others even if wchar_t support is not on.
- echo "$as_me:$LINENO: checking for mbstate_t" >&5
-echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <wchar.h>
-int
-main ()
-{
-mbstate_t teststate;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- have_mbstate_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-have_mbstate_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $have_mbstate_t" >&5
-echo "${ECHO_T}$have_mbstate_t" >&6
- if test x"$have_mbstate_t" = xyes; then
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_MBSTATE_T 1
-_ACEOF
-
- fi
-
- # Sanity check for existence of ISO C99 headers for extended encoding.
-
-for ac_header in wchar.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ----------------------------------------- ##
-## Report this to the package-unused lists. ##
-## ----------------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
- ac_has_wchar_h=yes
-else
- ac_has_wchar_h=no
-fi
-
-done
-
-
-for ac_header in wctype.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ----------------------------------------- ##
-## Report this to the package-unused lists. ##
-## ----------------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
- ac_has_wctype_h=yes
-else
- ac_has_wctype_h=no
-fi
-
-done
-
+ enable_iconv=no
# Only continue checking if the ISO C99 headers exist and support is on.
- if test x"$ac_has_wchar_h" = xyes &&
- test x"$ac_has_wctype_h" = xyes &&
- test x"$enable_c_mbchar" != xno; then
-
- # Test wchar.h for WCHAR_MIN, WCHAR_MAX, which is needed before
- # numeric_limits can instantiate type_traits<wchar_t>
- echo "$as_me:$LINENO: checking for WCHAR_MIN and WCHAR_MAX" >&5
-echo $ECHO_N "checking for WCHAR_MIN and WCHAR_MAX... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <wchar.h>
-int
-main ()
-{
-int i = WCHAR_MIN; int j = WCHAR_MAX;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- has_wchar_minmax=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-has_wchar_minmax=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $has_wchar_minmax" >&5
-echo "${ECHO_T}$has_wchar_minmax" >&6
-
- # Test wchar.h for WEOF, which is what we use to determine whether
- # to specialize for char_traits<wchar_t> or not.
- echo "$as_me:$LINENO: checking for WEOF" >&5
-echo $ECHO_N "checking for WEOF... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
- #include <wchar.h>
- #include <stddef.h>
-int
-main ()
-{
-wint_t i = WEOF;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- has_weof=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-has_weof=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $has_weof" >&5
-echo "${ECHO_T}$has_weof" >&6
-
- # Tests for wide character functions used in char_traits<wchar_t>.
- ac_wfuncs=yes
-
-
-
-
-
-
-for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
- ac_wfuncs=no
-fi
-done
-
-
- # Checks for names injected into std:: by the c_std headers.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-for ac_func in btowc wctob fgetwc fgetws fputwc fputws fwide \
- fwprintf fwscanf swprintf swscanf vfwprintf vswprintf \
- vwprintf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
- mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstol \
- wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
- wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
- ac_wfuncs=no
-fi
-done
-
-
- # Checks for wide character functions that are not required
- # for basic wchar_t support. Don't disable support if they are missing.
- # Injection of these is wrapped with guard macros.
-
-
-
-
-
-for ac_func in vfwscanf vswscanf vwscanf wcstof iswblank
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
- echo "$as_me:$LINENO: checking for ISO C99 wchar_t support" >&5
-echo $ECHO_N "checking for ISO C99 wchar_t support... $ECHO_C" >&6
- if test x"$has_weof" = xyes &&
- test x"$has_wchar_minmax" = xyes &&
- test x"$ac_wfuncs" = xyes;
- then
- ac_isoC99_wchar_t=yes
- else
- ac_isoC99_wchar_t=no
- fi
- echo "$as_me:$LINENO: result: $ac_isoC99_wchar_t" >&5
-echo "${ECHO_T}$ac_isoC99_wchar_t" >&6
+ if test x"$enable_wchar_t" = xyes; then
# Use iconv for wchar_t to char conversions. As such, check for
# X/Open Portability Guide, version 2 features (XPG2).
@@ -88715,35 +79848,22 @@ done
LIBS="$ac_save_LIBS"
- echo "$as_me:$LINENO: checking for XPG2 wchar_t support" >&5
-echo $ECHO_N "checking for XPG2 wchar_t support... $ECHO_C" >&6
if test x"$ac_has_iconv_h" = xyes &&
test x"$ac_has_langinfo_h" = xyes &&
test x"$ac_XPG2funcs" = xyes;
then
- ac_XPG2_wchar_t=yes
- else
- ac_XPG2_wchar_t=no
- fi
- echo "$as_me:$LINENO: result: $ac_XPG2_wchar_t" >&5
-echo "${ECHO_T}$ac_XPG2_wchar_t" >&6
- # At the moment, only enable wchar_t specializations if all the
- # above support is present.
- if test x"$ac_isoC99_wchar_t" = xyes &&
- test x"$ac_XPG2_wchar_t" = xyes;
- then
- cat >>confdefs.h <<\_ACEOF
-#define _GLIBCXX_USE_WCHAR_T 1
+cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_USE_ICONV 1
_ACEOF
- enable_wchar_t=yes
+ enable_iconv=yes
fi
fi
- echo "$as_me:$LINENO: checking for enabled wchar_t specializations" >&5
-echo $ECHO_N "checking for enabled wchar_t specializations... $ECHO_C" >&6
- echo "$as_me:$LINENO: result: $enable_wchar_t" >&5
-echo "${ECHO_T}$enable_wchar_t" >&6
+ echo "$as_me:$LINENO: checking for enabled iconv specializations" >&5
+echo $ECHO_N "checking for enabled iconv specializations... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $enable_iconv" >&5
+echo "${ECHO_T}$enable_iconv" >&6
cat >>confdefs.h <<\_ACEOF
#define HAVE_COPYSIGN 1
@@ -89597,886 +80717,10 @@ done
- # Test wchar.h for mbstate_t, which is needed for char_traits and
- # others even if wchar_t support is not on.
- echo "$as_me:$LINENO: checking for mbstate_t" >&5
-echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <wchar.h>
-int
-main ()
-{
-mbstate_t teststate;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- have_mbstate_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-have_mbstate_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $have_mbstate_t" >&5
-echo "${ECHO_T}$have_mbstate_t" >&6
- if test x"$have_mbstate_t" = xyes; then
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_MBSTATE_T 1
-_ACEOF
-
- fi
-
- # Sanity check for existence of ISO C99 headers for extended encoding.
-
-for ac_header in wchar.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ----------------------------------------- ##
-## Report this to the package-unused lists. ##
-## ----------------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
- ac_has_wchar_h=yes
-else
- ac_has_wchar_h=no
-fi
-
-done
-
-
-for ac_header in wctype.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ----------------------------------------- ##
-## Report this to the package-unused lists. ##
-## ----------------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
- ac_has_wctype_h=yes
-else
- ac_has_wctype_h=no
-fi
-
-done
-
+ enable_iconv=no
# Only continue checking if the ISO C99 headers exist and support is on.
- if test x"$ac_has_wchar_h" = xyes &&
- test x"$ac_has_wctype_h" = xyes &&
- test x"$enable_c_mbchar" != xno; then
-
- # Test wchar.h for WCHAR_MIN, WCHAR_MAX, which is needed before
- # numeric_limits can instantiate type_traits<wchar_t>
- echo "$as_me:$LINENO: checking for WCHAR_MIN and WCHAR_MAX" >&5
-echo $ECHO_N "checking for WCHAR_MIN and WCHAR_MAX... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <wchar.h>
-int
-main ()
-{
-int i = WCHAR_MIN; int j = WCHAR_MAX;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- has_wchar_minmax=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-has_wchar_minmax=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $has_wchar_minmax" >&5
-echo "${ECHO_T}$has_wchar_minmax" >&6
-
- # Test wchar.h for WEOF, which is what we use to determine whether
- # to specialize for char_traits<wchar_t> or not.
- echo "$as_me:$LINENO: checking for WEOF" >&5
-echo $ECHO_N "checking for WEOF... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
- #include <wchar.h>
- #include <stddef.h>
-int
-main ()
-{
-wint_t i = WEOF;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- has_weof=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-has_weof=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $has_weof" >&5
-echo "${ECHO_T}$has_weof" >&6
-
- # Tests for wide character functions used in char_traits<wchar_t>.
- ac_wfuncs=yes
-
-
-
-
-
-
-for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
- ac_wfuncs=no
-fi
-done
-
-
- # Checks for names injected into std:: by the c_std headers.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-for ac_func in btowc wctob fgetwc fgetws fputwc fputws fwide \
- fwprintf fwscanf swprintf swscanf vfwprintf vswprintf \
- vwprintf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
- mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstol \
- wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
- wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
- ac_wfuncs=no
-fi
-done
-
-
- # Checks for wide character functions that are not required
- # for basic wchar_t support. Don't disable support if they are missing.
- # Injection of these is wrapped with guard macros.
-
-
-
-
-
-for ac_func in vfwscanf vswscanf vwscanf wcstof iswblank
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
- echo "$as_me:$LINENO: checking for ISO C99 wchar_t support" >&5
-echo $ECHO_N "checking for ISO C99 wchar_t support... $ECHO_C" >&6
- if test x"$has_weof" = xyes &&
- test x"$has_wchar_minmax" = xyes &&
- test x"$ac_wfuncs" = xyes;
- then
- ac_isoC99_wchar_t=yes
- else
- ac_isoC99_wchar_t=no
- fi
- echo "$as_me:$LINENO: result: $ac_isoC99_wchar_t" >&5
-echo "${ECHO_T}$ac_isoC99_wchar_t" >&6
+ if test x"$enable_wchar_t" = xyes; then
# Use iconv for wchar_t to char conversions. As such, check for
# X/Open Portability Guide, version 2 features (XPG2).
@@ -90962,35 +81206,22 @@ done
LIBS="$ac_save_LIBS"
- echo "$as_me:$LINENO: checking for XPG2 wchar_t support" >&5
-echo $ECHO_N "checking for XPG2 wchar_t support... $ECHO_C" >&6
if test x"$ac_has_iconv_h" = xyes &&
test x"$ac_has_langinfo_h" = xyes &&
test x"$ac_XPG2funcs" = xyes;
then
- ac_XPG2_wchar_t=yes
- else
- ac_XPG2_wchar_t=no
- fi
- echo "$as_me:$LINENO: result: $ac_XPG2_wchar_t" >&5
-echo "${ECHO_T}$ac_XPG2_wchar_t" >&6
- # At the moment, only enable wchar_t specializations if all the
- # above support is present.
- if test x"$ac_isoC99_wchar_t" = xyes &&
- test x"$ac_XPG2_wchar_t" = xyes;
- then
- cat >>confdefs.h <<\_ACEOF
-#define _GLIBCXX_USE_WCHAR_T 1
+cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_USE_ICONV 1
_ACEOF
- enable_wchar_t=yes
+ enable_iconv=yes
fi
fi
- echo "$as_me:$LINENO: checking for enabled wchar_t specializations" >&5
-echo $ECHO_N "checking for enabled wchar_t specializations... $ECHO_C" >&6
- echo "$as_me:$LINENO: result: $enable_wchar_t" >&5
-echo "${ECHO_T}$enable_wchar_t" >&6
+ echo "$as_me:$LINENO: checking for enabled iconv specializations" >&5
+echo $ECHO_N "checking for enabled iconv specializations... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $enable_iconv" >&5
+echo "${ECHO_T}$enable_iconv" >&6
# For showmanyc_helper().
@@ -92205,886 +82436,10 @@ done
- # Test wchar.h for mbstate_t, which is needed for char_traits and
- # others even if wchar_t support is not on.
- echo "$as_me:$LINENO: checking for mbstate_t" >&5
-echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <wchar.h>
-int
-main ()
-{
-mbstate_t teststate;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- have_mbstate_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-have_mbstate_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $have_mbstate_t" >&5
-echo "${ECHO_T}$have_mbstate_t" >&6
- if test x"$have_mbstate_t" = xyes; then
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_MBSTATE_T 1
-_ACEOF
-
- fi
-
- # Sanity check for existence of ISO C99 headers for extended encoding.
-
-for ac_header in wchar.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ----------------------------------------- ##
-## Report this to the package-unused lists. ##
-## ----------------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
- ac_has_wchar_h=yes
-else
- ac_has_wchar_h=no
-fi
-
-done
-
-
-for ac_header in wctype.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ----------------------------------------- ##
-## Report this to the package-unused lists. ##
-## ----------------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
- ac_has_wctype_h=yes
-else
- ac_has_wctype_h=no
-fi
-
-done
-
+ enable_iconv=no
# Only continue checking if the ISO C99 headers exist and support is on.
- if test x"$ac_has_wchar_h" = xyes &&
- test x"$ac_has_wctype_h" = xyes &&
- test x"$enable_c_mbchar" != xno; then
-
- # Test wchar.h for WCHAR_MIN, WCHAR_MAX, which is needed before
- # numeric_limits can instantiate type_traits<wchar_t>
- echo "$as_me:$LINENO: checking for WCHAR_MIN and WCHAR_MAX" >&5
-echo $ECHO_N "checking for WCHAR_MIN and WCHAR_MAX... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <wchar.h>
-int
-main ()
-{
-int i = WCHAR_MIN; int j = WCHAR_MAX;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- has_wchar_minmax=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-has_wchar_minmax=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $has_wchar_minmax" >&5
-echo "${ECHO_T}$has_wchar_minmax" >&6
-
- # Test wchar.h for WEOF, which is what we use to determine whether
- # to specialize for char_traits<wchar_t> or not.
- echo "$as_me:$LINENO: checking for WEOF" >&5
-echo $ECHO_N "checking for WEOF... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
- #include <wchar.h>
- #include <stddef.h>
-int
-main ()
-{
-wint_t i = WEOF;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- has_weof=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-has_weof=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $has_weof" >&5
-echo "${ECHO_T}$has_weof" >&6
-
- # Tests for wide character functions used in char_traits<wchar_t>.
- ac_wfuncs=yes
-
-
-
-
-
-
-for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
- ac_wfuncs=no
-fi
-done
-
-
- # Checks for names injected into std:: by the c_std headers.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-for ac_func in btowc wctob fgetwc fgetws fputwc fputws fwide \
- fwprintf fwscanf swprintf swscanf vfwprintf vswprintf \
- vwprintf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
- mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstol \
- wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
- wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
- ac_wfuncs=no
-fi
-done
-
-
- # Checks for wide character functions that are not required
- # for basic wchar_t support. Don't disable support if they are missing.
- # Injection of these is wrapped with guard macros.
-
-
-
-
-
-for ac_func in vfwscanf vswscanf vwscanf wcstof iswblank
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
- echo "$as_me:$LINENO: checking for ISO C99 wchar_t support" >&5
-echo $ECHO_N "checking for ISO C99 wchar_t support... $ECHO_C" >&6
- if test x"$has_weof" = xyes &&
- test x"$has_wchar_minmax" = xyes &&
- test x"$ac_wfuncs" = xyes;
- then
- ac_isoC99_wchar_t=yes
- else
- ac_isoC99_wchar_t=no
- fi
- echo "$as_me:$LINENO: result: $ac_isoC99_wchar_t" >&5
-echo "${ECHO_T}$ac_isoC99_wchar_t" >&6
+ if test x"$enable_wchar_t" = xyes; then
# Use iconv for wchar_t to char conversions. As such, check for
# X/Open Portability Guide, version 2 features (XPG2).
@@ -93570,35 +82925,22 @@ done
LIBS="$ac_save_LIBS"
- echo "$as_me:$LINENO: checking for XPG2 wchar_t support" >&5
-echo $ECHO_N "checking for XPG2 wchar_t support... $ECHO_C" >&6
if test x"$ac_has_iconv_h" = xyes &&
test x"$ac_has_langinfo_h" = xyes &&
test x"$ac_XPG2funcs" = xyes;
then
- ac_XPG2_wchar_t=yes
- else
- ac_XPG2_wchar_t=no
- fi
- echo "$as_me:$LINENO: result: $ac_XPG2_wchar_t" >&5
-echo "${ECHO_T}$ac_XPG2_wchar_t" >&6
- # At the moment, only enable wchar_t specializations if all the
- # above support is present.
- if test x"$ac_isoC99_wchar_t" = xyes &&
- test x"$ac_XPG2_wchar_t" = xyes;
- then
- cat >>confdefs.h <<\_ACEOF
-#define _GLIBCXX_USE_WCHAR_T 1
+cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_USE_ICONV 1
_ACEOF
- enable_wchar_t=yes
+ enable_iconv=yes
fi
fi
- echo "$as_me:$LINENO: checking for enabled wchar_t specializations" >&5
-echo $ECHO_N "checking for enabled wchar_t specializations... $ECHO_C" >&6
- echo "$as_me:$LINENO: result: $enable_wchar_t" >&5
-echo "${ECHO_T}$enable_wchar_t" >&6
+ echo "$as_me:$LINENO: checking for enabled iconv specializations" >&5
+echo $ECHO_N "checking for enabled iconv specializations... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $enable_iconv" >&5
+echo "${ECHO_T}$enable_iconv" >&6
cat >>confdefs.h <<\_ACEOF
#define HAVE_COSF 1
@@ -93683,18 +83025,6 @@ _ACEOF
_ACEOF
cat >>confdefs.h <<\_ACEOF
-#define HAVE_BTOWC 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_FGETWC 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_FGETWS 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
#define HAVE_FINITE 1
_ACEOF
@@ -93703,210 +83033,14 @@ _ACEOF
_ACEOF
cat >>confdefs.h <<\_ACEOF
-#define HAVE_FPUTWC 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_FPUTWS 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_FWIDE 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_FWPRINTF 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_FWSCANF 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
#define HAVE_GETPAGESIZE 1
_ACEOF
cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETWC 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETWCHAR 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_MBRLEN 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_MBRTOWC 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_MBSINIT 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_MBSRTOWCS 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
#define HAVE_NL_LANGINFO 1
_ACEOF
cat >>confdefs.h <<\_ACEOF
-#define HAVE_PUTWC 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_PUTWCHAR 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_SWPRINTF 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_SWSCANF 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_UNGETWC 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_VFWPRINTF 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_VSWPRINTF 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_VWPRINTF 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_WCRTOMB 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_WCSCAT 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_WCSCHR 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_WCSCMP 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_WCSCOLL 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_WCSCPY 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_WCSCSPN 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_WCSFTIME 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_WCSLEN 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_WCSNCAT 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_WCSNCMP 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_WCSNCPY 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_WCSPBRK 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_WCSRCHR 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_WCSRTOMBS 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_WCSSPN 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_WCSSTR 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_WCSTOD 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_WCSTOK 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_WCSTOL 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_WCSTOUL 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_WCSXFRM 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_WCTOB 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_WMEMCHR 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_WMEMCMP 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_WMEMCPY 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_WMEMMOVE 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_WMEMSET 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_WPRINTF 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_WSCANF 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
#define HAVE_ICONV 1
_ACEOF
@@ -93921,886 +83055,10 @@ _ACEOF
# Look for the pieces required for wchar_t support in order to
# get all the right HAVE_* macros defined.
- # Test wchar.h for mbstate_t, which is needed for char_traits and
- # others even if wchar_t support is not on.
- echo "$as_me:$LINENO: checking for mbstate_t" >&5
-echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <wchar.h>
-int
-main ()
-{
-mbstate_t teststate;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- have_mbstate_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-have_mbstate_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $have_mbstate_t" >&5
-echo "${ECHO_T}$have_mbstate_t" >&6
- if test x"$have_mbstate_t" = xyes; then
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_MBSTATE_T 1
-_ACEOF
-
- fi
-
- # Sanity check for existence of ISO C99 headers for extended encoding.
-
-for ac_header in wchar.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ----------------------------------------- ##
-## Report this to the package-unused lists. ##
-## ----------------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
- ac_has_wchar_h=yes
-else
- ac_has_wchar_h=no
-fi
-
-done
-
-
-for ac_header in wctype.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ----------------------------------------- ##
-## Report this to the package-unused lists. ##
-## ----------------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
- ac_has_wctype_h=yes
-else
- ac_has_wctype_h=no
-fi
-
-done
-
+ enable_iconv=no
# Only continue checking if the ISO C99 headers exist and support is on.
- if test x"$ac_has_wchar_h" = xyes &&
- test x"$ac_has_wctype_h" = xyes &&
- test x"$enable_c_mbchar" != xno; then
-
- # Test wchar.h for WCHAR_MIN, WCHAR_MAX, which is needed before
- # numeric_limits can instantiate type_traits<wchar_t>
- echo "$as_me:$LINENO: checking for WCHAR_MIN and WCHAR_MAX" >&5
-echo $ECHO_N "checking for WCHAR_MIN and WCHAR_MAX... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <wchar.h>
-int
-main ()
-{
-int i = WCHAR_MIN; int j = WCHAR_MAX;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- has_wchar_minmax=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-has_wchar_minmax=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $has_wchar_minmax" >&5
-echo "${ECHO_T}$has_wchar_minmax" >&6
-
- # Test wchar.h for WEOF, which is what we use to determine whether
- # to specialize for char_traits<wchar_t> or not.
- echo "$as_me:$LINENO: checking for WEOF" >&5
-echo $ECHO_N "checking for WEOF... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
- #include <wchar.h>
- #include <stddef.h>
-int
-main ()
-{
-wint_t i = WEOF;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- has_weof=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-has_weof=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $has_weof" >&5
-echo "${ECHO_T}$has_weof" >&6
-
- # Tests for wide character functions used in char_traits<wchar_t>.
- ac_wfuncs=yes
-
-
-
-
-
-
-for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
- ac_wfuncs=no
-fi
-done
-
-
- # Checks for names injected into std:: by the c_std headers.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-for ac_func in btowc wctob fgetwc fgetws fputwc fputws fwide \
- fwprintf fwscanf swprintf swscanf vfwprintf vswprintf \
- vwprintf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
- mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstol \
- wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
- wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
- ac_wfuncs=no
-fi
-done
-
-
- # Checks for wide character functions that are not required
- # for basic wchar_t support. Don't disable support if they are missing.
- # Injection of these is wrapped with guard macros.
-
-
-
-
-
-for ac_func in vfwscanf vswscanf vwscanf wcstof iswblank
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
- echo "$as_me:$LINENO: checking for ISO C99 wchar_t support" >&5
-echo $ECHO_N "checking for ISO C99 wchar_t support... $ECHO_C" >&6
- if test x"$has_weof" = xyes &&
- test x"$has_wchar_minmax" = xyes &&
- test x"$ac_wfuncs" = xyes;
- then
- ac_isoC99_wchar_t=yes
- else
- ac_isoC99_wchar_t=no
- fi
- echo "$as_me:$LINENO: result: $ac_isoC99_wchar_t" >&5
-echo "${ECHO_T}$ac_isoC99_wchar_t" >&6
+ if test x"$enable_wchar_t" = xyes; then
# Use iconv for wchar_t to char conversions. As such, check for
# X/Open Portability Guide, version 2 features (XPG2).
@@ -95286,39 +83544,26 @@ done
LIBS="$ac_save_LIBS"
- echo "$as_me:$LINENO: checking for XPG2 wchar_t support" >&5
-echo $ECHO_N "checking for XPG2 wchar_t support... $ECHO_C" >&6
if test x"$ac_has_iconv_h" = xyes &&
test x"$ac_has_langinfo_h" = xyes &&
test x"$ac_XPG2funcs" = xyes;
then
- ac_XPG2_wchar_t=yes
- else
- ac_XPG2_wchar_t=no
- fi
- echo "$as_me:$LINENO: result: $ac_XPG2_wchar_t" >&5
-echo "${ECHO_T}$ac_XPG2_wchar_t" >&6
- # At the moment, only enable wchar_t specializations if all the
- # above support is present.
- if test x"$ac_isoC99_wchar_t" = xyes &&
- test x"$ac_XPG2_wchar_t" = xyes;
- then
- cat >>confdefs.h <<\_ACEOF
-#define _GLIBCXX_USE_WCHAR_T 1
+cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_USE_ICONV 1
_ACEOF
- enable_wchar_t=yes
+ enable_iconv=yes
fi
fi
- echo "$as_me:$LINENO: checking for enabled wchar_t specializations" >&5
-echo $ECHO_N "checking for enabled wchar_t specializations... $ECHO_C" >&6
- echo "$as_me:$LINENO: result: $enable_wchar_t" >&5
-echo "${ECHO_T}$enable_wchar_t" >&6
+ echo "$as_me:$LINENO: checking for enabled iconv specializations" >&5
+echo $ECHO_N "checking for enabled iconv specializations... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $enable_iconv" >&5
+echo "${ECHO_T}$enable_iconv" >&6
# All of the dependencies for wide character support are here, so
# turn it on. This requires some syncronization with the
- # GLIBCXX_CHECK_WCHAR_T_SUPPORT in acinclude.m4
+ # GLIBCXX_CHECK_ICONV_SUPPORT in acinclude.m4
cat >>confdefs.h <<\_ACEOF
#define _GLIBCXX_USE_WCHAR_T 1
_ACEOF
@@ -96262,886 +84507,10 @@ done
- # Test wchar.h for mbstate_t, which is needed for char_traits and
- # others even if wchar_t support is not on.
- echo "$as_me:$LINENO: checking for mbstate_t" >&5
-echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <wchar.h>
-int
-main ()
-{
-mbstate_t teststate;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- have_mbstate_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-have_mbstate_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $have_mbstate_t" >&5
-echo "${ECHO_T}$have_mbstate_t" >&6
- if test x"$have_mbstate_t" = xyes; then
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_MBSTATE_T 1
-_ACEOF
-
- fi
-
- # Sanity check for existence of ISO C99 headers for extended encoding.
-
-for ac_header in wchar.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ----------------------------------------- ##
-## Report this to the package-unused lists. ##
-## ----------------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
- ac_has_wchar_h=yes
-else
- ac_has_wchar_h=no
-fi
-
-done
-
-
-for ac_header in wctype.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ----------------------------------------- ##
-## Report this to the package-unused lists. ##
-## ----------------------------------------- ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
- ac_has_wctype_h=yes
-else
- ac_has_wctype_h=no
-fi
-
-done
-
+ enable_iconv=no
# Only continue checking if the ISO C99 headers exist and support is on.
- if test x"$ac_has_wchar_h" = xyes &&
- test x"$ac_has_wctype_h" = xyes &&
- test x"$enable_c_mbchar" != xno; then
-
- # Test wchar.h for WCHAR_MIN, WCHAR_MAX, which is needed before
- # numeric_limits can instantiate type_traits<wchar_t>
- echo "$as_me:$LINENO: checking for WCHAR_MIN and WCHAR_MAX" >&5
-echo $ECHO_N "checking for WCHAR_MIN and WCHAR_MAX... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <wchar.h>
-int
-main ()
-{
-int i = WCHAR_MIN; int j = WCHAR_MAX;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- has_wchar_minmax=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-has_wchar_minmax=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $has_wchar_minmax" >&5
-echo "${ECHO_T}$has_wchar_minmax" >&6
-
- # Test wchar.h for WEOF, which is what we use to determine whether
- # to specialize for char_traits<wchar_t> or not.
- echo "$as_me:$LINENO: checking for WEOF" >&5
-echo $ECHO_N "checking for WEOF... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
- #include <wchar.h>
- #include <stddef.h>
-int
-main ()
-{
-wint_t i = WEOF;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- has_weof=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-has_weof=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: result: $has_weof" >&5
-echo "${ECHO_T}$has_weof" >&6
-
- # Tests for wide character functions used in char_traits<wchar_t>.
- ac_wfuncs=yes
-
-
-
-
-
-
-for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
- ac_wfuncs=no
-fi
-done
-
-
- # Checks for names injected into std:: by the c_std headers.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-for ac_func in btowc wctob fgetwc fgetws fputwc fputws fwide \
- fwprintf fwscanf swprintf swscanf vfwprintf vswprintf \
- vwprintf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
- mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstol \
- wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
- wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
- ac_wfuncs=no
-fi
-done
-
-
- # Checks for wide character functions that are not required
- # for basic wchar_t support. Don't disable support if they are missing.
- # Injection of these is wrapped with guard macros.
-
-
-
-
-
-for ac_func in vfwscanf vswscanf vwscanf wcstof iswblank
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
- echo "$as_me:$LINENO: checking for ISO C99 wchar_t support" >&5
-echo $ECHO_N "checking for ISO C99 wchar_t support... $ECHO_C" >&6
- if test x"$has_weof" = xyes &&
- test x"$has_wchar_minmax" = xyes &&
- test x"$ac_wfuncs" = xyes;
- then
- ac_isoC99_wchar_t=yes
- else
- ac_isoC99_wchar_t=no
- fi
- echo "$as_me:$LINENO: result: $ac_isoC99_wchar_t" >&5
-echo "${ECHO_T}$ac_isoC99_wchar_t" >&6
+ if test x"$enable_wchar_t" = xyes; then
# Use iconv for wchar_t to char conversions. As such, check for
# X/Open Portability Guide, version 2 features (XPG2).
@@ -97627,35 +84996,22 @@ done
LIBS="$ac_save_LIBS"
- echo "$as_me:$LINENO: checking for XPG2 wchar_t support" >&5
-echo $ECHO_N "checking for XPG2 wchar_t support... $ECHO_C" >&6
if test x"$ac_has_iconv_h" = xyes &&
test x"$ac_has_langinfo_h" = xyes &&
test x"$ac_XPG2funcs" = xyes;
then
- ac_XPG2_wchar_t=yes
- else
- ac_XPG2_wchar_t=no
- fi
- echo "$as_me:$LINENO: result: $ac_XPG2_wchar_t" >&5
-echo "${ECHO_T}$ac_XPG2_wchar_t" >&6
- # At the moment, only enable wchar_t specializations if all the
- # above support is present.
- if test x"$ac_isoC99_wchar_t" = xyes &&
- test x"$ac_XPG2_wchar_t" = xyes;
- then
- cat >>confdefs.h <<\_ACEOF
-#define _GLIBCXX_USE_WCHAR_T 1
+cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_USE_ICONV 1
_ACEOF
- enable_wchar_t=yes
+ enable_iconv=yes
fi
fi
- echo "$as_me:$LINENO: checking for enabled wchar_t specializations" >&5
-echo $ECHO_N "checking for enabled wchar_t specializations... $ECHO_C" >&6
- echo "$as_me:$LINENO: result: $enable_wchar_t" >&5
-echo "${ECHO_T}$enable_wchar_t" >&6
+ echo "$as_me:$LINENO: checking for enabled iconv specializations" >&5
+echo $ECHO_N "checking for enabled iconv specializations... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $enable_iconv" >&5
+echo "${ECHO_T}$enable_iconv" >&6
cat >>confdefs.h <<\_ACEOF
#define HAVE_COPYSIGN 1
@@ -100207,11 +87563,11 @@ s,@GLIBCXX_C_HEADERS_C_STD_TRUE@,$GLIBCXX_C_HEADERS_C_STD_TRUE,;t t
s,@GLIBCXX_C_HEADERS_C_STD_FALSE@,$GLIBCXX_C_HEADERS_C_STD_FALSE,;t t
s,@GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE@,$GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE,;t t
s,@GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE@,$GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE,;t t
-s,@glibcxx_thread_h@,$glibcxx_thread_h,;t t
s,@DEBUG_FLAGS@,$DEBUG_FLAGS,;t t
s,@GLIBCXX_BUILD_DEBUG_TRUE@,$GLIBCXX_BUILD_DEBUG_TRUE,;t t
s,@GLIBCXX_BUILD_DEBUG_FALSE@,$GLIBCXX_BUILD_DEBUG_FALSE,;t t
s,@EXTRA_CXX_FLAGS@,$EXTRA_CXX_FLAGS,;t t
+s,@glibcxx_thread_h@,$glibcxx_thread_h,;t t
s,@WERROR@,$WERROR,;t t
s,@SECTION_FLAGS@,$SECTION_FLAGS,;t t
s,@SECTION_LDFLAGS@,$SECTION_LDFLAGS,;t t
diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac
index 5d0a54f9c4c..f2271c17406 100644
--- a/libstdc++-v3/configure.ac
+++ b/libstdc++-v3/configure.ac
@@ -64,32 +64,28 @@ AM_INIT_AUTOMAKE([1.9.1 no-define foreign no-dependencies -Wall -Wno-portability
# up critical shell variables.
GLIBCXX_CONFIGURE
-#AC_MSG_NOTICE([====== Starting libtool configuration])
AC_LIBTOOL_DLOPEN
AM_PROG_LIBTOOL
AC_SUBST(enable_shared)
AC_SUBST(enable_static)
-#AC_MSG_NOTICE([====== Finished libtool configuration]) ; sleep 10
# Possibly disable most of the library.
-## XXX Consider skipping unncessary tests altogether in this case, rather
+## TODO: Consider skipping unncessary tests altogether in this case, rather
## than just ignoring the results. Faster /and/ more correct, win win.
GLIBCXX_ENABLE_HOSTED
-# Check for support bits and g++ features that don't require linking.
+# Check for compiler support that doesn't require linking.
GLIBCXX_ENABLE_SJLJ_EXCEPTIONS
GLIBCXX_ENABLE_PCH($is_hosted)
# Enable all the variable C++ runtime options.
-# NB: C_MBCHAR must come early.
GLIBCXX_ENABLE_CSTDIO
GLIBCXX_ENABLE_CLOCALE
GLIBCXX_ENABLE_ALLOCATOR
GLIBCXX_ENABLE_CHEADERS($c_model) dnl c_model from configure.host
-GLIBCXX_ENABLE_C_MBCHAR([yes])
GLIBCXX_ENABLE_C99([yes])
GLIBCXX_ENABLE_LONG_LONG([yes])
-GLIBCXX_ENABLE_THREADS
+GLIBCXX_ENABLE_WCHAR_T([yes])
GLIBCXX_ENABLE_CONCEPT_CHECKS([no])
GLIBCXX_ENABLE_DEBUG_FLAGS(["-g3 -O0"])
GLIBCXX_ENABLE_DEBUG([no])
@@ -97,6 +93,7 @@ GLIBCXX_ENABLE_CXX_FLAGS
GLIBCXX_ENABLE_FULLY_DYNAMIC_STRING([no])
# No surprises, no surprises...
+GLIBCXX_ENABLE_THREADS
if test $atomicity_dir = cpu/generic ; then
AC_MSG_WARN([No native atomic operations are provided for this platform.])
if test $target_thread_file = single; then
@@ -124,7 +121,7 @@ if $GLIBCXX_IS_NATIVE; then
GLIBCXX_CHECK_MATH_SUPPORT
GLIBCXX_CHECK_BUILTIN_MATH_SUPPORT
GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
- GLIBCXX_CHECK_WCHAR_T_SUPPORT
+ GLIBCXX_CHECK_ICONV_SUPPORT
GLIBCXX_CHECK_STDLIB_SUPPORT
# For showmanyc_helper().
diff --git a/libstdc++-v3/crossconfig.m4 b/libstdc++-v3/crossconfig.m4
index 8ee7a7b1ee0..598a5de4558 100644
--- a/libstdc++-v3/crossconfig.m4
+++ b/libstdc++-v3/crossconfig.m4
@@ -1,5 +1,5 @@
dnl
-dnl This file contains stuff.
+dnl This file contains details for non-natives builds.
dnl
# Base decisions on target environment.
@@ -21,7 +21,7 @@ case "${host}" in
GLIBCXX_CHECK_MATH_SUPPORT
GLIBCXX_CHECK_BUILTIN_MATH_SUPPORT
GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
- GLIBCXX_CHECK_WCHAR_T_SUPPORT
+ GLIBCXX_CHECK_ICONV_SUPPORT
GLIBCXX_CHECK_STDLIB_SUPPORT
# For showmanyc_helper().
@@ -56,7 +56,7 @@ case "${host}" in
GLIBCXX_CHECK_MATH_SUPPORT
GLIBCXX_CHECK_BUILTIN_MATH_SUPPORT
GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
- GLIBCXX_CHECK_WCHAR_T_SUPPORT
+ GLIBCXX_CHECK_ICONV_SUPPORT
GLIBCXX_CHECK_STDLIB_SUPPORT
GLIBCXX_CHECK_S_ISREG_OR_S_IFREG
AC_DEFINE(HAVE_WRITEV)
@@ -71,7 +71,7 @@ case "${host}" in
AC_SUBST(SECTION_FLAGS)
GLIBCXX_CHECK_LINKER_FEATURES
GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
- GLIBCXX_CHECK_WCHAR_T_SUPPORT
+ GLIBCXX_CHECK_ICONV_SUPPORT
AC_DEFINE(HAVE_LC_MESSAGES)
AC_DEFINE(HAVE_GETPAGESIZE)
AC_DEFINE(HAVE_SETENV)
@@ -126,7 +126,7 @@ case "${host}" in
AC_SUBST(SECTION_FLAGS)
GLIBCXX_CHECK_LINKER_FEATURES
GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
- GLIBCXX_CHECK_WCHAR_T_SUPPORT
+ GLIBCXX_CHECK_ICONV_SUPPORT
AC_DEFINE(HAVE_COPYSIGN)
AC_DEFINE(HAVE_COPYSIGNF)
AC_DEFINE(HAVE_FREXPF)
@@ -150,7 +150,7 @@ case "${host}" in
AC_SUBST(SECTION_FLAGS)
GLIBCXX_CHECK_LINKER_FEATURES
GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
- GLIBCXX_CHECK_WCHAR_T_SUPPORT
+ GLIBCXX_CHECK_ICONV_SUPPORT
# For LFS.
AC_DEFINE(HAVE_INT64_T)
@@ -237,7 +237,7 @@ case "${host}" in
AC_CHECK_HEADERS([sys/types.h locale.h float.h])
GLIBCXX_CHECK_LINKER_FEATURES
GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
- GLIBCXX_CHECK_WCHAR_T_SUPPORT
+ GLIBCXX_CHECK_ICONV_SUPPORT
;;
*-netbsd*)
AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
@@ -247,7 +247,7 @@ case "${host}" in
AC_SUBST(SECTION_FLAGS)
GLIBCXX_CHECK_LINKER_FEATURES
GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
- GLIBCXX_CHECK_WCHAR_T_SUPPORT
+ GLIBCXX_CHECK_ICONV_SUPPORT
AC_DEFINE(HAVE_COPYSIGN)
AC_DEFINE(HAVE_COPYSIGNF)
AC_DEFINE(HAVE_FINITEF)
@@ -271,7 +271,7 @@ case "${host}" in
AC_SUBST(SECTION_FLAGS)
GLIBCXX_CHECK_LINKER_FEATURES
GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
- GLIBCXX_CHECK_WCHAR_T_SUPPORT
+ GLIBCXX_CHECK_ICONV_SUPPORT
# For showmanyc_helper().
AC_CHECK_HEADERS(sys/ioctl.h sys/filio.h)
@@ -287,7 +287,7 @@ case "${host}" in
AC_SUBST(SECTION_FLAGS)
GLIBCXX_CHECK_LINKER_FEATURES
GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
- GLIBCXX_CHECK_WCHAR_T_SUPPORT
+ GLIBCXX_CHECK_ICONV_SUPPORT
AC_DEFINE(HAVE_COSF)
AC_DEFINE(HAVE_COSL)
AC_DEFINE(HAVE_COSHF)
@@ -316,71 +316,19 @@ case "${host}" in
AC_DEFINE(HAVE_POLL)
AC_DEFINE(HAVE_S_ISREG)
AC_DEFINE(HAVE_LC_MESSAGES)
- AC_DEFINE(HAVE_BTOWC)
- AC_DEFINE(HAVE_FGETWC)
- AC_DEFINE(HAVE_FGETWS)
AC_DEFINE(HAVE_FINITE)
AC_DEFINE(HAVE_FPCLASS)
- AC_DEFINE(HAVE_FPUTWC)
- AC_DEFINE(HAVE_FPUTWS)
- AC_DEFINE(HAVE_FWIDE)
- AC_DEFINE(HAVE_FWPRINTF)
- AC_DEFINE(HAVE_FWSCANF)
AC_DEFINE(HAVE_GETPAGESIZE)
- AC_DEFINE(HAVE_GETWC)
- AC_DEFINE(HAVE_GETWCHAR)
- AC_DEFINE(HAVE_MBRLEN)
- AC_DEFINE(HAVE_MBRTOWC)
- AC_DEFINE(HAVE_MBSINIT)
- AC_DEFINE(HAVE_MBSRTOWCS)
AC_DEFINE(HAVE_NL_LANGINFO)
- AC_DEFINE(HAVE_PUTWC)
- AC_DEFINE(HAVE_PUTWCHAR)
- AC_DEFINE(HAVE_SWPRINTF)
- AC_DEFINE(HAVE_SWSCANF)
- AC_DEFINE(HAVE_UNGETWC)
- AC_DEFINE(HAVE_VFWPRINTF)
- AC_DEFINE(HAVE_VSWPRINTF)
- AC_DEFINE(HAVE_VWPRINTF)
- AC_DEFINE(HAVE_WCRTOMB)
- AC_DEFINE(HAVE_WCSCAT)
- AC_DEFINE(HAVE_WCSCHR)
- AC_DEFINE(HAVE_WCSCMP)
- AC_DEFINE(HAVE_WCSCOLL)
- AC_DEFINE(HAVE_WCSCPY)
- AC_DEFINE(HAVE_WCSCSPN)
- AC_DEFINE(HAVE_WCSFTIME)
- AC_DEFINE(HAVE_WCSLEN)
- AC_DEFINE(HAVE_WCSNCAT)
- AC_DEFINE(HAVE_WCSNCMP)
- AC_DEFINE(HAVE_WCSNCPY)
- AC_DEFINE(HAVE_WCSPBRK)
- AC_DEFINE(HAVE_WCSRCHR)
- AC_DEFINE(HAVE_WCSRTOMBS)
- AC_DEFINE(HAVE_WCSSPN)
- AC_DEFINE(HAVE_WCSSTR)
- AC_DEFINE(HAVE_WCSTOD)
- AC_DEFINE(HAVE_WCSTOK)
- AC_DEFINE(HAVE_WCSTOL)
- AC_DEFINE(HAVE_WCSTOUL)
- AC_DEFINE(HAVE_WCSXFRM)
- AC_DEFINE(HAVE_WCTOB)
- AC_DEFINE(HAVE_WMEMCHR)
- AC_DEFINE(HAVE_WMEMCMP)
- AC_DEFINE(HAVE_WMEMCPY)
- AC_DEFINE(HAVE_WMEMMOVE)
- AC_DEFINE(HAVE_WMEMSET)
- AC_DEFINE(HAVE_WPRINTF)
- AC_DEFINE(HAVE_WSCANF)
AC_DEFINE(HAVE_ICONV)
AC_DEFINE(HAVE_ICONV_CLOSE)
AC_DEFINE(HAVE_ICONV_OPEN)
# Look for the pieces required for wchar_t support in order to
# get all the right HAVE_* macros defined.
- GLIBCXX_CHECK_WCHAR_T_SUPPORT
+ GLIBCXX_CHECK_ICONV_SUPPORT
# All of the dependencies for wide character support are here, so
# turn it on. This requires some syncronization with the
- # GLIBCXX_CHECK_WCHAR_T_SUPPORT in acinclude.m4
+ # GLIBCXX_CHECK_ICONV_SUPPORT in acinclude.m4
AC_DEFINE(_GLIBCXX_USE_WCHAR_T)
# Are these tested for even when cross?
AC_DEFINE(HAVE_FLOAT_H)
@@ -435,7 +383,7 @@ case "${host}" in
AC_SUBST(SECTION_FLAGS)
GLIBCXX_CHECK_LINKER_FEATURES
GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
- GLIBCXX_CHECK_WCHAR_T_SUPPORT
+ GLIBCXX_CHECK_ICONV_SUPPORT
AC_DEFINE(HAVE_COPYSIGN)
AC_DEFINE(HAVE_COPYSIGNF)
AC_DEFINE(HAVE_FINITE)
diff --git a/libstdc++-v3/docs/html/configopts.html b/libstdc++-v3/docs/html/configopts.html
index 2c84e969a05..80ff219a974 100644
--- a/libstdc++-v3/docs/html/configopts.html
+++ b/libstdc++-v3/docs/html/configopts.html
@@ -234,14 +234,13 @@ options</a></h1>
</p>
</dd>
- <dt><code>--enable-c-mbchar </code>[default]</dt>
- <dd><p>Certain template specializations are required for wide
- character conversion support. This is tricky and currently
- changing rapidly, and can cause problems on new platforms.
- Disabling wide character specializations is useful for initial
- porting steps, but builds only a subset of what is required by
- ISO. By default, this option is on. This option can change
- the library ABI.
+ <dt><code>--enable-wchar_t </code>[default]</dt>
+ <dd><p>Template specializations for the &quot;wchar_t&quot; type are
+ required for wide character conversion support. Disabling
+ wide character specializations may be expedient for initial
+ porting efforts, but builds only a subset of what is required by
+ ISO, and is not recommended. By default, this option is on.
+ This option can change the library ABI.
</p>
</dd>
diff --git a/libstdc++-v3/include/Makefile.am b/libstdc++-v3/include/Makefile.am
index 84ed1bfdad0..547ec373adb 100644
--- a/libstdc++-v3/include/Makefile.am
+++ b/libstdc++-v3/include/Makefile.am
@@ -228,6 +228,7 @@ tr1_srcdir = ${glibcxx_srcdir}/include/tr1
tr1_builddir = ./tr1
tr1_headers = \
${tr1_srcdir}/array \
+ ${tr1_srcdir}/boost_shared_ptr.h \
${tr1_srcdir}/functional \
${tr1_srcdir}/functional_iterate.h \
${tr1_srcdir}/memory \
diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in
index 554c2868676..814bccf8b08 100644
--- a/libstdc++-v3/include/Makefile.in
+++ b/libstdc++-v3/include/Makefile.in
@@ -447,6 +447,7 @@ tr1_srcdir = ${glibcxx_srcdir}/include/tr1
tr1_builddir = ./tr1
tr1_headers = \
${tr1_srcdir}/array \
+ ${tr1_srcdir}/boost_shared_ptr.h \
${tr1_srcdir}/functional \
${tr1_srcdir}/functional_iterate.h \
${tr1_srcdir}/memory \
diff --git a/libstdc++-v3/include/c_std/std_cstdio.h b/libstdc++-v3/include/c_std/std_cstdio.h
index f31e58e6f24..57bbb3ddb97 100644
--- a/libstdc++-v3/include/c_std/std_cstdio.h
+++ b/libstdc++-v3/include/c_std/std_cstdio.h
@@ -154,15 +154,16 @@ namespace __gnu_cxx
{
#if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC
extern "C" int
- (snprintf)(char * restrict, size_t, const char * restrict, ...);
+ (snprintf)(char * restrict, size_t, const char * restrict, ...);
extern "C" int
- (vfscanf)(FILE * restrict, const char * restrict, __gnuc_va_list);
+ (vfscanf)(FILE * restrict, const char * restrict, __gnuc_va_list);
extern "C" int (vscanf)(const char * restrict, __gnuc_va_list);
extern "C" int
- (vsnprintf)(char * restrict, size_t, const char * restrict, __gnuc_va_list);
+ (vsnprintf)(char * restrict, size_t, const char * restrict, __gnuc_va_list);
extern "C" int
- (vsscanf)(const char * restrict, const char * restrict, __gnuc_va_list);
+ (vsscanf)(const char * restrict, const char * restrict, __gnuc_va_list);
#endif
+
#if !_GLIBCXX_USE_C99_DYNAMIC
using ::snprintf;
using ::vfscanf;
diff --git a/libstdc++-v3/include/c_std/std_cwctype.h b/libstdc++-v3/include/c_std/std_cwctype.h
index 970c53a8f3d..86d0dfdab15 100644
--- a/libstdc++-v3/include/c_std/std_cwctype.h
+++ b/libstdc++-v3/include/c_std/std_cwctype.h
@@ -1,6 +1,6 @@
// -*- C++ -*- forwarding header.
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -59,19 +59,18 @@
# undef iswblank
#endif
#undef iswcntrl
+#undef iswctype
#undef iswdigit
#undef iswgraph
#undef iswlower
#undef iswprint
-#undef iswprint
#undef iswpunct
#undef iswspace
#undef iswupper
#undef iswxdigit
-#undef iswctype
+#undef towctrans
#undef towlower
#undef towupper
-#undef towctrans
#undef wctrans
#undef wctype
@@ -89,19 +88,18 @@ namespace std
using ::iswblank;
#endif
using ::iswcntrl;
+ using ::iswctype;
using ::iswdigit;
using ::iswgraph;
using ::iswlower;
using ::iswprint;
- using ::iswprint;
using ::iswpunct;
using ::iswspace;
using ::iswupper;
using ::iswxdigit;
- using ::iswctype;
+ using ::towctrans;
using ::towlower;
using ::towupper;
- using ::towctrans;
using ::wctrans;
using ::wctype;
}
diff --git a/libstdc++-v3/include/tr1/memory b/libstdc++-v3/include/tr1/memory
index 64e2a900715..93d206e5c29 100644
--- a/libstdc++-v3/include/tr1/memory
+++ b/libstdc++-v3/include/tr1/memory
@@ -27,19 +27,6 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-// boost/shared_count.hpp
-// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
-
-// shared_ptr.hpp
-// (C) Copyright Greg Colvin and Beman Dawes 1998, 1999.
-// Copyright (c) 2001, 2002, 2003 Peter Dimov
-
-// weak_ptr.hpp
-// Copyright (c) 2001, 2002, 2003 Peter Dimov
-
-// enable_shared_from_this.hpp
-// Copyright (c) 2002 Peter Dimov
-
#ifndef _TR1_MEMORY
#define _TR1_MEMORY 1
@@ -49,931 +36,15 @@
#include <new> // std::bad_alloc
#include <typeinfo> // std::type_info in get_deleter
#include <cstddef> // std::size_t
-#include <algorithm> // for std::swap
-#include <iosfwd> // for std::basic_ostream
-#include <cstdlib> // for std::abort
+#include <algorithm> // std::swap
+#include <iosfwd> // std::basic_ostream
+#include <cstdlib> // std::abort
#include <bits/gthr.h>
#include <bits/atomicity.h>
#include <bits/functexcept.h>
#include <debug/debug.h>
-// namespace std::tr1
-namespace std
-{
-namespace tr1
-{
-
-class bad_weak_ptr : public std::exception
-{
-public:
-
- virtual char const* what() const throw()
- {
- return "tr1::bad_weak_ptr";
- }
-};
-
-// Helper for exception objects in <tr1/memory>
-// TODO this should be defined in a different file.
-inline void
-__throw_bad_weak_ptr()
-{
-#if __EXCEPTIONS
- throw bad_weak_ptr();
-#else
- std::abort();
-#endif
-}
-
-
-template <typename _Tp>
- struct _Sp_deleter
- {
- typedef void result_type;
- typedef _Tp* argument_type;
-
- void
- operator()(_Tp* p) const
- { delete p; }
- };
-
-
-class _Sp_counted_base
-{
-public:
-
- _Sp_counted_base()
- : _M_use_count(1), _M_weak_count(1)
- { }
-
- virtual
- ~_Sp_counted_base() // nothrow
- { }
-
- // dispose() is called when _M_use_count drops to zero, to release
- // the resources managed by *this.
- virtual void
- dispose() = 0; // nothrow
-
- // destroy() is called when _M_weak_count drops to zero.
- virtual void
- destroy() // nothrow
- {
- delete this;
- }
-
- virtual void*
- get_deleter(const std::type_info&) = 0;
-
- void
- add_ref_copy()
- {
- __gnu_cxx::__atomic_add(&_M_use_count, 1);
- }
-
- void
- add_ref_lock()
- {
- if (_M_use_count <= 0) // TODO not yet MT safe XXX
- {
- __throw_bad_weak_ptr();
- }
- __gnu_cxx::__atomic_add(&_M_use_count, 1);
- }
-
- void
- release() // nothrow
- {
- if (__gnu_cxx::__exchange_and_add(&_M_use_count, -1) <= 1)
- {
- dispose();
- weak_release();
- }
- }
-
- void
- weak_add_ref() // nothrow
- {
- __gnu_cxx::__atomic_add(&_M_weak_count, 1);
- }
-
- void
- weak_release() // nothrow
- {
- if (__gnu_cxx::__exchange_and_add(&_M_weak_count, -1) <= 1)
- {
- destroy();
- }
- }
-
- long
- use_count() const // nothrow
- {
- return _M_use_count; // XXX is this MT safe?
- }
-
-private:
-
- _Sp_counted_base(_Sp_counted_base const&);
- _Sp_counted_base& operator= (_Sp_counted_base const&);
-
- _Atomic_word _M_use_count; // #shared
- _Atomic_word _M_weak_count; // #weak + (#shared != 0)
-};
-
-template <typename _Ptr, typename _Deleter>
-class _Sp_counted_base_impl : public _Sp_counted_base
-{
-public:
-
- /**
- * @brief
- * @pre d(p) must not throw.
- */
- _Sp_counted_base_impl(_Ptr __p, _Deleter __d)
- : _M_ptr(__p), _M_del(__d)
- { }
-
- virtual void
- dispose() // nothrow
- {
- _M_del(_M_ptr);
- }
-
- virtual void*
- get_deleter(const std::type_info& __ti)
- {
- return __ti == typeid(_Deleter) ? &_M_del : 0;
- }
-
-private:
- _Sp_counted_base_impl(const _Sp_counted_base_impl&);
- _Sp_counted_base_impl& operator=(const _Sp_counted_base_impl&);
-
- _Ptr _M_ptr; // copy constructor must not throw
- _Deleter _M_del; // copy constructor must not throw
-};
-
-class weak_count;
-
-class shared_count
-{
-private:
-
- _Sp_counted_base* _M_pi;
-
- friend class weak_count;
-
-public:
-
- shared_count()
- : _M_pi(0) // nothrow
- { }
-
- template <typename _Ptr, typename _Deleter>
- shared_count(_Ptr __p, _Deleter __d)
- : _M_pi(0)
- {
- try
- {
- _M_pi = new _Sp_counted_base_impl<_Ptr, _Deleter>(__p, __d);
- }
- catch(...)
- {
- __d(__p); // delete __p
- __throw_exception_again;
- }
- }
-
- // auto_ptr<_Tp> is special cased to provide the strong guarantee
-
- template <typename _Tp>
- explicit shared_count(std::auto_ptr<_Tp>& __r)
- : _M_pi(new _Sp_counted_base_impl<_Tp*,_Sp_deleter<_Tp> >(
- __r.get(), _Sp_deleter<_Tp>()
- ))
- { __r.release(); }
-
- // throws bad_weak_ptr when __r.use_count() == 0
- explicit shared_count(const weak_count& __r);
-
- ~shared_count() // nothrow
- {
- if (_M_pi != 0)
- _M_pi->release();
- }
-
- shared_count(const shared_count& __r)
- : _M_pi(__r._M_pi) // nothrow
- {
- if (_M_pi != 0)
- _M_pi->add_ref_copy();
- }
-
- shared_count&
- operator=(const shared_count& __r) // nothrow
- {
- _Sp_counted_base* __tmp = __r._M_pi;
-
- if(__tmp != _M_pi)
- {
- if(__tmp != 0)
- __tmp->add_ref_copy();
- if(_M_pi != 0)
- _M_pi->release();
- _M_pi = __tmp;
- }
- return *this;
- }
-
- void swap(shared_count& __r) // nothrow
- {
- _Sp_counted_base* __tmp = __r._M_pi;
- __r._M_pi = _M_pi;
- _M_pi = __tmp;
- }
-
- long
- use_count() const // nothrow
- { return _M_pi != 0 ? _M_pi->use_count() : 0; }
-
- bool
- unique() const // nothrow
- { return this->use_count() == 1; }
-
- friend inline bool
- operator==(const shared_count& __a, const shared_count& __b)
- { return __a._M_pi == __b._M_pi; }
-
- friend inline bool
- operator<(const shared_count& __a, const shared_count& __b)
- { return std::less<_Sp_counted_base*>()(__a._M_pi, __b._M_pi); }
-
- void*
- get_deleter(const std::type_info& __ti) const
- { return _M_pi ? _M_pi->get_deleter(__ti) : 0; }
-};
-
-
-class weak_count
-{
-private:
-
- _Sp_counted_base * _M_pi;
-
- friend class shared_count;
-
-public:
-
- weak_count()
- : _M_pi(0) // nothrow
- { }
-
- weak_count(const shared_count& __r)
- : _M_pi(__r._M_pi) // nothrow
- {
- if (_M_pi != 0)
- _M_pi->weak_add_ref();
- }
-
- weak_count(const weak_count& __r)
- : _M_pi(__r._M_pi) // nothrow
- {
- if (_M_pi != 0)
- _M_pi->weak_add_ref();
- }
-
- ~weak_count() // nothrow
- {
- if (_M_pi != 0)
- _M_pi->weak_release();
- }
-
- weak_count&
- operator=(const shared_count& __r) // nothrow
- {
- _Sp_counted_base* __tmp = __r._M_pi;
- if (__tmp != 0)
- __tmp->weak_add_ref();
- if (_M_pi != 0)
- _M_pi->weak_release();
- _M_pi = __tmp;
-
- return *this;
- }
-
- weak_count&
- operator=(const weak_count& __r) // nothrow
- {
- _Sp_counted_base * __tmp = __r._M_pi;
- if (__tmp != 0)
- __tmp->weak_add_ref();
- if (_M_pi != 0)
- _M_pi->weak_release();
- _M_pi = __tmp;
-
- return *this;
- }
-
- void
- swap(weak_count& __r) // nothrow
- {
- _Sp_counted_base * __tmp = __r._M_pi;
- __r._M_pi = _M_pi;
- _M_pi = __tmp;
- }
-
- long
- use_count() const // nothrow
- { return _M_pi != 0 ? _M_pi->use_count() : 0; }
-
- friend inline bool
- operator==(const weak_count& __a, const weak_count& __b)
- { return __a._M_pi == __b._M_pi; }
-
- friend inline bool
- operator<(const weak_count& __a, const weak_count& __b)
- { return std::less<_Sp_counted_base*>()(__a._M_pi, __b._M_pi); }
-};
-
-inline
-shared_count::shared_count(const weak_count& __r)
-: _M_pi(__r._M_pi)
-{
- if (_M_pi != 0)
- {
- _M_pi->add_ref_lock();
- }
- else
- {
- __throw_bad_weak_ptr();
- }
-}
-
-// fwd decls
-template <typename _Tp> class weak_ptr;
-template <typename _Tp> class enable_shared_from_this;
-
-struct __static_cast_tag {};
-struct __const_cast_tag {};
-struct __dynamic_cast_tag {};
-struct __polymorphic_cast_tag {};
-
-template<class _Tp> struct shared_ptr_traits
-{
- typedef _Tp & reference;
-};
-
-template<> struct shared_ptr_traits<void>
-{
- typedef void reference;
-};
-
-template<> struct shared_ptr_traits<void const>
-{
- typedef void reference;
-};
-
-template<> struct shared_ptr_traits<void volatile>
-{
- typedef void reference;
-};
-
-template<> struct shared_ptr_traits<void const volatile>
-{
- typedef void reference;
-};
-
-
-// enable_shared_from_this support
-
-// friend of enable_shared_from_this
-template <typename _Tp1, typename _Tp2>
- void
- __enable_shared_from_this( const shared_count& __pn,
- const enable_shared_from_this<_Tp1>* __pe,
- const _Tp2* __px );
-
-inline void
-__enable_shared_from_this(const shared_count&, ...)
-{ }
-
-/**
- * @class shared_ptr <tr1/memory>
- *
- * A smart pointer with reference-counted copy semantics.
- * The object pointed to is deleted when the last shared_ptr pointing to it
- * is destroyed or reset.
- */
-
-template <typename _Tp>
- class shared_ptr
- {
- typedef typename shared_ptr_traits<_Tp>::reference _Reference;
-
- public:
-
- typedef _Tp element_type;
-
- /** @brief Construct an empty %shared_ptr.
- * @post use_count()==0 && get()==0
- */
- shared_ptr() : _M_ptr(0), _M_refcount() // never throws
- { }
-
- /** @brief Construct a %shared_ptr that owns the pointer @a p.
- * @param p A pointer that is convertible to element_type*.
- * @post use_count()==1 && get()==p
- * @throw std::bad_alloc, in which case @c delete @a p is called.
- */
- template <typename _Tp1>
- explicit shared_ptr(_Tp1* __p)
- : _M_ptr(__p), _M_refcount(__p, _Sp_deleter<_Tp1>())
- {
- __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
- // __glibcxx_function_requires(_CompleteConcept<_Tp1*>)
-
- __enable_shared_from_this( _M_refcount, __p, __p );
- }
-
- //
- // Requirements: D's copy constructor and destructor must not throw
- //
- // shared_ptr will release p by calling d(p)
- //
- /** @brief Construct a %shared_ptr that owns the pointer @a p
- * and the deleter @a d.
- * @param p A pointer.
- * @param d A deleter.
- * @post use_count()==1 && get()==p
- * @throw std::bad_alloc, in which case @a d(p) is called.
- */
- template <typename _Tp1, typename _Deleter>
- shared_ptr(_Tp1* __p, _Deleter __d)
- : _M_ptr(__p), _M_refcount(__p, __d)
- {
- __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
- // TODO requires D is CopyConstructible and d(p) well-formed
-
- __enable_shared_from_this( _M_refcount, __p, __p );
- }
-
- // generated copy constructor, assignment, destructor are fine.
-
- /** @brief If @a r is empty, constructs an empty %shared_ptr; otherwise
- * construct a %shared_ptr that shares ownership with @a r.
- * @param r A %shared_ptr.
- * @post get()==r.get() && use_count()==r.use_count()
- * @throw std::bad_alloc, in which case
- */
- template <typename _Tp1>
- shared_ptr(const shared_ptr<_Tp1>& __r)
- : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) // never throws
- {
- __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
- }
-
- /** @brief Constructs a %shared_ptr that shares ownership with @a r
- * and stores a copy of the pointer stored in @a r.
- * @param r A weak_ptr.
- * @post use_count()==r.use_count()
- * @throw bad_weak_ptr when r.expired(),
- * in which case the constructor has no effect.
- */
- template <typename _Tp1>
- explicit shared_ptr(const weak_ptr<_Tp1>& __r)
- : _M_refcount(__r._M_refcount) // may throw
- {
- __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
- // it is now safe to copy r__._M_ptr, as _M_refcount(__r._M_refcount)
- // did not throw
- _M_ptr = __r._M_ptr;
- }
-
- /**
- * @post use_count()==1 and r.get()==0
- */
- template <typename _Tp1>
- explicit shared_ptr(std::auto_ptr<_Tp1>& __r)
- : _M_ptr(__r.get()), _M_refcount()
- {
- // TODO requires r.release() convertible to _Tp*, Tp1 is complete,
- // delete r.release() well-formed
- _Tp1 * __tmp = __r.get();
- _M_refcount = shared_count(__r);
-
- __enable_shared_from_this( _M_refcount, __tmp, __tmp );
- }
-
- template <typename _Tp1>
- shared_ptr(const shared_ptr<_Tp1>& __r, __static_cast_tag)
- : _M_ptr(static_cast<element_type*>(__r._M_ptr))
- , _M_refcount(__r._M_refcount)
- { }
-
- template <typename _Tp1>
- shared_ptr(const shared_ptr<_Tp1>& __r, __const_cast_tag)
- : _M_ptr(const_cast<element_type*>(__r._M_ptr))
- , _M_refcount(__r._M_refcount)
- { }
-
- template <typename _Tp1>
- shared_ptr(const shared_ptr<_Tp1>& __r, __dynamic_cast_tag)
- : _M_ptr(dynamic_cast<element_type*>(__r._M_ptr))
- , _M_refcount(__r._M_refcount)
- {
- if (_M_ptr == 0) // need to allocate new counter -- the cast failed
- {
- _M_refcount = shared_count();
- }
- }
-
- template <typename _Tp1>
- shared_ptr&
- operator=(const shared_ptr<_Tp1>& __r) // never throws
- {
- _M_ptr = __r._M_ptr;
- _M_refcount = __r._M_refcount; // shared_count::op= doesn't throw
- return *this;
- }
-
- template <typename _Tp1>
- shared_ptr&
- operator=(std::auto_ptr<_Tp1>& __r)
- {
- shared_ptr(__r).swap(*this);
- return *this;
- }
-
- void
- reset() // never throws
- { shared_ptr().swap(*this); }
-
- template <typename _Tp1>
- void
- reset(_Tp1* __p) // _Tp1 must be complete
- {
- _GLIBCXX_DEBUG_ASSERT(__p == 0 || __p != _M_ptr); // catch self-reset errors
- shared_ptr(__p).swap(*this);
- }
-
- template <typename _Tp1, typename _Deleter>
- void
- reset(_Tp1 * __p, _Deleter __d)
- { shared_ptr(__p, __d).swap(*this); }
-
- // error to instantiate if _Tp is [cv-qual] void
- _Reference
- operator*() const // never throws
- {
- _GLIBCXX_DEBUG_ASSERT(_M_ptr != 0);
- return *_M_ptr;
- }
-
- _Tp*
- operator->() const // never throws
- {
- _GLIBCXX_DEBUG_ASSERT(_M_ptr != 0);
- return _M_ptr;
- }
-
- _Tp*
- get() const // never throws
- { return _M_ptr; }
-
- // implicit conversion to "bool"
- private:
- typedef _Tp* shared_ptr::*__unspecified_bool_type;
-
- public:
- operator __unspecified_bool_type() const // never throws
- { return _M_ptr == 0 ? 0 : &shared_ptr::_M_ptr; }
-
- bool
- unique() const // never throws
- { return _M_refcount.unique(); }
-
- long
- use_count() const // never throws
- { return _M_refcount.use_count(); }
-
- void
- swap(shared_ptr<_Tp>& __other) // never throws
- {
- std::swap(_M_ptr, __other._M_ptr);
- _M_refcount.swap(__other._M_refcount);
- }
-
- private:
- template <typename _Tp1>
- bool
- _M_less(const shared_ptr<_Tp1>& __rhs) const
- { return _M_refcount < __rhs._M_refcount; }
-
- void*
- _M_get_deleter(const std::type_info& __ti) const
- { return _M_refcount.get_deleter(__ti); }
-
- template <typename _Tp1> friend class shared_ptr;
- template <typename _Tp1> friend class weak_ptr;
-
- // friends injected into enclosing namespace and found by ADL:
-
- // get_deleter (experimental)
- template <typename _Del>
- friend inline _Del*
- get_deleter(const shared_ptr& __p)
- { return static_cast<_Del*>(__p._M_get_deleter(typeid(_Del))); }
-
- template <typename _Tp1>
- friend inline bool
- operator==(const shared_ptr& __a, const shared_ptr<_Tp1>& __b)
- { return __a.get() == __b.get(); }
-
- template <typename _Tp1>
- friend inline bool
- operator!=(const shared_ptr& __a, const shared_ptr<_Tp1>& __b)
- { return __a.get() != __b.get(); }
-
- template <typename _Tp1>
- friend inline bool
- operator<(const shared_ptr& __a, const shared_ptr<_Tp1>& __b)
- { return __a._M_less(__b); }
-
- _Tp* _M_ptr; // contained pointer
- shared_count _M_refcount; // reference counter
- }; // shared_ptr
-
-// 2.2.3.9 shared_ptr casts
-
-/** @warning The seemingly equivalent
- * <code>shared_ptr<T>(static_cast<T*>(r.get()))</code>
- * will eventually result in undefined behaviour,
- * attempting to delete the same object twice.
- */
-template <typename _Tp, typename _Tp1>
- shared_ptr<_Tp>
- static_pointer_cast(const shared_ptr<_Tp1>& __r)
- {
- return shared_ptr<_Tp>(__r, __static_cast_tag());
- }
-
-/** @warning The seemingly equivalent
- * <code>shared_ptr<T>(const_cast<T*>(r.get()))</code>
- * will eventually result in undefined behaviour,
- * attempting to delete the same object twice.
- */
-template <typename _Tp, typename _Tp1>
- shared_ptr<_Tp>
- const_pointer_cast(const shared_ptr<_Tp1>& __r)
- {
- return shared_ptr<_Tp>(__r, __const_cast_tag());
- }
-
-/** @warning The seemingly equivalent
- * <code>shared_ptr<T>(dynamic_cast<T*>(r.get()))</code>
- * will eventually result in undefined behaviour,
- * attempting to delete the same object twice.
- */
-template <typename _Tp, typename _Tp1>
- shared_ptr<_Tp>
- dynamic_pointer_cast(const shared_ptr<_Tp1>& __r)
- {
- return shared_ptr<_Tp>(__r, __dynamic_cast_tag());
- }
-
-// operator<<
-template <typename _Ch, typename _Tr, typename _Tp>
- std::basic_ostream<_Ch,_Tr>&
- operator<<(std::basic_ostream<_Ch,_Tr>& __os, const shared_ptr<_Tp>& __p)
- {
- __os << __p.get();
- return __os;
- }
-
-
-template <typename _Tp>
- class weak_ptr
- {
- public:
-
- typedef _Tp element_type;
-
- weak_ptr()
- : _M_ptr(0), _M_refcount() // never throws
- { }
-
- // generated copy constructor, assignment, destructor are fine
-
- //
- // The "obvious" converting constructor implementation:
- //
- // template<class Y>
- // weak_ptr(weak_ptr<Y> const & r): _M_ptr(r._M_ptr), _M_refcount(r._M_refcount) // never throws
- // {
- // }
- //
- // has a serious problem.
- //
- // r._M_ptr may already have been invalidated. The _M_ptr(r._M_ptr)
- // conversion may require access to *r._M_ptr (virtual inheritance).
- //
- // It is not possible to avoid spurious access violations since
- // in multithreaded programs r._M_ptr may be invalidated at any point.
- //
-
- template <typename _Tp1>
- weak_ptr(const weak_ptr<_Tp1>& r)
- : _M_refcount(r._M_refcount) // never throws
- {
- __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
- _M_ptr = r.lock().get();
- }
-
- template <typename _Tp1>
- weak_ptr(const shared_ptr<_Tp1>& r)
- : _M_ptr(r._M_ptr), _M_refcount(r._M_refcount) // never throws
- {
- __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
- }
-
- template <typename _Tp1>
- weak_ptr&
- operator=(const weak_ptr<_Tp1>& r) // never throws
- {
- _M_ptr = r.lock().get();
- _M_refcount = r._M_refcount;
- return *this;
- }
-
- template <typename _Tp1>
- weak_ptr&
- operator=(const shared_ptr<_Tp1>& r) // never throws
- {
- _M_ptr = r._M_ptr;
- _M_refcount = r._M_refcount;
- return *this;
- }
-
- shared_ptr<_Tp>
- lock() const // never throws
- {
-#ifdef __GTHREADS
-
- // optimization: avoid throw overhead
- if (expired())
- {
- return shared_ptr<element_type>();
- }
-
- try
- {
- return shared_ptr<element_type>(*this);
- }
- catch (const bad_weak_ptr&)
- {
- // Q: how can we get here?
- // A: another thread may have invalidated r after the use_count test above.
- return shared_ptr<element_type>();
- }
-
-#else
-
- // optimization: avoid try/catch overhead when single threaded
- return expired() ? shared_ptr<element_type>() : shared_ptr<element_type>(*this);
-
-#endif
- } // XXX MT
-
-
- long
- use_count() const // never throws
- { return _M_refcount.use_count(); }
-
- bool
- expired() const // never throws
- { return _M_refcount.use_count() == 0; }
-
- void
- reset() // never throws
- { weak_ptr().swap(*this); }
-
- void
- swap(weak_ptr& __s) // never throws
- {
- std::swap(_M_ptr, __s._M_ptr);
- _M_refcount.swap(__s._M_refcount);
- }
-
- private:
-
- template <typename _Tp1>
- bool
- _M_less(const weak_ptr<_Tp1>& __rhs) const
- { return _M_refcount < __rhs._M_refcount; }
-
- // used by __enable_shared_from_this
- void
- _M_assign(_Tp* __ptr, const shared_count& __refcount)
- {
- _M_ptr = __ptr;
- _M_refcount = __refcount;
- }
-
- // friend injected into namespace and found by ADL
-
- template <typename _Tp1>
- friend inline bool
- operator<(const weak_ptr& __lhs, const weak_ptr<_Tp1>& __rhs)
- { return __lhs._M_less(__rhs); }
-
- template <typename _Tp1> friend class weak_ptr;
- template <typename _Tp1> friend class shared_ptr;
- friend class enable_shared_from_this<_Tp>;
-
- _Tp* _M_ptr; // contained pointer
- weak_count _M_refcount; // reference counter
-
- }; // weak_ptr
-
-
-
-template <typename _Tp>
- class enable_shared_from_this
- {
- protected:
-
- enable_shared_from_this()
- { }
-
- enable_shared_from_this(const enable_shared_from_this&)
- { }
-
- enable_shared_from_this&
- operator=(const enable_shared_from_this&)
- { return *this; }
-
- ~enable_shared_from_this()
- { }
-
- public:
-
- shared_ptr<_Tp>
- shared_from_this()
- {
- shared_ptr<_Tp> p(this->_M_weak_this);
- return p;
- }
-
- shared_ptr<const _Tp>
- shared_from_this() const
- {
- shared_ptr<const _Tp> p(this->_M_weak_this);
- return p;
- }
-
- private:
- template <typename _Tp1>
- void
- _M_weak_assign(_Tp1* __p, const shared_count& __n) const
- { _M_weak_this._M_assign(__p, __n); }
-
- template <typename _Tp1>
- friend void
- __enable_shared_from_this( const shared_count& __pn, const enable_shared_from_this* __pe, const _Tp1* __px)
- {
- if(__pe != 0)
- __pe->_M_weak_assign(const_cast<_Tp1*>(__px), __pn);
- }
-
- mutable weak_ptr<_Tp> _M_weak_this;
- };
-
-} // namespace tr1
-
-/**
- * @brief std::swap() specialisation for shared_ptr.
- * @relates shared_ptr.
- */
-template <typename _Tp>
- inline void
- swap(tr1::shared_ptr<_Tp>& __a, tr1::shared_ptr<_Tp>& __b)
- {
- __a.swap(__b);
- }
-
-/**
- * @brief std::swap() specialisation for weak_ptr.
- * @relates weak_ptr.
- */
-template <typename _Tp>
- void
- swap(tr1::weak_ptr<_Tp>& __a, tr1::weak_ptr<_Tp>& __b)
- {
- __a.swap(__b);
- }
-
-} // namespace std
+#include <tr1/boost_shared_ptr.h>
#endif
diff --git a/libstdc++-v3/src/debug.cc b/libstdc++-v3/src/debug.cc
index 415fcbf91c1..3375adf1f47 100644
--- a/libstdc++-v3/src/debug.cc
+++ b/libstdc++-v3/src/debug.cc
@@ -1,6 +1,6 @@
// Debugging mode support code -*- C++ -*-
-// Copyright (C) 2003, 2004
+// Copyright (C) 2003, 2004, 2005
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -507,7 +507,7 @@ namespace __gnu_debug
template<typename _Tp>
void
_Error_formatter::_M_format_word(char* __buf,
- int __n __attribute__((__unused__)),
+ int __n __attribute__ ((__unused__)),
const char* __fmt, _Tp __s) const
{
#ifdef _GLIBCXX_USE_C99
@@ -653,21 +653,20 @@ namespace __gnu_debug
// Instantiations.
template
void
- _Error_formatter::_M_format_word(char* __buf, int __n, const char* __fmt,
- const void* __s) const;
+ _Error_formatter::_M_format_word(char*, int, const char*,
+ const void*) const;
template
void
- _Error_formatter::_M_format_word(char* __buf, int __n, const char* __fmt,
- long __s) const;
+ _Error_formatter::_M_format_word(char*, int, const char*, long) const;
template
void
- _Error_formatter::_M_format_word(char* __buf, int __n, const char* __fmt,
- std::size_t __s) const;
+ _Error_formatter::_M_format_word(char*, int, const char*,
+ std::size_t) const;
template
void
- _Error_formatter::_M_format_word(char* __buf, int __n, const char* __fmt,
- const char* __s) const;
+ _Error_formatter::_M_format_word(char*, int, const char*,
+ const char*) const;
} // namespace __gnu_debug
diff --git a/libstdc++-v3/testsuite/Makefile.am b/libstdc++-v3/testsuite/Makefile.am
index 1baeb826c4b..12d4752c0bd 100644
--- a/libstdc++-v3/testsuite/Makefile.am
+++ b/libstdc++-v3/testsuite/Makefile.am
@@ -58,7 +58,7 @@ endif
abi_check_SOURCES = abi_check.cc
abi_check_DEPENDENCIES = libv3test.a
-all-local: stamp_wchar stamp_thread testsuite_files
+all-local: stamp_wchar stamp_thread
# Enable wchar_t tests if capable.
if GLIBCXX_TEST_WCHAR_T
diff --git a/libstdc++-v3/testsuite/Makefile.in b/libstdc++-v3/testsuite/Makefile.in
index 90ece6878e4..d5f3c3e46e3 100644
--- a/libstdc++-v3/testsuite/Makefile.in
+++ b/libstdc++-v3/testsuite/Makefile.in
@@ -583,7 +583,7 @@ uninstall-am: uninstall-info-am
tags uninstall uninstall-am uninstall-info-am
-all-local: stamp_wchar stamp_thread testsuite_files
+all-local: stamp_wchar stamp_thread
# Enable wchar_t tests if capable.
@GLIBCXX_TEST_WCHAR_T_TRUE@stamp_wchar:
diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp
index 0ac4196b7c3..2f36c7faa55 100644
--- a/libstdc++-v3/testsuite/lib/libstdc++.exp
+++ b/libstdc++-v3/testsuite/lib/libstdc++.exp
@@ -134,27 +134,32 @@ proc libstdc++_init { testfile } {
v3track gccdir 3
# Compute what needs to be added to the existing LD_LIBRARY_PATH.
- set ld_library_path ""
- append ld_library_path ":${gccdir}"
- set compiler ${gccdir}/g++
- if { [is_remote host] == 0 && [which $compiler] != 0 } {
- foreach i "[exec $compiler --print-multi-lib]" {
- set mldir ""
- regexp -- "\[a-z0-9=/\.-\]*;" $i mldir
- set mldir [string trimright $mldir "\;@"]
- if { "$mldir" == "." } {
- continue
- }
- if { [llength [glob -nocomplain ${gccdir}/${mldir}/libgcc_s*.so.*]] >= 1 } {
- append ld_library_path ":${gccdir}/${mldir}"
- }
- }
- }
- append ld_library_path ":${blddir}/src/.libs"
+ if {$gccdir != ""} {
+ set ld_library_path ""
+ append ld_library_path ":${gccdir}"
+ set compiler ${gccdir}/g++
+ append ld_library_path ":${blddir}/src/.libs"
+
+ if { [is_remote host] == 0 && [which $compiler] != 0 } {
+ foreach i "[exec $compiler --print-multi-lib]" {
+ set mldir ""
+ regexp -- "\[a-z0-9=/\.-\]*;" $i mldir
+ set mldir [string trimright $mldir "\;@"]
+ if { "$mldir" == "." } {
+ continue
+ }
+ if { [llength [glob -nocomplain ${gccdir}/${mldir}/libgcc_s*.so.*]] >= 1 } {
+ append ld_library_path ":${gccdir}/${mldir}"
+ }
+ }
+ }
- set_ld_library_path_env_vars
- if [info exists env(LD_LIBRARY_PATH)] {
- verbose -log "LD_LIBRARY_PATH = $env(LD_LIBRARY_PATH)"
+ set_ld_library_path_env_vars
+ if [info exists env(LD_LIBRARY_PATH)] {
+ verbose -log "LD_LIBRARY_PATH = $env(LD_LIBRARY_PATH)"
+ }
+ } else {
+ set compiler [transform "g++"]
}
# Do a bunch of handstands and backflips for cross compiling and
@@ -176,8 +181,16 @@ proc libstdc++_init { testfile } {
set includes [exec sh $flags_file --build-includes]
} else {
set cxx [transform "g++"]
- set cxxflags "-ggdb3"
+ set cxxflags "-g -O2 -D_GLIBCXX_ASSERT -fmessage-length=0"
set includes "-I${srcdir}"
+ # Guess at the location of the installed locale files.
+ # (It would be nice if "gcc --print-file-name" could find
+ # message files, but it cannot.)
+ set absolute_cxx [which $cxx]
+ if { $absolute_cxx != "" } {
+ set localedir "[file dirname $absolute_cxx]/../share/locale"
+ }
+ set cxxflags "$cxxflags -DLOCALEDIR=\"$localedir\""
}
}
@@ -242,6 +255,15 @@ proc libstdc++-dg-test { prog do_what extra_tool_flags } {
return [list $comp_output $output_file]
}
+# True if the library supports wchar_t.
+set v3-wchar_t 0
+
+# True if the library supports threads.
+set v3-threads 0
+
+# A string naming object files to be linked into all tests.
+set v3-test_objs ""
+
# Called from libstdc++-dg-test above. Calls back into system's
# target_compile to actually do the work.
proc v3_target_compile { source dest type options } {
@@ -251,6 +273,7 @@ proc v3_target_compile { source dest type options } {
global cxxflags
global includes
global blddir
+ global v3-test_objs
if { [target_info needs_status_wrapper] != "" && [info exists gluefile] } {
lappend options "libs=${gluefile}"
@@ -262,42 +285,58 @@ proc v3_target_compile { source dest type options } {
set cxx_final [concat $cxx_final $cxxlibglossflags]
set cxx_final [concat $cxx_final $cxxflags]
set cxx_final [concat $cxx_final $includes]
+ # Link the support objects into executables.
+ if { $type == "executable" } {
+ set cxx_final [concat $cxx_final ${v3-test_objs}]
+ }
lappend options "compiler=$cxx_final"
- # Picks up the freshly-built testsuite library corresponding to the
- # multilib under test.
- lappend options "ldflags=-L${blddir}/testsuite"
- lappend options "libs=-lv3test"
-
return [target_compile $source $dest $type $options]
}
-
-# Called once, from libstdc++/normal.exp.
-proc v3-list-tests { filename } {
+# Build the support objects linked in with the libstdc++ tests. In
+# addition, set v3-wchar_t, v3-threads, and v3-test_objs
+# appropriately.
+proc v3-build_support {} {
global srcdir
- global blddir
-
- set tests_file "${blddir}/testsuite/${filename}"
- set sfiles ""
-
- verbose -log "In v3-list-tests"
- verbose -log "blddir = ${blddir}"
- verbose -log "tests_file = $tests_file"
+ global v3-wchar_t
+ global v3-threads
+ global v3-test_objs
+
+ # Figure out whether or not the library supports certain features.
+ set v3-wchar_t 0
+ set v3-threads 0
+ set v3-test_objs ""
+
+ set config_src "config.cc"
+ set f [open $config_src "w"]
+ puts $f "#include <bits/c++config.h>"
+ close $f
+ set preprocessed [v3_target_compile $config_src "" \
+ preprocess "additional_flags=-dN"]
+ foreach l $preprocessed {
+ if { [string first "_GLIBCXX_USE_WCHAR_T" $l] != -1 } {
+ verbose -log "wchar_t support detected"
+ set v3-wchar_t 1
+ } elseif { [string first "_GLIBCXX_HAVE_GTHR_DEFAULT" $l] != -1 } {
+ verbose -log "thread support detected"
+ set v3-threads 1
+ }
+ }
- # If there is a testsuite_file, use it.
- if { [file exists $tests_file] } {
- set f [open $tests_file]
- while { ! [eof $f] } {
- set t [gets $f]
- if { [string length "$t"] != 0 } {
- lappend sfiles ${srcdir}/${t}
- }
- }
- close $f
- } else {
- verbose "cannot open $tests_file"
+ # Build the support objects.
+ set source_files \
+ [list testsuite_abi.cc testsuite_allocator.cc testsuite_hooks.cc]
+ foreach f $source_files {
+ set object_file [file rootname $f].o
+ # Compile with "-w" so that warnings issued by the compiler
+ # do not prevent compilation.
+ if { [v3_target_compile $srcdir/$f $object_file "object" \
+ [list "incdir=$srcdir" "additional_flags=-w"]]
+ != "" } {
+ error "could not compile $f"
+ }
+ append v3-test_objs "$object_file "
}
- return $sfiles
}
diff --git a/libstdc++-v3/testsuite/libstdc++-dg/normal.exp b/libstdc++-v3/testsuite/libstdc++-dg/normal.exp
index b613c66da1c..746c7a8ec3f 100644
--- a/libstdc++-v3/testsuite/libstdc++-dg/normal.exp
+++ b/libstdc++-v3/testsuite/libstdc++-dg/normal.exp
@@ -21,10 +21,73 @@
# Initialization.
dg-init
+# Build the support objects.
+v3-build_support
+
+set tests [list]
+
+# If there is a "testsuite_files" file, use it.
+#
+# This is a workaround for problems reported with using:
+#
+# runtest normal.exp="`cat testsuite_files`"
+#
+# See:
+# http://gcc.gnu.org/ml/libstdc++/2005-03/msg00278.html
+# for discussion of the problem.
+#
+# If that worked consistently, we could modify "make check" to
+# pass that option, and then remove this code.
+if {[info exists blddir]} {
+ set tests_file "${blddir}/testsuite/testsuite_files"
+}
+if {[info exists tests_file] && [file exists $tests_file]} {
+ set f [open $tests_file]
+ while { ! [eof $f] } {
+ set t [gets $f]
+ if { [string length "$t"] != 0 } {
+ lappend tests ${srcdir}/${t}
+ }
+ }
+ close $f
+} else {
+ # Find directories that might have tests.
+ set subdirs [glob "$srcdir/\[0-9\]\[0-9\]*"]
+ foreach d [glob "$srcdir/\[a-z\]*"] {
+ if {[file isdirectory $d]} {
+ lappend subdirs $d
+ }
+ }
+ # Find all the tests.
+ foreach s $subdirs {
+ set subdir_tests [find $s *.cc]
+ # Filter out tests that should not be run.
+ foreach t $subdir_tests {
+ # The DejaGNU "find" procedure sometimes returns a list
+ # containing an empty string, when it should really return
+ # an empty list.
+ if { $t == "" } {
+ continue
+ }
+ # Filter out:
+ # 1. interactive tests.
+ # 2. performance tests.
+ # 3. wchar_t tests, if not supported.
+ # 4. thread tests, if not supported.
+ if { [string first _xin $t] == -1
+ && [string first performance $t] == -1
+ && (${v3-wchar_t} || [string first wchar_t $t] == -1)
+ && (${v3-threads} || [string first thread $t] == -1) } {
+ lappend tests $t
+ }
+ }
+ }
+}
+set tests [lsort $tests]
+
# Main loop.
global DEFAULT_CXXFLAGS
-dg-runtest [v3-list-tests testsuite_files] "" $DEFAULT_CXXFLAGS
-#dg-runtest [v3-list-tests testsuite_files_interactive] "" $DEFAULT_CXXFLAGS
+dg-runtest $tests "" $DEFAULT_CXXFLAGS
# All done.
dg-finish
diff --git a/libstdc++-v3/testsuite/tr1/2_general_utilities/memory/shared_ptr/cons/auto_ptr_neg.cc b/libstdc++-v3/testsuite/tr1/2_general_utilities/memory/shared_ptr/cons/auto_ptr_neg.cc
index dca1f3ccd84..ec219066aac 100644
--- a/libstdc++-v3/testsuite/tr1/2_general_utilities/memory/shared_ptr/cons/auto_ptr_neg.cc
+++ b/libstdc++-v3/testsuite/tr1/2_general_utilities/memory/shared_ptr/cons/auto_ptr_neg.cc
@@ -45,6 +45,6 @@ main()
test01();
return 0;
}
-// { dg-error "shared_ptr" "candidates are" { target *-*-* } 482 }
+// { dg-error "shared_ptr" "candidates are" { target *-*-* } 478 }
-// { dg-error "shared_ptr" "" { target *-*-* } 472 }
+// { dg-error "shared_ptr" "" { target *-*-* } 468 }